Proving that a function is analytic

I'm struggling with the following problem:

Problem: Suppose that $h$ is a continuous function on a simple closed curve $\gamma$. Define

$$H(w) = \oint_{\gamma} \frac{h(z)}{z - w} \, dz.$$

Show that $H$ is analytic on $\mathbb{C} \setminus \gamma$.

I feel like the solution should fall very easy from the Cauchy integral formula, but I'm having trouble seeing how to connect the two. Could anyone lend a helping hand?

-
You can differentiate under the integral sign. – Christian Blatter Jul 18 '14 at 7:58
@ChristianBlatter That's a good point. This requires similar steps as in my original answer, but it also gives an expression for $H'$. – Ayman Hourieh Jul 18 '14 at 8:33
Morera's theorem will do the trick. – Mhenni Benghorbal Jul 18 '14 at 9:21

Let $w_1, w_2 \in \Bbb C - \gamma$. We have \begin{align} \left|H(w_2) - H(w_1)\right| &= \left|\int_\gamma \frac{h(z)(z - w_1) - h(z)(z - w_2)}{(z - w_2)(z - w_1)}dz\right| \\ &= \left|\int_\gamma \frac{h(z)(w_2 - w_1)}{(z - w_2)(z - w_1)}dz\right| \\ &= \left|\int_\gamma \frac{h(z)}{(z - w_2)(z - w_1)}dz\right| \left|w_2 - w_1\right|. \tag{*} \end{align}

By the ML lemma, it follows that $H$ is continuous.

Now we can use Morera's theorem. Let $\Delta \subset \Bbb C - \gamma$ be a closed triangle. We have \begin{align} \int_{\partial \Delta} H(w)dw &= \int_{\partial \Delta} \int_\gamma \frac{h(z)}{z - w} dz dw \\ &= \int_\gamma \int_{\partial \Delta} \frac{h(z)}{z - w} dw dz \\ &= 0. \end{align}

We are able to change the order of integration since we are integrating a continuous function over compact sets. The last equality follows from Cauchy's integration theorem since $h(z)/(z - w)$ is holomorphic over $\Bbb C - \{z\}$ as a function of $w$.

Alternatively, as Christian Blatter suggests, we can use (*) to get \begin{align} \lim_{w_2 \to w_1} \frac{H(w_2) - H(w_1)}{w_2 - w_1} &= \lim_{w_2 \to w_1} \int_\gamma \frac{h(z)}{(z - w_2)(z - w_1)} dz \\ &= \int_\gamma \frac{h(z)}{(z - w_1)^2} dz. \end{align}

Swapping the limit and integral is justified for the same reason as above. This gives an expression for $H'(w_1)$.

-