3

I'm getting errors in the align environment that I'm not getting for the exact same line that compiles without error in the equation one and I can't figure it out. Can someone shed some light on this? Here's the code:

\begin{align*}
t\left(2^{\left(m+1\right)} \right) &= t\left(\frac{2^{\left(m+1\right)}}            
{2}\right)+3\log 2^{\left(m+1\right)}\\ 
&= t\left(2^m\right)+3\left(m+1\right)\\ &=t'\left(2^m)+3(m+1)\\ 
&=\frac{3\left(\log_2 n\right)\left(\log_2 n+1\right)}  {2}
\end{align*}

the error is showing up for the last line:

! Extra }, or forgotten \right.
! Missing \right. inserted.
3

You have a missing \right in

&=t'\left(2^m)+3(m+1)\

Corrected code:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align*}
t\left(2^{\left(m+1\right)} \right) 
      &= t\left(\frac{2^{\left(m+1\right)}}
        {2}\right)+3\log 2^{\left(m+1\right)}\\
      &= t\left(2^m\right)+3\left(m+1\right)\\ 
      &=t'\left(2^m\right)+3(m+1)\\
      &=\frac{3\left(\log_2 n\right)\left(\log_2 n+1\right)}  {2}
      \end{align*}

\end{document}

enter image description here

| improve this answer | |
  • You were faster than me!! lol – Sigur Oct 27 '12 at 23:30

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.