# Breaking equation - Problem with brackets

I want to break a long equation in LaTex. I have tried multline and align but I always get errors with the brackets.

$$\dfrac{dr_{ij}}{dt} = \frac{1}{2r_{ij}} \left[ 2 \left( x_{i}-x_{j} \right) \left( \dfrac{dx_{i}}{dt} - \dfrac{dx_{j}}{dt} \right) + 2 \left( y_{i}-y_{j} \right) \left( \dfrac{dy_{i}}{dt} - \dfrac{dy_{j}}{dt} \right) + 2 \left( z_{i}-z_{j} \right) \left( \dfrac{dz_{i}}{dt} - \dfrac{dz_{j}}{dt} \right) \right]$$


I want to break it in a way, so that all the three "2"s are below each other. How can I do that without getting an error with the brackets?

-

If you need to split large brackets across lines of an equation, it's easiest to set their size manually.

\documentclass[10pt]{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
\dfrac{dr_{ij}}{dt} = \frac{1}{2r_{ij}} \biggl[
&2 ( x_{i}-x_{j}) \left( \dfrac{dx_{i}}{dt} - \dfrac{dx_{j}}{dt} \right) \nonumber \\
{}+{} &2 ( y_{i}-y_{j}) \left( \dfrac{dy_{i}}{dt} - \dfrac{dy_{j}}{dt} \right) \nonumber \\
{}+{} &2 ( z_{i}-z_{j}) \left( \dfrac{dz_{i}}{dt} - \dfrac{dz_{j}}{dt} \right) \biggr]
\end{align}
\end{document}

-

This is a job for split:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$\begin{split} \frac{dr_{ij}}{dt} = \frac{1}{2r_{ij}} \biggl[ & 2 \left( x_{i}-x_{j} \right) \left( \dfrac{dx_{i}}{dt} - \dfrac{dx_{j}}{dt} \right) + {}\\ & 2 \left( y_{i}-y_{j} \right) \left( \dfrac{dy_{i}}{dt} - \dfrac{dy_{j}}{dt} \right) + {}\\ & 2 \left( z_{i}-z_{j} \right) \left( \dfrac{dz_{i}}{dt} - \dfrac{dz_{j}}{dt} \right) \biggr] \end{split}$$
\end{document}


Note that we have to manually specify the size for the outermost braces, because \left and \right cannot be divided across lines.

-
you should probably also mention that you've specified the size of the outermost brackets manually instead of using \left ... \right, since those can't be separated across lines. – barbara beeton Apr 21 '14 at 15:35
@barbarabeeton Done, thanks. – egreg Apr 21 '14 at 16:00
Is there any way to use \left ... \right or any way that adapts the brackets' size automatically? – user50224 Apr 21 '14 at 19:41
@user50224 Sorry, no. – egreg Apr 21 '14 at 19:50
@user50224 I try to avoid compound fractions in the first place. \left[<formula>\right. and \left.<formula>\right] with some \vphantom may help. – egreg Apr 21 '14 at 20:13