Math
Basics[edit]
To render any math equation, the math equation must be between <math></math>
i.e., <math>f(x)=x^2</math>
gives .
Common math commands[edit]
Superscript & Subscript[edit]
Superscript: <math>x^{5+y}</math>
gives
Subscript: <math>x_{5+t}</math>
gives
Together: <math>x_{5+t}^{5+y}</math>
gives
Fractions, radicals and brackets[edit]
Fractions: <math>\frac{1}{x}</math>
gives
Bad brackets, parentheses, etc.: <math>(\frac{1}{x})^3</math>
gives
Correct brackets, parentheses, etc.: <math>\left(\frac{1}{x}\right)^3</math>
gives
Square root: <math>\sqrt{x+1}</math>
gives
General radical: <math>\sqrt[3]{64}=4</math>
gives
Trig. & Log Functions[edit]
Sin, cos, tan, etc.: <math>\sin{(\theta)}</math>
gives
Arcsin, arccos, arctan, etc.: <math>\arcsin{(\theta)}</math>
gives
Log: <math>\log_{5}{5^2}=2</math>
gives
Ln: <math>\ln{e^3}=3</math>
gives
Calculus[edit]
Sum: <math>\sum_{i=1}^{n}i=\frac{n(n+1)}{2}</math>
gives
Limit: <math>\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}</math>
gives
Derivative: <math>\frac{d}{dx}\left[\frac{1}{x}\right]=-\frac{1}{x^2}</math>
gives
Integral: <math>\int_{1}^{x+1}\frac{1}{r}dr</math>
gives
Limit bar: <math>\bigg|_{0}^{1}</math>
gives
Advanced[edit]
Sometimes it might be necessary to break up and align a long equation such as:
To do this use &=
where the equation =
should align and put \begin{align} and \end{align}
at the start and end of <math></math>
. Finally use \\[2ex]
to create the proper space between the lines (if they're too close) and to push the rest of the equation to the next line. The code below renders what is seen above:
<math>
\begin{align}
\int_{0}^{1}\left(3+x\sqrt{x}\right)dx &= \int_{0}^{1}\left(3+x^{1}{x}^{\frac{1}{2}}\right)dx = \int_{0}^{1}\left(3+x^{1+\frac{1}{2}}\right)dx = \int_{0}^{1}\left(3+x^{\frac{3}{2}}\right)dx \\[2ex]
&= 3x+\frac{x^{\frac{3}{2}+1}}{\frac{3}{2}+1}\bigg|_{0}^{1} = 3x+\frac{x^{\tfrac{5}{2}}}{\frac{5}{2}}\bigg|_{0}^{1} = 3x+\frac{2x^{\frac{5}{2}}}{5}\bigg|_{0}^{1} \\[2ex]
&= \left[3(1)+\frac{2(1)^{5/2}}{5}\right]-\left[3(0)+\frac{2(0)^{5/2}}{5}\right] \\[2ex]
&= 3+\frac{2}{5} = \frac{15}{5}+\frac{2}{5} = \frac{17}{5}
\end{align}
</math>