# Alignment of equation number with the end of the line

I' trying to reproduce this equation array from an IEEE paper

you can see that the equation numbers are aligned at the end of the line same as the above statement.

my code:

\begin{IEEEeqnarray}{rCl}
%
I(\lambda)\;\;\; &= &\;\;\;\int_{}^{}\int_{D}^{} g(x,y) e^{i \lambda h (x,y)}dx\,dy.\\
\prod_{j\geq0}^{}\bigg(\sum_{k\geq0}^{}a_{jk} z^k\bigg)\;\;\;\; &=&\;\;\;\;\sum_{n\geq0}^{}z^n \Bigg(\sum_{\substack{k_0,k_1,...\geq0\\k_0+k_+...=n}}^{}a_{0k_0}a_{1k_1} \, . \, . \, . \,\Bigg).\IEEEeqnarraynumspace\\
%
\end{IEEEeqnarray}


It produces:

you can see that the equation numbers shifted to the left and aren't aligned with the above statement.

If I add spaces more, the numbers shift and start to interleave with the statement of the second column in the paper.

So, I want to know how to force the equation numbers to be aligned at the end of the line.

Any help is appreciate. Thanks.

• use the align environment from amsmath and everything will be fine. – user2478 Mar 16 '16 at 8:19

The problem is that the second equation is too wide for the column. However, you just need to fix the wrong things inside it:

1. the \; commands around = should be removed
2. use \iint instead of \int\int
3. \Bigg should be \biggl and \biggr
\documentclass{IEEEtran}
\usepackage{amsmath}

\usepackage{lipsum,xcolor} % just for the example

\begin{document}

%% the line below is a trick to show the margin
\hspace*{\fill}\rlap{\color{red}\smash{\vrule depth 8cm width 0.2pt}}

\lipsum*[2]
\begin{IEEEeqnarray}{rCl}
I(\lambda) &=& \iint_{D} g(x,y) e^{i \lambda h (x,y)}dx\,dy.\\
\prod_{j\geq0}\biggl(\,\sum_{k\geq0}^{}a_{jk} z^k\biggr) &=&
\sum_{n\geq0} z^n
\biggl(
\sum_{\substack{k_0,k_1,\dotsc\geq0\\k_0+k_1+\dotsb=n}}a_{0k_0}a_{1k_1} \dotsm
\biggr).
\IEEEeqnarraynumspace
\end{IEEEeqnarray}
\lipsum[3]

\end{document}