# Aligning a set of equations

I'm currently writing a dissertation using Texmaker and I'm fairly new to it! I have a set of three equations that I want to align so that they all start underneath each other on the left.

I have tried this:

\documentclass[11pt]{article}

\usepackage{amsmath}
\usepackage{graphicx}

\begin{document}

\begin{aligned} \rho = \int_{2MG}^r \sqrt{g_{rr}(r')} dr' \\ = \int_{2MG}^{r} (1-\dfrac{2MG}{r'})^{-0.5} dr' \\ = \sqrt{r(r-2MG)}+2MGsinh^{-1} (\sqrt{\dfrac{r}{2MG}-1)}\end{aligned}
\end{document}


It doesn't seem to work as I want it!

Can anyone please offer me some words of wisdom?

• Welcome to TeX.SX! Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. Also, see tex.stackexchange.com/questions/503/why-is-preferable-to?lq=1 – jub0bs Jan 19 '14 at 11:51

An option with equation numbers:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align}
\rho &= \int_{2MG}^r \sqrt{g_{rr}(r')} dr' \\
&= \int_{2MG}^{r} (1-\dfrac{2MG}{r'})^{-0.5} dr' \\
&= \sqrt{r(r-2MG)}+2MG\sinh^{-1} (\sqrt{\dfrac{r}{2MG}-1)}
\end{align}

\end{document}


Without equation numbers:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{align*}
\rho &= \int_{2MG}^r \sqrt{g_{rr}(r')} dr' \\
&= \int_{2MG}^{r} (1-\dfrac{2MG}{r'})^{-0.5} dr' \\
&= \sqrt{r(r-2MG)}+2MG\sinh^{-1} (\sqrt{\dfrac{r}{2MG}-1)}
\end{align*}

\end{document}


• Oh that works brilliantly thank you! How do I get rid of the numbers that appear on the right hand side? – Sarah Usher Jan 19 '14 at 11:57
• Use \begin{align*} ... \end{align*} ... – user13907 Jan 19 '14 at 11:58
• Also, use \sinh in your equation. – user13907 Jan 19 '14 at 12:10

Since yours is a single equation, it is always better to use the combination equation-split instead of align:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\textbf{Numbered equation}

$$\begin{split} \rho &= \int_{2MG}^r \sqrt{g_{rr}(r')}\,dr' \\ &= \int_{2MG}^{r} \biggl(1-\dfrac{2MG}{r'}\biggr)^{\!-0.5} dr' \\ &= \sqrt{r(r-2MG)}+2MG\sinh^{-1} \biggl(\sqrt{\dfrac{r}{2MG}-1}\,\biggr) \end{split}$$

\bigskip
\textbf{Unnumbered equation}

\begin{equation*}$$\begin{split} \rho &= \int_{2MG}^r \sqrt{g_{rr}(r')}\,dr' \\ &= \int_{2MG}^{r} \biggl(1-\dfrac{2MG}{r'}\biggr)^{\!-0.5} dr' \\ &= \sqrt{r(r-2MG)}+2MG\sinh^{-1} \biggl(\sqrt{\dfrac{r}{2MG}-1}\,\biggr) \end{split}$$\end{equation*}

\end{document}


I've also added some \biggl(-\biggr) to have better looking parenthesis and added some (positive and negative) spacing around.

Here is a possible solution:

\documentclass{article}

\usepackage{amsmath}
\newcommand*\differential[1]{\mathop{}\!\mathrm{d}#1}

\begin{document}

\begin{equation*}
\begin{split}
\rho
&= \int_{2MG}^{r} \sqrt{g_{rr}(r')} \differential{r'}\\
&= \int_{2MG}^{r} {\mkern -5mu}\left(1 - \frac{2MG}{r'}\right)^{\mkern -4mu -0.5} \differential{r'}\\
&= \sqrt{r(r - 2MG)} + 2MG\sinh^{-1}{\mkern -8mu}\left(\sqrt{\frac{r}{2MG}} - 1\right){\mkern -5mu}.
\end{split}
\end{equation*}

\end{document}


• There is no need for loading the graphicx package in this case.
• Use, say, $...$ instead of $$...$$ for highlighted math expressions.
• There is no need for both  (which you shouldn't use at all) and aligned; you are declaring a math environment inside a math environment.
• Notice the use of the combination of split inside equation* instead of aligned in order to get a single, vertically centered number for the equation block.
• There is no need for \dfrac here; \frac will suffice.
• I have used \left(/\right) in order to automatically scale the parentheses.
• I've added negative space around \left(/\right) (via \mkern) in order to get a better horizontal spacing.
• Use the macro \sinh instead of just typing sinh; it is a math operator.
• I have defined the macro \differential for the differential. (To quote Basil Fawlty from Fawlty Towers: "[...] Special subject: The bleedin' obvious".)