Local constancy of winding number, proof by differentiation May someone explain the proof meant in  Terren's Notes for Ex 45? 
Lemma 44: Let $\gamma$ be a closed curve. Then $W_\gamma: z_0 \mapsto \int_{\gamma}\frac{1}{z-z_0} \, dz $ is locally constant. If $z_0 \notin Im(\gamma)$, then exists $D(z_0,r) \cap Im (\gamma) = \emptyset $ such that $W_\gamma(z) = W_\gamma(z_0)$ for all $z \in D(z_0,r)$. 
Exercise 45: Give a proof based on differentiation under the integral sign and using the fact that $\frac{1}{(z-z_0)^2}$ has an antiderivative away from $z_0$. 

What I had in mind was 
$$ \Big| \frac{W_\gamma (a+h) - W_\gamma(a) }{h} \Big | = \Big | \int _\gamma \Big( \frac{1}{(z-z_0)^2}+\frac{1}{(z-a)(z-a-h)} \Big)\, dz \Big| \le  |h||\gamma|M \rightarrow 0$$
as $h \rightarrow 0 $, for some constant $M$. The second equality follows from adding $\int_\gamma \frac{1}{(z-z_0)^2} = 0$. Is this right? And is this what was intended? 
 A: I think the idea is simply that
\begin{multline} W_\gamma'(w)=\frac{d}{dw}\oint_\gamma \frac{dz}{z - w} =\oint_\gamma\frac{\partial}{\partial w} \left( \frac{1}{z-w} \right)  dz = \oint_\gamma \frac{dz}{(z-w)^2}\\ = \oint_\gamma \frac{\partial}{\partial z}\left( -\frac{1}{z-w}\right)=-\frac{1}{\gamma(1)-w}+\frac{1}{\gamma(0)-w}=0,\end{multline}
where $\gamma : [0,1] \to \mathbb C$ is your contour.
On the second line, I used the fundamental theorem of calculus. This is what the hint in your book is alluding to when it talks about "primitives".
To justify "differentiation under the integral sign" (i.e. commuting the $\frac d {dw}$ derivative with the integral), you can use a standard argument involving the dominated convergence theorem (see here for details). But I think your argument is better! You have shown that
$$ \left\vert \frac{W_\gamma(w + h) - W_\gamma(w)}h - \oint_\gamma \frac{dz}{(z-w)^2} \right\vert = \left\vert \oint_\gamma \frac{h \ dz}{(w-z-h)(w-z)^2} \right\vert \leq |h| |\gamma |M$$
for some constant $M > 0$. (There is a typo in your question, by the way.) And this implies that
$$W_\gamma'(w) =   \oint_\gamma \frac{dz}{(z-w)^2} ,$$
which is what we need.
