Integrate $\int_{\gamma} z^{n}$ where $\gamma$ is any circle not containing the origin. I want to generalize this question: Evaluate the integrals $\int_{\gamma}z^{n}dz$ for all integers $n$.
I mean: the same question but with $\gamma$ any circle not containing the origin. Then if $\gamma$ has radius $r$, we can write a parameterization $z(t) = c + re^{it}$ with $c > r$. So, the integral becomes
$$\int(c+re^{it})^{n}ire^{it}dt$$
I think maybe I should use some "trick" taking advantage of the case of the circle centered on the origin. Can someone help me?
 A: I don't see why Cauchy's theorem or the residue formula are needed here.  
First of all, suppose
$n \ne -1; \tag 1$
then the function
$F_n(z) = \dfrac{z^{n + 1}}{n + 1} \tag 2$
is everywhere a primitive for $z^n$:
$F'_n(z) = \left (  \dfrac{z^{n + 1}}{n + 1} \right )' = z^n, \; \forall z \in \Bbb C; \tag 3$
it is then elementary that, for $z_0, z \in \Bbb C$,
$\dfrac{z^{n + 1}}{n + 1} - \dfrac{z_0^{n + 1}}{n + 1} = \displaystyle \int_{z_0}^z F'_n(w) \; dw = \int_{z_0}^z w^n \; dw; \tag 4$
for any closed path $\gamma(t)$ in $\Bbb C$, 
$\gamma:[a, b] \to \Bbb C, \; \gamma(a) = \gamma(b) = z_0, \tag 5$
since $\gamma(t)$ both starts and ends at $z_0$, (4) becomes
$\displaystyle \int_\gamma w^n \; dw = \dfrac{z_0^{n + 1}}{n + 1} - \dfrac{z_0^{n + 1}}{n + 1} = 0; \tag 6$
taking
$w = \gamma(t) = c + r e^{it}, \; t \in [0, 2\pi], \tag 7$
we recover the specific case
$\displaystyle \int_\gamma (c + re^{it})^n rie^{it} \; dt = \int_0^{2\pi} (c + re^{it})^n rie^{it} \; dt = 0, n \ne -1; \tag 8$
when $n = -1$, the expression (2) cannot yield a primitive for $f(z) = z^{-1}$, since then $n + 1 = 0$; in the light of the hypothesis that $r < c$, however, we may set
$F_{-1}(z) = \ln z \tag 9$
in an open disk $D(c, c + \epsilon)$, $\epsilon < c - r$; then
$F'_{-1}(z) = \dfrac{1}{z} \tag{10}$
in $D(c, c + \epsilon)$, so essentially the same argument as in (4), (6) applies; for
$z_0, z \in D(c, c + \epsilon)$,
$\ln z - \ln z_0 = \displaystyle \int_{z_0}^z F'_{-1}(w) \; dw = \int_{z_0}^z \dfrac{dw}{w}; \tag{11}$
$\displaystyle \int_\gamma \dfrac{dw}{w} = \ln z_0 - \ln z_0 = 0, \tag{12}$
$\gamma(t)$ a closed path in $D(c, c + \epsilon)$.
A: Maybe you can deal with $n\geq 0$. For negative $n$'s, you may use generalized binomial theorem: for $|z|<1$ and $m\geq 1$, we have
$$
(1+z)^{-m} = \sum_{k=0}^{\infty} \binom{-m}{k} z^{k} = \sum_{k=0}^{\infty} (-1)^{k} \binom{m+k-1}{k}z^{k}
$$
Which converges absolutely. 
Then we have
$$
\int_{0}^{2\pi} (c+re^{it})^{-m}ire^{it}dt = c^{-m}ir\int_{0}^{2\pi}\left(1+ \frac{re^{it}}{c}\right)^{-m}e^{it}dt = c^{-m}ir\sum_{k=0}^{\infty} (-1)^{k}\binom{m+k-1}{k}\frac{r^{k}}{c^{k}}\int_{0}^{2\pi}e^{i(k+1)t}dt =0
$$
Note that $c>r$ is important here: for $r>c$, the integral should be
\begin{align*}
\int_{0}^{2\pi} (c+re^{it})^{-m}ire^{it}dt &= r^{-m}ir\int_{0}^{2\pi}\left(1+ \frac{ce^{-it}}{r}\right)^{-m}e^{i(1+m)t}dt\\
&= r^{-m+1}i\sum_{k=0}^{\infty} (-1)^{k}\binom{m+k-1}{k}\frac{r^{k}}{c^{k}}\int_{0}^{2\pi}e^{i(m+1-k)t}dt \\
&=\begin{cases} 0 & m >1 \\ 2\pi i & m=1, k=0\end{cases}
\end{align*}
