How to align terms in separate lines in this case?
Since you have multiple alignment points, could use the alignedat
:
Notes:
- I used
\rlap
on the two lines so it won't effect the other alignment points. - The
\hphantom{{}={}}
was used to ensure that space was left equivalent to the=
. The additional{}
on either side of the equal ensures that the=
is treated as a relational operator. - The
alignedat
(similar toalignat
) requires information as to the number of columns. The rule of thumb is to use half the of 1 + maximum number of&
s in any row (rounded up in case of fractional result). I usually just use a number that is large enough so that there are not syntax errors. Have not yet encountered a problem with using a number larger that required. But in this case it appears that3
is enough.
References:
- For more info on
\rlap
see Can I use \clap, \rlap and \llap in math mode? and the links provided there.
Code:
\documentclass[twocolumn]{article}
\usepackage[a4paper,margin=1cm]{geometry}
\usepackage{amsmath}
\begin{document}
\begin{enumerate}
\item The degree of (C) is 3.
\item The degree of (A) is 1.
\item%
$\!
\begin{alignedat}[t]{4}
-3x(x+1)&-2x(x-1)\\
&+4(x^2-3x-1)
&&=\rlap{$-3x^2-3x-2x^2+2x+v$} \\
& &&\hphantom{{}={}}{+}4x^2&&-12x-4\\
& &&=-3x^2 &&-3x-2x^2+2x+v \\
& && &&+4x^2-12x-4 \\
& &&=\rlap{$-x^2-13x-4$}
\end{alignedat}
$
\end{enumerate}
\end{document}
An array
provides rudimentary control over the display and alignment:
\documentclass[twocolumn]{article}
%\usepackage[a4paper,margin=1cm]{geometry}% http://ctan.org/pkg/geometry
%\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{enumerate}
\item The degree of (C) is 3.
\item The degree of (A) is 1.
\item $\renewcommand{\arraystretch}{1.2}
\begin{array}[t]{@{}l@{}l}
-3x(x+1)-2x(x-1) \\
\phantom{-3x(x+1)}+4(x^2-3x-1)
&{}= -3x^2-3x-2x^2+2x+v \\
&\phantom{{}={}}{}+4x^2-12x-4 \\
&{}=-3x^2-3x-2x^2+2x+v \\
&\phantom{{}=-3x^2}+4x^2-12x-4 \\
&{}= -x^2-13x-4
\end{array}
$
\end{enumerate}
\end{document}