Compute $\int_{\gamma} \frac{1}{z-w}\mathrm dz, |w| \neq 1$ where $\gamma(t):=e^{it}, t \in [0, 2\pi]$ I want to compute $$\int_{\gamma} \frac{1}{z-w}\mathrm  dz,\quad\gamma(t):=e^{it}, t \in [0, 2\pi],\quad |w| \neq 1$$
What I tried so far:
$$\int_0^{2\pi} \frac{1}{e^{it}-w}ie^{it} \mathrm dt=\int_0^{2\pi} \frac{1}{1-\frac{w}{e^{it}}}i \mathrm dt = i \int_0^{2 \pi} \sum_{n=0}^\infty\frac{w^n}{e^{int}} \mathrm dt = i  \sum_{n=0}^\infty \int_0^{2 \pi} \frac{w^n}{e^{int}} \mathrm dt = 2\pi i$$ 
if $\frac{|w|}{|e^{it}|}=|w|<1$.
Is that correct? 

How is it done for$|w|>1$? Without Cauchy's integral formula

Thanks for your help!
 A: Another way, using Cauchy's integral formula.
By Cauchy's integral formula, if $f(z)=1,$ for all $z\in \mathbb{C}$, then
$$1=f(w) = \dfrac{1}{2\pi i} \int_{\gamma}\dfrac{f(z)}{z-w}dz = \dfrac{1}{2\pi i} \int_{\gamma}\dfrac{1}{z-w}dz,  $$
as long $w$ is in the interior of the region defined by $\gamma.$
If $|w|>1$, then $\dfrac{1}{z-w}$ is holomorphic in the interior of the region defined by $\gamma$, then the integral is equal to 0.
A: For the $|w|>1$ case, you should proceed pretty much the way you started
$$\int\limits_0^{2\pi} \frac{1}{e^{it}-w}ie^{it} \mathrm dt=
-\frac{i}{w}\int\limits_0^{2\pi}\frac{e^{it}}{1-\frac{e^{it}}{w}}dt=
-\frac{i}{w}\int\limits_0^{2\pi}e^{it}\left(\sum\limits_{n}\frac{e^{n\cdot it}}{w^n}\right)dt=\\
-\frac{i}{w}\int\limits_0^{2\pi}\left(\sum\limits_{n}\frac{e^{(n+1)\cdot it}}{w^n}\right)dt=
-\frac{i}{w}\left(\sum\limits_{n}\int\limits_0^{2\pi}\frac{e^{(n+1)\cdot it}}{w^n}dt\right)=\\
-\frac{i}{w}\left(\sum\limits_{n}\frac{1}{w^n}\int\limits_0^{2\pi}e^{(n+1)\cdot it}dt\right)=
-\frac{1}{w}\left(\sum\limits_{n}\frac{1}{w^n(n+1)}\int\limits_0^{2\pi}d\left(e^{(n+1)\cdot it}\right)\right)=\\
-\frac{1}{w}\left(\sum\limits_{n}\frac{1}{w^n(n+1)}\left(e^{(n+1)\cdot it}\biggr\rvert_{0}^{2\pi}\right)\right)=
-\frac{1}{w}\left(\sum\limits_{n}\frac{1}{w^n(n+1)}\cdot \color{red}{0}\right)=0$$
