Show the Steps Taken to Solve an Equation
You should consider using amsmath
:
\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{align*}
x^2 + 2x + 1 &= 0 \\
(x+1)^2 &= 0 \\
\llap{$\rightarrow$\hspace{50pt}} x &= -1
\end{align*}
\end{document}
Try this:
\begin{eqnarray}
x^2+2x+1 &=& 0 \nonumber \\
(x+1)^2 &=& 0 \nonumber \\
x & = & -1
\end{eqnarray}
You might want to number each step by removing the \nonumber
commands; I only numbered the last one.
More examples here.
There is a really neat package called witharrows
that does a really nice job of what you're trying to do. It creates an environment called WithArrows
that takes the place of aligned
. There are several tweaks you can use to adjust the spacing, color, and types of arrows used to describe the steps.
Here is an MWE:
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{witharrows}
%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{equation}
\setlength{\jot}{10pt}
\begin{WithArrows}
ax^2 + bx + c & = 0 \Arrow[xoffset=-2cm]{Multiply both sides by $4a$} \\
4a^2 x^2 + 4abx + 4ac & = 0 \Arrow[xoffset=-1cm]{Subtract $4ac$} \\
4a^2 x^2 + 4abx & = - 4ac \\
4a^2 x^2 + 4abx + b^2 & = b^2 - 4ac \\
(2ax + b)^2 & = b^2 - 4ac \\
2ax + b & = \pm \sqrt{b^2 - 4ac} \\
2ax & = -b \pm \sqrt{b^2 - 4ac}
\end{WithArrows}
\nonumber
\end{equation}
\end{document}
Here is the output: