Residue of $\cot(z)/(z-\frac{\pi}{2})^2$ at $\frac{\pi}{2}$ I want to know what type of singularity has $f(z)=\cot(z)/(z-\frac{\pi}{2})^2$ at $\frac{\pi}{2}$ and what is the residue of $f(z)$ at $\frac{\pi}{2}$. I thought that $f$ has a pole of order $2$ at $\frac{\pi}{2}$, but the problem is that $\cot(\pi/2)=0$. Can you help me, please?

Since $\cot$ has a simple zero at $\frac\pi2$, $f$ has a simple pole there. Besides,$$f(z)=\frac{-\left(z-\frac\pi2\right)-\frac13\left(z-\frac\pi2\right)^3+\cdots}{\left(z-\frac\pi2\right)^2}=-\left(z-\frac\pi2\right)^{-1}-\frac13\left(z-\frac\pi2\right)+\cdots$$and therefore $\operatorname{res}_{z=\frac\pi2}\bigl(f(z)\bigr)=-1$.
