\chapter{Mathematical Equations}\label{ch:mathematicalequations} There are many ways to include formulas in your thesis. This section will provide some different ways of adding them (inline and standalone), as well as provide some ways of referencing the equations. To start the simplest way to add an equation is using the built-in \LaTeX\ math mode. To enter and exit math mode one just needs to use the \cmd{(} and \cmd{)} symbols around an equation. While there also exists \lstinline|$$| to add math, it is not recommended due to potential compatibility issues. Additionally, this, \lstinline|\(\)|, method is capable of being redefined to add further customization. An example of using math mode to get an inline equation is by using the following command: \begin{center} \lstinline|\(\vec{F_{d}}=\frac{1}{2}\ A\ C_{d}\ \vec{V}^{2}\)| \end{center} The above command has the effect of creating the following output: \(\vec{F_{d}}=\frac{1}{2}\ A\ C_{d}\ \vec{V}^{2}\). Sometimes it can be quite beneficial to separate what would be an inline equation to be on its own line. For this, we have two different ways of doing it. The first was will produce an equation that has no reference: \[ E = m\ c^2 \] % shorthand for the following way of writing equations. \begin{equation*} E = m\ c^2 \end{equation*} The second will produce an equation with a reference. For this, there are two main ways of creating the reference, the first one, see \Cref{eq:Eq}, creates a numbered reference; the other one, see \Cref{eq:pi}, creates a reference with a `tag'. The difference between the two is the inclusion of a \cmd{tag}\mopt{} command that will replace the regular number with \opt{} and the changing from the \env{equation} environment to the \env{equation*} environment. If you do not want the brackets around the tag, as shown in \Cref{eq:otherpi}, use the starred version of the command: \cmd{tag*}\mopt{}. This will not remove the braces in the reference for the equation, but will remove them from appearing next to the equation definition. \notice{Using the \cmd{tag} command in conjunction with the \cmd{label} command can create a \LaTeX\ warning when used in the non-star \env{equation} environment. This warning can be safely ignored, however, the better way to deal with this is to make sure one is using the star version, \env{equation*}.} \begin{equation} \label{eq:Eq} \pi = 3.14... \end{equation} \begin{equation*} \tag{Constant pi}\label{eq:pi} \pi = 3.1415... \end{equation*} \begin{equation*} \tag*{Constant pi}\label{eq:otherpi} \pi = 3.1415... \end{equation*} If you have multiple equations that you want arranged very neatly, use the \env{align} environment and you can assign individual equations numbers as shown in \Cref{eq:multiref:a,eq:multiref:b,eq:multiref:c}. Note that it is the \& symbol that determines what will be aligned. Further note that spaces in \enquote{math mode} are ignored and need to be specified using the space commands in %\Cref{}%TODO ADD SPACE COMMANDS \begin{align}%Note: Alignment happens at the "&" character \label{eq:multiref:a} Equation1 &= 1\\ \label{eq:multiref:b} Equation2 &= 2 + 2\\ \label{eq:multiref:c} Equation3 &= 3 + 3 + 3 \end{align} %TODO: ADD MORE TYPES OF EQUATIONS %TODO: ADD MORE MATH BASED MACROS AND MENTION THE USE OF THE AMSMATH PACKAGES %TODO: MOVE THE TABLES TO AN APPENDIX THEY ARE VERY BLOATED HERE AND NOTHING REFERENCES THEM. It may be very important in a math heavy thesis to be able to show your equations, or even data in a readable way. For this, we will explore some of the ways to create specific data. \section{Vector, Sets, Piecewise Functions, Matrix Math, and More} \begin{equation} \text{f}(x) = \begin{cases} x^{2*\ln{x}},&\text{if }x<3\\ -\frac{x}{2},&\text{if }3\leq{}x\leq{}4\\ x,&\text{if }40\\ & a \quad && \text{Multiplier} \quad && 00\\ a & \text{Multiplier} & 0