How to get to $\frac{1}{2\pi i} \oint_C \frac{f'(z)}{f(z)} \, dz =n_0-n_p$ from Cauchy's residue theorem?

According to Cauchy's residue theorem:

If $U$ be a simply connected open subset of the complex plane containing a finite list of points $a_1, \ldots, a_n$ and f a function defined and holomorphic on $U -\{a_1, \ldots, a_n\}$. Let $γ$ be a closed rectifiable curve in $U$ which does not meet any of the $a_k$, and denote the winding number of $γ$ around $a_k$ by $I(γ, a_k)$. The line integral of $f$ around $γ$ is equal to $2πi$ times the sum of residues of $f$ at the points, each counted as many times as $γ$ winds around the point.

$$\oint_\gamma f(z) \, dz = 2\pi i \sum_{k=1}^{k=n} I(\gamma,a_k) \operatorname{Res}(f,a_k)$$

I understand Cauchy's residue theorem so far.

Now, my textbook "Topology and Geometry for Physicists" by Nash & Sen, says (on page 3): As a consequence of Cauchy's theorem for a meromorphic function $f(z)$ we have:

$$\frac 1 {2\pi i} \oint_C \frac{f'(z)}{f(z)} \, dz = n_0-n_p$$

where $n_0$ and $n_p$ are the number of zeroes and number of poles respectively of $f(z)$ lying inside $C$.

Now, I'm not sure how to extend Cauchy's residue theorem to get $\frac 1 {2\pi i} \oint_C \frac{f'(z)}{f(z)} \, dz = n_0-n_p$. Any suggestions?

It is straightforward to notice that the claim holds for functions of the form $(z-z_0)^m$ with $m\in\mathbb{Z}$. Additionally $\frac{f'(z)}{f(z)}=\frac{d}{dz}\log f(z)$, hence if $f(z) = g_1(z) g_2(z)\cdots g_T(z)$ we have
$$\frac{1}{2\pi i}\oint \frac{f'(z)}{f(z)}\,dz = \sum_{k=1}^{T} \frac{1}{2\pi i}\oint \frac{g_k'(z)}{g_k(z)}\,dz.\qquad (\text{additivity of the winding number})$$
To finish the proof, it is enough to notice that if $g(z)$ is a holomorphic and non-vanishing function over the closure of some bounded, simply-connected set $V\subset\mathbb{C}$, then $\log g(z)$ and $\frac{g'(z)}{g(z)}$ are holomorphic as well, hence $$\frac{1}{2\pi i}\oint \frac{g'(z)}{g(z)}\,dz = 0.$$
• Okay, I understood what you wrote. But I'm not sure how one would get the $n_0$ and $n_p$ terms on the right (i.e. how would you know that the non-zero terms equal to $n_0-n_p$?). – user400242 Jan 13 '18 at 17:39
• @Blue: assume that $f(x)$ has a zero with multiplicity $M$ at $x=\alpha$. Write $f(x)$ as $(x-\alpha)^M g(x)$ and continue this factorization process until $g(x)$ is holomorphic and non-vanishing, then apply the additivity of the winding number. – Jack D'Aurizio Jan 13 '18 at 17:43
• You'll get that the wanted integral equals the sum of the multiplicities of the zeroes / poles, i.e. $n_z-n_p$. – Jack D'Aurizio Jan 13 '18 at 17:44
HINT: Suppose $z_0$ is a zero or a pole. Using the Laurent/Taylor series centered at $z_0$, compute the residue of $f'(z)/f(z)$ at $z=z_0$.