# How to align the derivation of equation?

The derivation of equation is given below. Can anyone suggest on how to align the equations in such a way that all the equations get covered under same equation number?

\begin{multline}\label{eqn-5.9}
s_{p_m}=\Sigma_{i=1}^{I}\alpha_{i_m}\Sigma_{k=-\infty}^{\infty} f_k e^{jk(\phi_{i_m}-(2\pi p_m/P_m))}\\
=\Sigma_{i=1}^{I}\alpha_{i_m}\Sigma_{k=-\infty}^{\infty} f_k e^{jk\phi_{i_m}-jk2\pi p_m/P_m)}\\
=\Sigma_{k=-\infty}^{\infty} f_k e^{-j(2\pi k p_m/P_m)}\Sigma_{i=1}^{I}\alpha_{i_m}e^{jk\phi_{i_m}}
\end{multline}


The current output obtained is as follows.

• Use \sum instead of \Sigma in this context. Apr 22, 2019 at 10:15

Well, you can use align. Use split also if you want to have the numbering centered and the label is for the whole equation (I don't recommend it though). And, you have \sum for sums, no need to use \Sigma:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
s_{p_m}&=\sum_{i=1}^{I}\alpha_{i_m}\sum_{k=-\infty}^{\infty} f_k e^{jk(\phi_{i_m}-(2\pi p_m/P_m))}\nonumber\\
&=\sum_{i=1}^{I}\alpha_{i_m}\sum_{k=-\infty}^{\infty} f_k e^{jk\phi_{i_m}-jk2\pi p_m/P_m)}\nonumber\\
&=\sum_{k=-\infty}^{\infty} f_k e^{-j(2\pi k p_m/P_m)}\sum_{i=1}^{I}\alpha_{i_m}e^{jk\phi_{i_m}}
\end{align}
\end{document}


Or smaller sum (with in-line style) if you like

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
s_{p_m}&=\textstyle\sum_{i=1}^{I}\alpha_{i_m}\sum_{k=-\infty}^{\infty} f_k e^{jk(\phi_{i_m}-(2\pi p_m/P_m))}\nonumber\\
&=\textstyle\sum_{i=1}^{I}\alpha_{i_m}\sum_{k=-\infty}^{\infty} f_k e^{jk\phi_{i_m}-jk2\pi p_m/P_m)}\nonumber\\
&=\textstyle\sum_{k=-\infty}^{\infty} f_k e^{-j(2\pi k p_m/P_m)}\sum_{i=1}^{I}\alpha_{i_m}e^{jk\phi_{i_m}}
\end{align}
\end{document}


one more possibility:

\documentclass{article}
\usepackage{nccmath}

\begin{document}
$$\label{eqn-5.9} \begin{split} s_{p_m} & = \sum_{i=1}^{I}\alpha_{i_m}\sum_{k=-\infty}^{\infty} f_k\exp\Bigl(jk(\phi_{i_m}-\mfrac{2\pi p_m}{P_m}\Bigr) \\ & = \sum_{i=1}^{I}\alpha_{i_m}\sum_{k=-\infty}^{\infty} f_k\exp\Bigl(jk\phi_{i_m} - \mfrac{jk2\pi p_m}{P_m}\Bigr)\\ & = \sum_{k=-\infty}^{\infty} f_k\exp\Bigl(-j\mfrac{2\pi k p_m}{P_m}\Bigr) \sum_{i=1}^{I}\alpha_{i_m}\exp\Bigl(jk\phi_{i_m}\Bigr) \end{split}$$
\end{document}


It depends on how you would like to have it. I prefer to have the equation number on the last row:

\begin{align}
s_{p_m}&=\Sigma_{i=1}^{I}\alpha_{i_m}\Sigma_{k=-\infty}^{\infty} f_k e^{jk(\phi_{i_m}-(2\pi p_m/P_m))}\nonumber\\
&=\Sigma_{i=1}^{I}\alpha_{i_m}\Sigma_{k=-\infty}^{\infty} f_k e^{jk\phi_{i_m}-jk2\pi p_m/P_m)}\nonumber\\
&=\Sigma_{k=-\infty}^{\infty} f_k e^{-j(2\pi k p_m/P_m)}\Sigma_{i=1}^{I}\alpha_{i_m}e^{jk\phi_{i_m}}
\label{eqn-5.9}
\end{align}


Maybe it is one of these that you want?

\documentclass{article}
\usepackage{mathtools}

\begin{document}

\label{eqn-5.9} \begin{aligned} s_{p_m} & =\Sigma_{i=1}^{I}\alpha_{i_m}\Sigma_{k=-\infty}^{\infty} f_k e^{jk(\phi_{i_m}-(2\pi p_m/P_m))}\\ & =\Sigma_{i=1}^{I}\alpha_{i_m}\Sigma_{k=-\infty}^{\infty} f_k e^{jk\phi_{i_m}-jk2\pi p_m/P_m)}\\ & =\Sigma_{k=-\infty}^{\infty} f_k e^{-j(2\pi k p_m/P_m)}\Sigma_{i=1}^{I}\alpha_{i_m}e^{jk\phi_{i_m}} \end{aligned}

$$\begin{multlined}[0.9\linewidth] s_{p_m} =\Sigma_{i=1}^{I}\alpha_{i_m}\Sigma_{k=-\infty}^{\infty} f_k e^{jk(\phi_{i_m}-(2\pi p_m/P_m))}\\ =\Sigma_{i=1}^{I}\alpha_{i_m}\Sigma_{k=-\infty}^{\infty} f_k e^{jk\phi_{i_m}-jk2\pi p_m/P_m)}\\ =\Sigma_{k=-\infty}^{\infty} f_k e^{-j(2\pi k p_m/P_m)}\Sigma_{i=1}^{I}\alpha_{i_m}e^{jk\phi_{i_m}} \end{multlined}$$

\end{document}