A question about determing a residue Let $f(z)$ be analytic at $z=w$ and have a pole at $z=a$.
How does one show that the residue of $\displaystyle\frac{f(z)}{w-z}$ at $z=a$ equals the singular/principal part of $f(z)$ evaluated at $z=w$?
For example, let $ \displaystyle f(z) = \frac{\cot z}{z^{2}} = \frac{1}{z^{3}} - \frac{1}{3z} + O(z)$. 
Then $ \displaystyle\text{Res} \Big[ \frac{\cot z}{z^{2}(2-z)},0 \Big] = \frac{1}{2^{3}} - \frac{1}{3(2)} = - \frac{1}{24}$.
It came up in a proof of the Mittag-Leffler partial fractions expansion theorem.

Good old-fashioned computation with Laurent series.
$$\begin{align}
\frac{f(z)}{w-z} &= \frac{f(z)}{(w-a) - (z-a)} = \frac{1}{w-a} f(z) \frac{1}{1 - \frac{z-a}{w-a}}\\
&= \frac{1}{w-a}f(z)\sum_{\nu = 0}^\infty \left(\frac{z-a}{w-a}\right)^\nu\\
&= \frac{1}{w-a}\left(\sum_{k = -m}^\infty a_k (z-a)^k\right)\sum_{\nu = 0}^\infty \left(\frac{z-a}{w-a}\right)^\nu\\
&= \frac{1}{w-a} \sum_{s = -m}^\infty \left(\sum_{k = -m}^s\frac{a_k}{(w-a)^{s-k}}\right)(z-a)^s
\end{align}$$
The residue is the coefficient of $(z-a)^{-1}$, that is
$$\frac{1}{w-a}\sum_{k = -m}^{-1} \frac{a_k}{(w-a)^{-1-k}} = \sum_{k=-m}^{-1} \frac{a_k}{(w-a)^{-k}} = \sum_{k=-m}^{-1} a_k(w-a)^k.$$
