0
Breaking up long equations in Latex
Posted by Derek Jing
on
11:50 PM
in
Latex
Let us first see an example of a long equation. (Note, when you view the example document for this topic, you will see that this equation is in fact wider than the text width. It's not as obvious on this webpage!)
Latex doesn't break long equations to make them fit within the margins as it does with normal text. It is therefore up to you to format the equation appropriately (if they overrun the margin.) This typically requires some creative use of an eqnarray to get elements shifted to a new line and to align nicely. E.g.,

\begin{eqnarray*}
\left(1+x\right)^n & = & 1 + nx + \frac{n\left(n-1\right)}{2!}x^2 \\
& & + \frac{n\left(n-1\right)\left(n-2\right)}{3!}x^3 \\
& & + \frac{n\left(n-1\right)\left(n-2\right)\left(n-3\right)}{4!}x^4 \\
& & + \ldots
\end{eqnarray*}
\begin{eqnarray*}
\left(1+x\right)^n & = & 1 + nx + \frac{n\left(n-1\right)}{2!}x^2 \\
& & + \frac{n\left(n-1\right)\left(n-2\right)}{3!}x^3 \\
& & + \frac{n\left(n-1\right)\left(n-2\right)\left(n-3\right)}{4!}x^4 \\
& & + \ldots
\end{eqnarray*}
Post a Comment