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?

2
  • 5
    Use \begin{aligned}[t]. – muzimuzhi Z Feb 2 at 2:09
  • @muzimuzhiZ This works perfectly, and to me seems closer to what I was asking for than using \text. Only issue is that text afterwards still appears in a weird position (can be fixed with \\ ), but since I forgot to include the text afterwards in my question this works fine. – James A Feb 2 at 2:40
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

1
  • Oh yes, using \text, don't know how I didn't think of that! Thanks! – James A Feb 2 at 2:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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