# How to break a line in a long equation?

I am using a class named abntex2 and I don't know how to break an equation. I've tried inserting a package amsmath, breqn, mathtools, but it does not work.

I type:

\usepackage{amsmath}


...

and when I insert the equation, I write:

$$\begin{multlined} \left({{\varphi}^{x}{\frac{\partial}{{\partial}u_{x}}}+{\varphi}^{t}{\frac{\partial}{{\partial}u_{t}}} \\ +{\varphi}^{xx}{\frac{\partial}{{\partial}u_{xx}}}+{\varphi}^{xt}{\frac{\partial}{{\partial}u_{xt}}} \\ +{\varphi}^{tt}{\frac{\partial}{{\partial}u_{tt}}}+{\varphi}^{xxx}{\frac{\partial}{{\partial}u_{xxx}}}}\right){\left(u_{t}+u_{xxx}+mu^{m-1}u_{x}\right)} \\ ={\varphi}^{x}{\left({mu^{m-1}}\right)}+{\varphi}^{t}+{\varphi}^{xxx}$$
\end{multlined}


But the double bar does not work. What am I supposed to do?

• Use multline. Sorry for abnt rules. Mar 21, 2014 at 0:17
• Welcome to TeX.SX! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). Mar 21, 2014 at 0:17
• Yes, Sigur, but i've used {multline} too. Mar 21, 2014 at 0:30
• Please post a complete Minimal (non-)Working Example. Much more useful than code fragments.
– cfr
Mar 21, 2014 at 0:51
• it wouldn't solve all problems, but if comes before \begin{xxx}, then \end{equation has to come after \end{xxx}. proper nesting is a must. Mar 21, 2014 at 2:02

You have mixed up the equation and multiline environments. Also it is multline not multlined. Further, I have removed many braces that seemed un-necessary. You have used many of them.

\documentclass{article}

\usepackage{amsmath}
\begin{document}
%$$\begin{multline} \biggl(\varphi^{x}{\frac{\partial}{\partial u_{x}}}+\varphi^{t}\frac{\partial}{\partial u_{t}} +\varphi^{xx}\frac{\partial}{\partial u_{xx}}+\varphi^{xt}\frac{\partial}{\partial u_{xt}} \\ +\varphi^{tt}\frac{\partial}{\partial u_{tt}}+\varphi^{xxx}\frac{\partial}{\partial u_{xxx}}\biggr)\left(u_{t}+u_{xxx}+mu^{m-1}u_{x}\right) \\ =\varphi^{x}{\left(mu^{m-1}\right)}+\varphi^{t}+\varphi^{xxx} %$$
\end{multline}
\end{document}


Also note that you can't use \left( and \right) across lines. I have used biggl( and \biggr) which do not have this constraint. For details, please refer to amsmath documentation (texdoc amsldoc from command prompt)

To use \left( and \right) across lines you have to use the placeholders \right. and left., see how here:

\documentclass{article}

\usepackage{amsmath}
\begin{document}
%$$\begin{multline} \left(\varphi^{x}{\frac{\partial}{\partial u_{x}}}+\varphi^{t}\frac{\partial}{\partial u_{t}} +\varphi^{xx}\frac{\partial}{\partial u_{xx}}+\varphi^{xt}\frac{\partial}{\partial u_{xt}} \right. \\ \left. +\varphi^{tt}\frac{\partial}{\partial u_{tt}}+\varphi^{xxx}\frac{\partial}{\partial u_{xxx}}\right)\left(u_{t}+u_{xxx}+mu^{m-1}u_{x}\right) \\ =\varphi^{x}{\left(mu^{m-1}\right)}+\varphi^{t}+\varphi^{xxx} %$$
\end{multline}
\end{document}


note the \right. \\ at the end of the first line and \left. at the beginning of the second. The visual outcome is the same as above.

Another option using split:

\documentclass{article}

\usepackage{amsmath}
\begin{document}
$$\begin{split} &\biggl(\varphi^{x}{\frac{\partial}{\partial u_{x}}}+\varphi^{t}\frac{\partial}{\partial u_{t}} +\varphi^{xx}\frac{\partial}{\partial u_{xx}}+\varphi^{xt}\frac{\partial}{\partial u_{xt}} \\ & \quad+\varphi^{tt}\frac{\partial}{\partial u_{tt}}+\varphi^{xxx}\frac{\partial}{\partial u_{xxx}}\biggr)\left(u_{t}+u_{xxx}+mu^{m-1}u_{x}\right) \\ &\qquad \quad {}={}\varphi^{x}{\left(mu^{m-1}\right)}+\varphi^{t}+\varphi^{xxx} \end{split}$$
\end{document}


• the solution to \left( and \right) across lines is to use the phantom placeholders \right. and \left. respectively at the end and the beginning of the line Mar 21, 2014 at 14:36
• @Federico \left and \right is to be used very judiciously as it is not needed most of the times. \bigl and brothers are sufficient in most of the cases. :)
– user11232
Mar 21, 2014 at 22:33

Some slight change to ease the typing of the equation given in Harish Kumar's answer. Use the commath package to typeset the derivatives easily.

\documentclass{article}

\usepackage{amsmath,commath}

\begin{document}
$$\begin{split} &\biggl(\varphi^{x}\dpd{}{u_{x}}+ \varphi^{t}\dpd{}{u_{t}} +\varphi^{xx}\dpd{}{u_{xx}}+\varphi^{xt}\dpd{}{u_{xt}} \\ & \quad+\varphi^{tt}\dpd{}{u_{tt}}+\varphi^{xxx}\dpd{}{u_{xxx}} \biggr)\left(u_{t}+u_{xxx}+mu^{m-1}u_{x}\right) \\ & \qquad \quad {}={}\varphi^{x}{\left(mu^{m-1}\right)}+ \varphi^{t}+\varphi^{xxx} \end{split}$$
\end{document}