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.
Stefan Kottwitz
  • 231,401
Jon Aird
  • 175

1 Answers1

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

David Carlisle
  • 757,742