Here and here, we studied how to evaluate the contour integral \oint_C f(z)dz when f(z) is analytic everywhere within and on the positively oriented simple closed contour C except for a finite number of isolated singularities interior to C. The calculation of residues however can be a pain if there are many isolated singularities of f(z) interior to C. It turns out that by slightly modifying the function, we may just need to deal with only one isolated singularity regardless of how many isolated singularities of f(z) there are interior to C. This gives a great advantage from computational viewpoint.
Theorem. If a function f is analytic everywhere except for a finite number of isolated singularities interior to a positively oriented simple closed contour C, then
\oint_C f(z)dz=2\pi i\mathrm{Res}_{z=0}\left[\frac{1}{z^2}f\left(\frac{1}{z}\right)\right].
Proof.
From the above picture, we see that the function f(z) has a Laurent series expansion
f(z)=\sum_{n=-\infty}^\infty c_n z_n\ (R_1<|z|<\infty)
where
c_n=\frac{1}{2\pi}\oint_{C_0}\frac{f(z)}{z^{n+1}}dz (n=0,\pm 1,\pm 2,\cdots). In particular, we have
\oint_{C_0}f(z)dz=2\pi ic_{-1}.
Since the condition of validity with the representation is not of the type 0<|z|<R_2, c_{-1} is not the residue of f at z=0. Let us replace z by \frac{1}{z} in the representation. Then
\frac{1}{z^2}f\left(\frac{1}{z}\right)=\sum_{n=-\infty}^\infty\frac{c_n}{z^{n+2}}=\sum_{n=-\infty}^\infty\frac{c_{n-2}}{z^n}\ \left(0<|z|<\frac{1}{R_1}\right).
Hence,
c_{-1}=\mathrm{Res}_{z=0}\left[\frac{1}{z^2}f\left(\frac{1}{z}\right)\right]
and
\int_{C_0}f(z)dz=2\pi i\mathrm{Res}_{z=0}\left[\frac{1}{z^2}f\left(\frac{1}{z}\right)\right].
Since f is analytic throughout the region bounded by C and C_0 (topologically speaking C_0 is homotopic to C),
\oint_C f(z)dz=\oint_{C_0}f(z)dz.
Example. Evaluate \oint_C\frac{5z-2}{z(z-1)}dz where C:\ |z|=2.
Solution. Let f(z)=\frac{5z-2}{z(z-1)}. Then
\begin{align*}
\frac{1}{z^2}f\left(\frac{1}{z}\right)&=\frac{5-2z}{z(1-z)}\\
&=\frac{5-2z}{z}\cdot\frac{1}{1-z}\\
&=\left(\frac{5}{z}-2\right)(1+z+z^2+\cdots)\\
&=\frac{5}{z}+3+3z+\cdots\ (0<|z|<1).
\end{align*}
Thus,
\oint_C\frac{5z-2}{z(z-1)}dz=2\pi i(5)=10\pi i.