2

I'm trying to split up the following equation so that it fits the margins of my document, so far I have:

\documentclass{article}

\usepackage{amsmath}

\begin{document} 

\begin{equation}
0 = n_1^3 n_2 n_3^2(\lambda+\mu)^2 +n_1 n_2^3 n_3^2(\lambda + \mu)^2  + (\lambda + \mu)(\mu - \rho c^2)n_1^3 n_2 + (\lambda + \mu)(\mu - \rho c^2) n_1 n_2^3 + n_1 n_2 n_3^2 (\lambda + \mu)(\mu - \rho c^2) + n_1 n_2 (\mu- \rho c^2)^2 - n_1^3 n_2 n_3^2 (\lambda + \mu)^2 - n_1 n_2^3 n_3^2 (\lambda + \mu)^2 
\end{equation}

\end{document} 

How do I make the equation split so that it fits?

3

You have eight summands on the right-hand side, split them two for each line:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{equation}
\begin{split}
0 ={}&
n_1^3 n_2 n_3^2(\lambda+\mu)^2 +n_1 n_2^3 n_3^2(\lambda + \mu)^2 \\
&+ (\lambda + \mu)(\mu - \rho c^2)n_1^3 n_2 + (\lambda + \mu)(\mu - \rho c^2) n_1 n_2^3 \\
&+ n_1 n_2 n_3^2 (\lambda + \mu)(\mu - \rho c^2) + n_1 n_2 (\mu- \rho c^2)^2 \\
&- n_1^3 n_2 n_3^2 (\lambda + \mu)^2 - n_1 n_2^3 n_3^2 (\lambda + \mu)^2
\end{split}
\end{equation}

\end{document}

enter image description here

  • Nice trick with ={} to get the right indentation on the later lines! – Andrew Mar 23 '16 at 12:12
  • @Andrew A different trick is having &= in the first line and &\qquad+ in the later ones. – egreg Mar 23 '16 at 12:16
2

I'd use an align environment coupled with some \notag commands to prevent multiple equation numbers and some \quad's for spacing:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

  \begin{align}
  0&= n_1^3 n_2 n_3^2(\lambda+\mu)^2 +n_1 n_2^3 n_3^2(\lambda + \mu)^2
      +(\lambda + \mu)(\mu - \rho c^2)n_1^3 n_2\notag\\
    &\quad +(\lambda + \mu)(\mu - \rho c^2) n_1 n_2^3
      + n_1 n_2 n_3^2 (\lambda + \mu)(\mu - \rho c^2) + n_1 n_2 (\mu- \rho c^2)^2 \\
    &\quad - n_1^3 n_2 n_3^2 (\lambda + \mu)^2 - n_1 n_2^3 n_3^2 (\lambda + \mu)^2\notag
  \end{align}

\end{document}

This gives:

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.