# Math Help - Can't evaluate this integral

1. ## Can't evaluate this integral

I can't follow a proof in my physics class. It involves this:
$\int^{2pi}_0 e^{i(n+1)x}dx$
I am suppose to get 2pi for n=-1 and 0 otherwise.
I got:
$\frac{e^{i(n+1)x}}{i(n+1)}$
Using euler's formula I got:
$\frac{sin[(n+1)x]}{n+1}-i \frac{[cos(n+1)x]}{n+1}$
Pluging in the limits I only got 0 regardless of what n is.
What am I missing?

2. For n = -1, the integral is $\int_{0}^{2 \pi} 1 \ dx = 2 \pi$.

3. OMG........thank.... I spent so long working blind....... I was trying to plug in n after I do the work.