Sorry for the vague title but saw no other way of describing it without being annoyingly specific.
The problem is to do contour integration of $\int_\gamma f(z)$ where $f(z) = z^n, n\geqslant0$ and $\gamma$ is the circle centered at 0 with a radius of R.
According to one of the theorems from my course, if $f$ is integrable over $[0,2\pi]$, then I can simply compute this problem by doing $F(2\pi) - F(0)$. However, this is not giving me the answer I $\it{know}$ to be true, which is $0$.
I know the answer is $0$ because the theorem implies that the contour integrals of integrable functions over closed contours are always $0$. However, when I do the calculation here, I get $\frac{2\pi^{n+1}}{n+1}$. I don't understand why the theorem is not yielding the expected result.
I even calculated the answer using the classical definition and got the right answer. What am I doing wrong? Thanks.
Also, I have yet to go over the Residual Theorem at this time.
You can't just change the limits, what you're doing here is the complex equivalent to "change of variable", you need to make sure everything matches up. The idea is to express the curve as a function of $t$, so that as $t$ changes, we "travel along" the curve (this is called parameterisation of the curve). Usually $t$ ranges over an interval $[t_1, t_2]$.
For simplicity, take the unit circle $\gamma$. You should know that we can parameterise this curve as a function of $t$, writing $\gamma(t) = \cos t + i \sin t$ for $t\in[0,2\pi]$. Then to change everything in terms of $t$, we do
\begin{align*} \int_\gamma f(z)\,dz &= \int_{t_1}^{t_2}(f\circ\gamma)(t)\,\gamma'(t)\,dt\\[3pt] &= \int_0^{2\pi} (\cos t+i \sin t)^n\,(\sin t-i\cos t)\,dt\\[3pt] &= \int_0^{2\pi} (\cos nt+i \sin nt)\,(\sin t-i\cos t)\,dt\\ &= \int_0^{2\pi}(\cos((n+1)t) + i\sin((n+1)t))\,dt=0, \end{align*} as required.