# Breaking an equation in a desired case

Although there are some ways to breaking an equation even at TexStack but they could not help me. I have an equation which is written below:

\begin{eqnarray}
\langle ABCD\rangle&=&\frac{1}{400} \left[ 20 \cos \left(\frac{x}{2}\right)\Nonumber\\
&+&35 \cos \left(\frac{3 x}{2}\right)\right]\nonumber\\
\label{eq:what}
\end{eqnarray}


It yields me a shape of equation which is not my desired. I upload the shape on which I bring out my desired case by a pen of paint. Desired cases are:

1. Replacement of 3 numbers of equation I should have just one appropriate number in the second line.
2. Two Cos functions should be put under each other.
3. The symbol of "+" should move to the upper line.
4. The symbol "]" must be put in the end of equation.

Here is how to do it with align. Not only is eqnarray deprecated but its spacing around alignment point is often not good.

Alternatively, as mentioned by Barbara Beeton, one can use the split environnment, within equation:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
\langle ABCD\rangle=\frac{1}{400}\Bigl[ & 20\cos\Bigl(\frac{x}{2}\Bigr)+ \notag \\
& 35\cos\Bigl(\frac{3 x}{2}\Bigr)\Bigr]
\label{eq:what}
\end{align}

$$\begin{split} \langle ABCD\rangle=\frac{1}{400}\Bigl[ &20\cos\Bigl(\frac{x}{2}\Bigr)+ \\ & 35\cos\Bigl(\frac{3 x}{2}\Bigr)\Bigr] \end{split} \label{eq:what}$$

\end{document}


• equation and split would also do it. Nov 29, 2015 at 18:40
• It is so nice and amazing........ Nov 29, 2015 at 19:26

Another possibilities by using mathtools and multilined environment:

\documentclass[twocolumn]{article}
\usepackage{mathtools}

\begin{document}
$$\label{eq:what} \begin{multlined}[5cm] \langle ABCD\rangle = \frac{1}{400}\left[20\cos\left(\frac{x}{2}\right)\right. + \\[1ex] \left.35\cos\left(\frac{3 x}{2}\right)\right] \end{multlined}$$
\end{document}


In this case you still can proper use \left[... and ...\right] with paired\right.andleft. respectively.

• Wonderful and excellent.... Nov 29, 2015 at 19:27

This should be the code you're looking for. If I remember right, \left[ \right] does not work over multiple lines. Thus, you have to adjust the size of [ and ] in the lines with \big or \Big etc.

Furthermore, the undesired equation numbers come from \ at your last line. You don't need another line, do you? So you can omit the \, which lead to an enumeration of an empty line.

    \begin{eqnarray}
\langle ABCD\rangle=\frac{1}{400}&\Big[{20}\cos\left(\frac{x}{2}\right)+ \notag\\
&\phantom{\Big[}{35}\cos\left(\frac{3 x}{2}\right)\Big]
\label{eq:what}
\end{eqnarray}

• Thanks to you. But if we have for example cos(2x)+ cos(3x/2) +cos(x)+ a constant such 100, if we wan to to have two terms in the first line and the two other terms in the second line, the second line will not begin at the place of starting point of the first line!! Nov 29, 2015 at 10:47
• eqnarray is quite outdated!
– user31729
Nov 29, 2015 at 10:49
• The use of & regulates the positioning. Nov 29, 2015 at 10:52
• I would be so glad if you tell me what can be replaced to eqnarray? Nov 29, 2015 at 10:53
• You should use align in my opinion. If you want to omit the equation numbers in general, you can use align*` Nov 29, 2015 at 10:53