Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I think here's the problematic code

The series expansion of $e^z$ is given by

\[ e^z = \displaystyle \sum^{\infty}_{n=0} \dfrac{z^n}{n!}\]

Then we can write the given function as

\begin*{align}
\frac{e^z - 1}{z^2} &= \frac{e^z}{z^2} - \frac{1}{z^2} \\
                &= \frac{1}{z^2} \left( 1 + z + \frac{z^2}{2!} + \frac{z^3}{3!} +    \cdots \right) + \frac{1}{z^2} \\
                &= \frac{z}{z^2} + \frac{1}{2} + \frac{z}{3!} + \frac{z^2}{4!} + \cdots \\
                &= \frac{1}{z} + \frac{1}{2} \frac{z}{3!} + \displaystyle  
                   \sum^{\infty}_{k=2} \frac{z^k}{(k+2)!}
\end*{align}

The error messages include "! extra } or missing $" and "! Misplaced alignment tab character &". It's 3 AM here, so I apologize if I’ve missed a missing $ or {} but I really don't see what the error is here. I have tried changing the formatting so that I delete all the white space but it doesn't seem to help either.

Thank you

share|improve this question
    
You need no \displaystyle with both inputs, after correcting \begin*{align} and \end*{align} into \begin{align*} and \end{align*}. Also \cdots should be \dotsb. –  egreg Jul 8 '13 at 8:59

1 Answer 1

up vote 5 down vote accepted

I think your problem is the placement of the *

\begin{align*}
\frac{e^z - 1}{z^2} &= \frac{e^z}{z^2} - \frac{1}{z^2} \\
                &= \frac{1}{z^2} \left( 1 + z + \frac{z^2}{2!} + \frac{z^3}{3!} +    \cdots \right) + \frac{1}{z^2} \\
                &= \frac{z}{z^2} + \frac{1}{2} + \frac{z}{3!} + \frac{z^2}{4!} + \cdots \\
                &= \frac{1}{z} + \frac{1}{2} \frac{z}{3!} + \displaystyle  
                   \sum^{\infty}_{k=2} \frac{z^k}{(k+2)!}
\end{align*}

Placing the star within the curly brackets and at the end of the environment will stop numbering if that was your intent.

Additionally, for this line of code, you don't need \displayatyle of \dfrac since \[\] is displaymath, so

\[ e^z = \displaystyle \sum^{\infty}_{n=0} \dfrac{z^n}{n!}\]

can be

\[ e^z = \sum^{\infty}_{n=0} \frac{z^n}{n!} \]

with the same output.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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