[Tex/LaTex] How to put equation number only at the last step of a multi-line calculation

equationsnumbering

I have to write a calculation that takes two lines. I need to put number only at the last step. How do I do that? I used \nonumber at the end of the first line where I don't want to put equation number. But the number is being shown on the first line and not on the last line.

for example:

\begin{eqnarray}
\dot{\epsilon}&=& u_\mu u_\nu\Bigl(\dot{I}^{\mu\nu}_{(0)+}+\dot{I}^{\mu\nu}_{(0)-}\Bigr)\\
&=& u_\mu u_\nu\int\mathrm{dp}~p^\mu p^\nu\bigl(\dot{f}_{(0)}+\dot{\bar{f}}_{(0)})
\label{eq:1}
\end{eqnarray}

Best Answer

Don't use eqnarray ! It yields bad spacing. Replace it with one of the amsmath environments. Here you can use an aligned environment, with option [b], nested in equation:

\documentclass[11pt]{article}

\usepackage{amsmath}

\begin{document}

\begin{equation}
\begin{aligned}[b]
\dot{\epsilon}&= u_\mu u_\nu\Bigl(\dot{I}^{\mu\nu}_{(0)+}+\dot{I}^{\mu\nu}_{(0)-}\Bigr)\\
&= u_\mu u_\nu\int\mathrm{dp}~p^\mu p^\nu\bigl(\dot{f}_{(0)}+\dot{\bar{f}}_{(0)})
\end{aligned}
\label{eq:1}
\end{equation}

\end{document}

enter image description here

Related Question