Proof of Cauchy Integral Formula My teacher wrote this in the notes:

Let $f:D(a;R) \to \mathbb{C}$ be analytic, $z \in D(a;r)$ and define
  $g:D(a;R) \to \mathbb{C}$ by $$ g(k)=\frac{f(k)-f(z)}{k-z} \ \ \ 
 \text{when} \ k \neq z$$ $$ g(k)=f'(k) \ \ \  \text{when} \ k = z.$$
  Then, $g$ is analytic on $D(a;R)\setminus\{z\}$ and continuous on $
 D(a;r)$ . then, we have $$\int_{\partial D(a;r)}\frac{f(k)-f(z)}{k-z}
 dk= \int_{\partial D(a;r)}\frac{f(k)}{k-z} dk-f(z)\int_{\partial
> D(a;r)}\frac{dk}{k-z}=0.$$ Direct computation shows that
  $$\int_{\partial D(a;r)}\frac{dk}{k-z}=2\pi i.$$ Hence, we have the
  Cauchy Integral Formula.

I don't see how 'direct' it is. I try to parameterize the circumference of the disk by $I(t)=a+re^{it}$, for $t \in [0, 2\pi]$. How should I proceed?
 A: More details of this technique can be found in Griffiths and Harris.
Consider
$$
\int_{\partial D(a;r)}\frac{dk}{k-z}.
$$
We can rewrite it as
$$
\int_{\partial D(a;r)}\frac{dk}{(k-a)-(z-a)}=\int_{\partial D(a;r)}\frac{dk}{(k-a)\left(1-\frac{z-a}{k-a}\right)}.
$$
Now, we can use the power series expansion of $\frac{1}{1-x}$ to get that this is
$$
\int_{\partial D(a;r)}\frac{dk}{k-a}\sum_{n=0}^\infty\left(\frac{z-a}{k-a}\right)^n.
$$
Using absolute convergence of the sum (since $|z-a|<|k-a|$), you can interchange the sum and the integral to get
$$
\int_{\partial D(a;r)}\frac{dk}{k-z}=
\sum_{n=0}^\infty(z-a)^n\int_{\partial D(a;r)}\frac{dk}{(k-a)^{n+1}}.
$$
Now, using the formula where $k=a+re^{it}$ and $dk=rie^{it}dt$, this becomes 
$$
\int_{\partial D(a;r)}\frac{dk}{k-z}=
\sum_{n=0}^\infty(z-a)^n\int_0^{2\pi}\frac{rie^{it}dt}{r^{n+1}e^{(n+1)it}}.
$$
Simplifying, we have 
$$
\int_{\partial D(a;r)}\frac{dk}{k-z}=
\sum_{n=0}^\infty\frac{i(z-a)^n}{r^n}\int_0^{2\pi}e^{-nit}dt.
$$
This is nonzero when $n=0$ because then the integral is $\int_0^{2\pi}dt=2\pi$ and the coefficient is $i$.  This is zero when $n>0$ because then the integral is
$$
\int_0^{2\pi}e^{-nit}dt=\left.-\frac{1}{ni}e^{-nit}\right|_0^{2\pi}=0.
$$
A: You need to prove that
$$
\int_{\partial D(a;r)}\frac{f(k)-f(z)}{k-z} dk\to0\tag1
$$
as $r\to0$. 
Since $f$ is analytic, for any $\epsilon>0$, there is $\delta>0$ such that for any $|z-k|<\delta$, there is
$$
\left|\frac{f(k)-f(z)}{k-z}-f'(z)\right|<\epsilon
$$
Let $r<\delta$. Then
\begin{align}
\left|\int_{\partial D(a;r)}\frac{f(k)-f(z)}{k-z} dk\right|&=\left|\int_{\partial D(a;r)}\left(\frac{f(k)-f(z)}{k-z}-f'(z)\right) dk\right|
\\
&\leqslant\int_{\partial D(a;r)}\left|\frac{f(k)-f(z)}{k-z}-f'(z)\right| |dk|
\\
&<\pi r\epsilon
\end{align}
where by Cauchy Integral theorem
$$
\int_{\partial D(a;r)}f'(z)dk=0
$$
So $(1)$ is proved.
Edit: Here is the proof of Cauchy Integral Formula
Let $C_r$ be a small circle centered at $a$ and $C$ be any simple connected curve containing $a$ in which $f$ is analytic. Then by Cauchy Integral theorem
$$
\int_{C_r}\frac{f(z)}{z-a} dz=\int_{C}\frac{f(z)}{z-a} dz\tag1
$$
Since $f$ is analytic, for any $\epsilon>0$, there is $0<\delta$ such that for any $|z-a|<\delta$, there is
$$
\left|\frac{f(z)-f(a)}{z-a}-f'(a)\right|<\epsilon
$$
Let $r<\delta$. Then
\begin{align}
\left|\int_{C}\frac{f(z)-f(a)}{z-a} dz\right|&=\left|\int_{C_r}\frac{f(z)-f(a)}{z-a} dz\right|
\\
&=\left|\int_{C_r}\left(\frac{f(z)-f(a)}{z-a}-f'(a)\right) dz\right|\tag2
\\
&\leqslant\int_{C_r}\left|\frac{f(z)-f(a)}{z-a}-f'(a)\right| |dz|
\\
&<\pi r\epsilon
\end{align}
$(2)$: by Cauchy Integral theorem
$$
\int_{ C_r}f'(a)dz=0
$$
Hence 
$$
\int_{C_r}\frac{f(z)-f(a)}{z-a} dz=0
$$
i.e.
$$
f(a)\int_{C_r}\frac{1}{z-a} dz=\int_{C_r}\frac{f(z)}{z-a} dz
$$
Since 
$$
\int_{C_r}\frac{1}{z-a} dz= 2\pi i
$$
By $(1)$, we have
$$
f(a)=\frac1{2\pi i}\int_{C_r}\frac{f(z)}{z-a} dz=\frac1{2\pi i}\int_{C}\frac{f(z)}{z-a} dz
$$
