How to classify singularities in a given complex funtion and how to compute the residues of the same function. I need help showing a couple of things. First one , how can I describe which kind of singularity (removable, essential,finite order pole) I have in the origin if the given function is $\frac{z^4}{(\cot z-1)^2} $ since $(\cot z-1)^2$ is zero when $z=0$ and obviously $z^4$=0 when $z=0$ seems like derivate $(\cot z-1)^2$ dont get me anywhere also. I dont know which singularity test use for this one.
Second one, I need to compute the residues of $\pi \cot \pi z$ in each of his singularities, since $\cot \pi z$ is zero in in $\pi / 2$ + $\pi z$ right? then since I dont know which kind of singularities this function have but since the zeros are infinite the singularity seems to be essential but how does I know which are the residues, it seems to be the integer numbers but Im not sure.
Thanks

You have several things wrong. The singularities may come from


*

*Points where the denominator vanishes: $\cot z-1=0$ when $z=\dfrac\pi4+k\,\pi$. These are poles of order $2$.

*Points where the denominator is not defined. This happens when $z=k\,\pi$, where $\cot z$ has a pole of order one. Since
$$
\lim_{z\to k\pi}\frac{z^4}{(\cot z-1)^2}=0,
$$
they are removable singularities. Moreover, they are zeroes of order $2$, except $z=0$, which is of order $6$.

