1

I want to write the following in LaTeX (without the horizontal ruled lines): enter image description here where the equals signs are vertically aligned with each other.

I found this question and this one which both suggest using the aligned environment. I tried the following:

\documentclass[a4paper, 12pt]{report}
\usepackage{amsmath}
\begin{document}
By the quotient rule, 
\(\begin{aligned}
f'(x)&=\frac{v(x)u'(x)-u(x)v'(x)}{(v(x))^2}\\
&=\frac{(2x-2)(2)-(2x+2)(2)}{(2x-2)^2}\\
&=\frac{4x-4-4x+4}{(2x-2)^2}
\end{aligned}\)
\end{document}

But it gave me this enter image description here instead of what I wanted.

Is there any way to begin the aligning with an inline equation like what I wrote?

1 Answers1

1

Do you mean like this?

\documentclass[a4paper, 12pt]{report}
\usepackage{amsmath}
\begin{document}

(\begin{aligned} \text{By the quotient rule,}\quad f'(x)&=\frac{v(x)u'(x)-u(x)v'(x)}{(v(x))^2}\ &=\frac{(2x-2)(2)-(2x+2)(2)}{(2x-2)^2}\ &=\frac{4x-4-4x+4}{(2x-2)^2} \end{aligned}) \end{document}

enter image description here

Roland
  • 6,655