A simple integrate question of which should be calculate first i am looking for the reson why we must calculate the e in the very first step,for example $\int^{2\pi}_{0}e^{i(1-n)\theta}d\theta$=$2\pi i$ if n=1 and the equation =0 if  n not equal to 1
 A: Allow me to summarize the comments above, the answer, and the answer to the question that you actually asked (as I read it).
Firstly, we should recognize Olivier's comment that $\displaystyle\int_{|z|=1} z^n dz=\int_0^{2\pi}e^{in\theta}\times ie^{i\theta}d\theta=i\int_0^{2\pi}e^{i(n+1)\theta}d\theta$. This is a simple line integral. Most importantly, this is not the same as $\displaystyle \int_{|z| = 1} z^{1-n} dz$. So Theo and Victor are talking about different integrals. And both are correct (except for a factor of i in Victor's).
Now, as to evaluating $\displaystyle\int^{2\pi}_{0}e^{i(1-n)\theta}d\theta$. Firstly, if $n = 1$ then we are evaluating $\displaystyle \int_0 ^{2 \pi} 1$ and that is very clearly $2\pi$. But for all other values, we recall the following three things:
$$e^{it\pi} = \cos t + i \sin {t} \qquad \qquad \qquad \qquad \int_0 ^{2 \pi} \sin(t) dt = \int_0 ^{2 \pi} \cos(t) dt = 0$$
Then we quickly see that for $n \not = 1$ the value of the integral in question is zero.
I think that the original question was entirely based around why we care to break this up into cases, when n is or is not 1. Now that we know the answer, this might seem very apparent. Or it might not. The big key is that in evaluating this integral, I used that $e^{i t \pi} = \cos t + i \sin t$, but if $t = 0$ then this rings hollow. It says that $e^0 = \cos(0) + i \sin(0)$, which is still true ($1 = 1$).
So in that sense, there is no need to split it up into cases, or to look at e prior to the evaluation of the integral. But we do need to realize that when $n = 1$ we end up evaluating $\int_0 ^{2 \pi} \cos(0) dt = 2 \pi$ instead of something that goes to zero.
But on a more qualitative note, there is no reason not to evaluate it before-hand. As then we can do both cases in our heads immediately.
I hope this clears the air.
