Proof (general Cauchy's integral formula)

The first statement follows from applying the second statement to $\tilde f(z) = (z-w)\, f(z)$: $$ \begin{align*} \oint_{γ} f(z) \d z = 2πi\,I(γ; w)\,\tilde f(w) = 0. \end{align*} $$

Using $I(γ; w) = \frac{1}{2πi} \oint_γ \frac{\d z}{z-w}$, it suffices to show $$ \begin{align*} \oint_γ \frac{f(z) - f(w)}{z-w} \d z = 0 \end{align*} $$ for all $w\not\in γ$.

Auxilliary functions

Define $$ \begin{align*} g(z, w) := \begin{cases} \frac{f(z) - f(w)}{z-w}, &z\neq w, \\ f'(z), &z=w. \end{cases} \end{align*} $$ Note $g$ is continuous in $(z,w)$. Furthermore $z\mapsto g(z,w)$ is holomorphic on $U\setminus \set{w}$ and thus holomorphic on $U$. We want to show $\oint_γ g(z, w)\d z = 0$ for all $w\not\in U \setminus γ$.

Further define $$ \begin{align*} h(w) := \begin{cases} \oint_γ g(z, w)\d z, &w\in U \\ \oint_γ \frac{f(ζ)}{ζ - w}\d ζ, &w\in V \end{cases} \qquad \text{where} \qquad V:= \sb{w\in \C}{I(z,w)=0}. \end{align*} $$

$h$ is well-defined on $\C$

For $w\in U\cap V$, $$ \begin{align*} \oint_γ g(z,w)\d z = \oint_γ \frac{f(z)}{z-w}\d z - \underbrace{\oint_γ \frac{f(w)}{z-w}\d z}_{I(z,w) = 0} = \oint_γ \frac{f(z)}{z-w}\d z. \end{align*} $$ Moreover $h$ is defined on the entire $\C=U\cup V$, because $\C\setminus U \subseteq V$ as $γ$ is homologous to zero in $U$.

$h$ is holomorphic

To show $h$ is holomorphic, we need two lemmas:

Lemma (Fubini's theorem) open_in_new

If $f: [a,b]\times [c,d]\to \C$ is continuous, then $$ \begin{align*} \int_{a}^{b} \left(\int_{c}^{d} f(x,y) \d y\right) \d x = \int_{c}^{d} \left(\int_{a}^{b} f(x,y) \d x\right) \d y. \end{align*} $$

Proof

Lemma (holomorphic parametrised integral) open_in_new

Let $U\subseteq \C$ be open.

If $ϕ: U\times [a,b]\to \C$ is continuous and $z\mapsto ϕ(z,s)$ is holomorphic for all fixed $s\in [a,b]$, then $$ \begin{align*} g(z) := \int_{a}^{b} ϕ(z,s) \d s \end{align*} $$ is a holomorphic function on $U$.

Proof

$h$ can be written as $$ \begin{align*} h(w) = \begin{cases} \int_{a}^{b} g(γ(t), w)\,γ'(t) \d t, & w\in U, \\ \int_{a}^{b} \frac{f(γ(t))}{γ(t) - w}γ'(t) \d t, & w\in V. \end{cases} \end{align*} $$ $U$ is open by definition of a domain, and $V$ is open since winding number is locally constant. The integrands are continuous in $(t,w)$, and fixing $w$, the functions $t\mapsto g(γ(t), w) γ'(t)$ and $t\mapsto \frac{f(γ(t))}{γ(t)-w}γ'(t)$ are holomorphic. So by the lemma, the integrals are holomorphic on $U$ and $V$ respectively. Therefore $h$ is entire.

$h$ is bounded

For all $|w|$ sufficiently large, $γ\subseteq B(0, |w|)$ and $w\in V$. We have $$ \begin{align*} |h(w)| ={}& \left|\oint_γ \frac{f(ζ)}{ζ-w} \d ζ\right| \leq \mathrm{length}(γ)\cdot \frac{\sup_{ζ\in γ}|f(ζ)|}{|w| - \sup_{ζ\in γ} |ζ|} \to 0 \end{align*} $$ as $|w|\to \infty$. Therefore $h$ is bounded.

By Liouville's theorem, $h$ is constant, so $h\equiv 0$, as required.