# Second line of equation shifted

How is it possible to move the second line of the equation to begin few spaces to the right like this: So all the after lines will start at the same place.

My code looks as following:

\begin{align}
&b_{PWM}(t) = D + \frac{M}{2} \text{cos}(\omega_{1}t + \theta_{1})
\\
&+ \sum_{m=1}^{+\infty} \frac{1}{m\pi} \left\{\text{sin}\left[m(\omega_{c}t+\theta_{c})\right] -J_{0}(m\pi M) \cdot \text{sin} \left[m(\omega_{c}t+\theta_{c}) - 2mD\pi \right] \right\}
\\
& + \sum_{m=1}^{+\infty} \sum_{n=\pm 1}^{\pm \infty} \frac{J_{n}(m \pi M)}{m \pi} \cdot \text{sin} \left[ \frac{n \pi}{2} - m(\omega_{c}t + \theta_{c}) -n(\omega_{1}t + \theta_{1}) +2mD \pi \right]
\end{align}


and the result I get is: Thank you

• Please help us with a code showing your problem. What you want to achieve is not clear. – Denis Sep 21 '18 at 13:01
• (1) welcome, (2) assuming you are using align* from amsmath, align on the right of the = by using = {} & and align in front of the + on the second line using & + – daleif Sep 21 '18 at 13:09
• \text{cos} is really wrong: \cos is the command to use. Similarly for the sine. – egreg Sep 21 '18 at 13:43
• The last image does not correspond to the code given. Also please always post full minimal examples not just sniplets where others have to guess the test of the document in order to test your code. – daleif Sep 21 '18 at 13:50

## 1 Answer

If the equation is unnumbered, use align* from the amsmath environment, and set the alignment points to, say, +. If the equation is numbered, insert a split or an aligned environment within equation:

\documentclass{article}

\usepackage{mathtools}
\usepackage{geometry}

\begin{document}

\begin{equation}
\begin{split}b_{\mathrm{bwp}}(t) = D & +\frac{M}{2}\cos(ω_1t + θ_1) \\
& + \sum_{m=1}^{+\infty}\frac{1}{m\pi}\sin[m(ω_ct + θ_c)]
\end{split}
\end{equation}

\end{document} • I get error saying split won't work here – Ben Sep 21 '18 at 13:41
• I can't really understand the difference between “numbered” and “unnumbered”. The solution with split is the same whether you embed it either in equation or in equation*. – egreg Sep 21 '18 at 13:42
• What I had in head is that for unnumbered equation, one doesn't have to nest an environment within another. A single align* will do (b.t.w., thanks for the edit!) – Bernard Sep 21 '18 at 13:51
• @Bernard Yes, it would do, but at the expense of uniformity. Say the coauthor or advisor tells you “that equation must be numbered”, you have to change align* into equation with a nested split; if you use equation* from the outset, you have just to remove a couple of asterisks. – egreg Sep 21 '18 at 14:00
• @ben No, in the example it works, so you seem to be doing something different. We can't know what. – egreg Sep 21 '18 at 17:28