[Tex/LaTex] Latex align error

align

Why does the following code give me this error?:

"Extra } or forgotten \right)"

I have been through it and cannot work out why.

\begin{align}
C(t,xxx,\tau,N,X)&=N\Phi\sum_{i=1}^{n}\left[-(1+X_{\tau_{i}})P(t,T_{i})\left(\frac{\ln\frac{P(t,T_{i-1})}{(1+X_{\tau_{i}}P(t,T_{i})}}{\Sigma(t,T_{i-1},T_{i})}-\frac{1}{2}\Sigma(t,T_{i-1},T_{i})\right)\\
&+P(t,T_{i-1})[\left(\frac{\ln\frac{P(t,T_{i-1})}{(1+X_{\tau_{i}})P(t,T_{i})}}{\Sigma(t,T_{i-1},T_{i})}-\frac{1}{2}\Sigma(t,T_{i-1},T_{i})\right)\right]
\end{align}

Best Answer

First of all, you're missing a matching \right delimiter to one of your \left delimiters.

Also, you cannot break \left and \right across lines inside align (or any math environment for that matter). You need to do this manually by using a fake opposing delimiter and introducing the necessary false heights to obtain equivalent delimiters. However, an easier alternative would be to use non-matching "big" operators:

enter image description here

\documentclass{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\begin{align}
  \rlap{$C(t,xxx,\tau,N,X)$}\hspace{2em} & \nonumber \\
    &= N\Phi\sum_{i=1}^{n}
      \Bigg[-(1+X_{\tau_{i}})P(t,T_{i})
        \Bigg(\frac{\ln\frac{P(t,T_{i-1})}{(1+X_{\tau_{i}}P(t,T_{i})}}{\Sigma(t,T_{i-1},T_{i})}-\frac{1}{2}\Sigma(t,T_{i-1},T_{i})\Bigg)\\
    &\phantom{{}={}} {}+P(t,T_{i-1})\Bigg[
      \Bigg(\frac{\ln\frac{P(t,T_{i-1})}{(1+X_{\tau_{i}})P(t,T_{i})}}{\Sigma(t,T_{i-1},T_{i})}-\frac{1}{2}\Sigma(t,T_{i-1},T_{i})\Bigg)\Bigg]\Bigg]
\end{align}
\end{document}​

The use of \hspace in the first line is to make the equation fit within the text block width. Also note the use of \phantom{{}={}} to obtain the correct spacing for the second numbered equation.