I was trying to find out the residue of the function: $$f(z)=\frac{\pi\cot(\pi z)}{z^2}$$
It is evident that we have $z=0$ as a pole of order $3$.
So we have: $$\operatorname*{Res}_{z = 0}f(z)=\frac{1}{2}\lim_{z \to 0}\frac{d^2}{dz^2}\left(z^3\times \frac{\pi\cot(\pi z)}{z^2}\right)$$ So we get:
$$\operatorname*{Res}_{z=0}f(z)=\frac{\pi}{2}\lim_{z \to 0}\frac{d}{dz}\left(-\pi z \csc^2 \pi z+\cot(\pi z)\right)$$
But it’s tedious to continue from here. Is there any alternate way?