# How do I align these equations?

$\frac{dP}{dr}=\frac{-\Big(P+\rho (P)c^2 \Big)} {2} \frac {d\nu} {dr}\]$\\
\newline
$$\Rightarrow d\nu = \frac {-2dP} {P+\rho (P) c^2}$$\\
\bigskip \newline
$$\nu (r) = - \int_{0}^{P(r)} \frac {2dP}{P+\rho (P) c^2} + \nu (r_b)$$
\newline
\newline
\newline
$$e^{\nu(r)} &= e^{\nu(r_b) - \int_{0}^{P(r)} \frac {2dP}{P+\rho (P) c^2} }$$
\newline

$$e^ {\nu (r)}= e^{\nu(r_b)} exp \Big[-\int_{0}^{P(r)} \frac {2dP}{P+\rho (P) c^2} \Big]$$


I am New to Latex so my codes look trivial , can you please align these equations for me ?

-

By using the align* environment (provided by the amsmath package), one can group the five equations and align them horizontally. You didn't say how they should be aligned, so I've assumed they ought to be aligned on the respective = symbols.

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\frac{dP}{dr}&=\frac{-\bigl(P+\rho (P)c^2 \bigr)} {2}
\frac {d\nu} {dr}\\
\Rightarrow d\nu &= \frac {-2dP} {P+\rho (P) c^2} \\
\nu (r) &= - \int_{0}^{P(r)} \frac {2dP}{P+\rho (P) c^2} + \nu (r_b)\\
e^{\nu(r)} &= \exp\biggl[\nu(r_b) -  \int_{0}^{P(r)}
\frac {2dP}{P+\rho (P) c^2} \biggr]\\
e^ {\nu (r)}&= e^{\nu(r_b)} \exp \biggl[-\int_{0}^{P(r)}
\frac {2dP}{P+\rho (P) c^2} \biggr]
\end{align*}
\end{document}


The biggest change, obviously, is the use of the align* environment and the elimination of all \newline instructions. Some other changes: Use of \bigl( and \bigr) in the first line (you were using \Big( and \Big)); use of \biggl[ and \biggr] in the last two lines; and, use of \exp in the final two lines (note that the "exp" string is set in upright letters).

See also the posting What are the differences between , [, align, equation and displaymath? for a discussion of how these display-math environments differ.

-
This is exactly what I needed. –  Tazkera Haque Trina Aug 7 at 4:59

Is this what you're looking for?

\begin{align*}
\frac{dP}{dr}=\frac{-\left(P+\rho (P)c^2 \right)}{2} \frac {d\nu}{dr}\Rightarrow d\nu &= \frac {-2dP} {P+\rho (P) c^2}\\
\nu (r) &= \nu (r_b)- \int_{0}^{P(r)} \frac {2dP}{P+\rho (P) c^2}  \\
e^{\nu(r)} &= e^{\nu(r_b) - \int_{0}^{P(r)} \frac {2dP}{P+\rho (P) c^2} }\\
e^ {\nu (r)}&= e^{\nu(r_b)} \exp \left(-\int_{0}^{P(r)} \frac {2dP}{P+\rho (P) c^2} \right)\end{align*}

-
Thank you, it would have been better if the "implies" that equation starts from line 2, instead of from right of the first equation. can You do that ? –  Tazkera Haque Trina Aug 7 at 4:46