TransWikia.com

This equation keep giving me error messages

TeX - LaTeX Asked by cabbage dude on December 17, 2020

I am trying to post a explanation on aops and it keeps saying

Error compiling LaTeX. ! File ended while scanning use of align*.

Please get back ASAP, it’s homework thanks in advance.

begin{align*}
frac{6sqrt{{(x+1)(x+3)+1}-12}{2x}
&=frac{6sqrt{x^2+4x+3+1}-12}{2x}
&=frac{6sqrt{x^2+4x+4}-12}{2x}
&=frac{6(x+2)-12}{2x}
&=frac{6x+12-12}{2x}
&=frac{6x}{2x}=3
end{align*}

3 Answers

Note

  • align* environment enters math mode for you, so there is node need to wrap it in between $$ ... $$.
  • The left brace of numerator of first frac is never closed by a pairing right brace.
  • You might need & mathrel{phantom{=}} prepended to first line of align*.
documentclass{article}
usepackage{amsmath}

begin{document}
begin{align*}
     & mathrel{phantom{=}}frac{6sqrt{{(x+1)(x+3)+1}-12}}{2x} 
     & =frac{6sqrt{x^2+4x+3+1}-12}{2x}                         
     & =frac{6sqrt{x^2+4x+4}-12}{2x}                           
     & =frac{6(x+2)-12}{2x}                                     
     & =frac{6x+12-12}{2x}                                      
     & =frac{6x}{2x}=3
end{align*}
end{document}

enter image description here

Correct answer by muzimuzhi Z on December 17, 2020

Errors in the first line are the cause, ie mismatched { }. A fix is:

begin{align*}
frac{6sqrt{(x+1)(x+3)+1}-12}{2x}
&=frac{6sqrt{x^2+4x+3+1}-12}{2x} 
&=frac{6sqrt{x^2+4x+4}-12}{2x} 
&=frac{6(x+2)-12}{2x} 
&=frac{6x+12-12}{2x} 
&=frac{6x}{2x} = 3
end{align*}

which produces:

enter image description here

Answered by Leucippus on December 17, 2020

Your problems is already solved in other answers, but you may liked the following solution which employ the instruction MoveEqLeft defined in the mathtools package:

documentclass{article}
usepackage{mathtools}

begin{document}
begin{align*}
    MoveEqLeft[3]
frac{6sqrt{{(x+1)(x+3)+1}-12}}{2x}        
     & =frac{6sqrt{x^2+4x+3+1}-12}{2x}     
       =frac{6sqrt{x^2+4x+4}-12}{2x}       & =frac{6(x+2)-12}{2x}                 
       =frac{6x+12-12}{2x}                 
     & =frac{6x}{2x}=3
end{align*}
end{document}

enter image description here

(red lines indicate text area borders)

Answered by Zarko on December 17, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP