### Using Mathematics Expressions in CalcU

#### Using LaTex!

Creating mathematics expressions in CalcU is simple, whether you are making them in Comments, Answers, Questions, or Practice Problems, the format is the same for each, so it is easy to remember. Expressions are all based on a markup language called LaTex, which is a way that people around the world make all kinds of printed content look gorgeous. Listed below are the most common expressions that you might need, and the syntax for them.

#### Wrap your expressions

Whenever you are writing something that you want to be interpreted as math, and rendered in the LaTex format, you need to wrap it with special characters. There are two different "modes" of input, inline expressions and displayed equations (which are centered, on their own line). Inline expressions are used when writing mathematical expressions in the middle of text. Displayed equations are used when you wish the mathematical equation to stand alone.

- To create an
**inline expression**, begin the expression with`\`

`(`

, write your expression in LaTex, and use`\`

`)`

as a closing statement. - To create a
**displayed equation**, begin the expression with`\`

`[`

, write your expression in LaTex, and use`\`

`]`

to close the statement. - Note that the inline Tex shorthand
`$ ... $`

has been intentionally disabled, in order to prevent accidental misuse (as it likely would cause).

#### Stellar external resources

Luckily the LaTex community is incredibly well supported. The equations listed below represent just a small portion of the vast number of possibilities with LaTex. The LaTex Wiki Mathematics page has everything you might ever want to know, and if you want to see a bunch of examples, there is a stellar cookbook of LaTex recipes stored here. Finally, another useful LaTex tool is the LaTex Calculator, however this particular style of LaTex will not always render on this site. If you wish practice rendering LaTex on this site, go to our Create Practice Problem page and in the Problem Editor click this icon to get started.

Pattern | Result |

x^2 - 3x - 4 = (x - 4)(x + 1) | $$ x^2 - 3x - 4 = (x - 4)(x + 1) $$ |

{base} ^ {exponent1 + exponent2} | $$ {base} ^ {exponent1 + exponent2} $$ |

\frac {numerator} {denomenator} | $$ \frac {numerator} {denomenator} $$ |

\| x \| | $$ \| x \| $$ |

\int x \, dx, \int_ 0 ^ \infty | $$ \int x \, dx, \int_ 0 ^ \infty $$ |

\lim_{x\rightarrow \infty} 5 | $$ \lim_{x\rightarrow \infty} 5 $$ |

\alpha, A, \beta, B, \gamma, \Gamma, \pi, \Pi, \phi, \varphi, \Phi | $$ \alpha, A, \beta, B, \gamma, \Gamma, \pi, \Pi, \phi, \varphi, \Phi $$ |

\forall x \in X, \quad \exists y \leq \epsilon | $$ \forall x \in X, \quad \exists y \leq \epsilon $$ |

\cos (2\theta) = \cos^2 \theta - \sin^2 \theta | $$ \cos (2\theta) = \cos^2 \theta - \sin^2 \theta $$ |

\sqrt[3]{5}, \neq, \geq, \pm, \triangle, \angle, \cdot | $$ \sqrt[3]{5}, \neq, \geq, \pm, \triangle, \angle, \cdot $$ |