Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
$\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 ?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

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.

enter image description here

\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.

share|improve this answer
    
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*}
share|improve this answer
    
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.