Finding singularities and residues I am trying to solve this question.
$$\frac{(\pi- z)(z^4 -3z^2)}{\sin^{2}z}$$
The above is the given function and I am suppose to find the singular points and their corresponding residues.
My approach was as follows.
$\sin^2z = 0$ means $z = n\pi$ for $n \in \mathbb{N}$
But $z = 0$ is a removable singularity as,
$$\frac{(\pi- z)(z^2 -3)}{\frac{\sin^{2}z}{z^2}} $$
the value of $$\lim_{z\to0}\frac{\sin^2z}{z^2} = 1$$
But I am not sure wheather other singularities are essential or non-removable and how to go about finding their residues.
Please give me hint on how to solve the problem.
Thanks
 A: Let $z=w+n\pi$ with $n\in\mathbb{Z}$. Then $\sin^2(z)=\sin^2(w+n\pi)=((-1)^n\sin(w))^2=\sin^2(w)$. Therefore
$$f(z):=\frac{(\pi- z)(z^4 -3z^2)}{\sin^{2}z}=\frac{(\pi- (w+n\pi))(w+n\pi)^2((w+n\pi)^2 -3)}{\sin^{2}w}\\=\frac{(\pi- (w+n\pi))(w+n\pi)^2((w+n\pi)^2 -3)}{w^2(1+O(w^2))}\\
=\frac{(\pi- (w+n\pi))(w+n\pi)^2((w+n\pi)^2 -3)}{w^2}\cdot (1-O(w^2)).$$
because
$\sin(w)=w-\frac{w^3}{6}+ O(w^5)$ implies that $$\sin^2(w)=w^2-2w\cdot\frac{w^3}{6}+ O(w^6)=w^2-\frac{w^4}{3}+ O(w^6)=w^2+O(w^4).$$
Now we are you able to classify the singularities $\{n\pi\}_{n\in\mathbb{Z}}$ of $f$.
Note that for $n\not=0,1$, the numerator is different from zero at $w=0$. Therefore in that case the order of $n\pi$ is TWO. The residue is the coefficient of $1/w$ of 
$$
\frac{(\pi- (w+n\pi))(w+n\pi)^2((w+n\pi)^2 -3)}{w^2}\cdot (1-O(w^2))$$
that is the coefficient of $w$ of the numerator
$$(\pi- (w+n\pi))(w+n\pi)^2((w+n\pi)^2 -3).$$
Therefore
$$\mbox{Res}(f;n\pi)=3n(3n-2)\pi^2-(5n-4)n^3\pi^4.$$
For $n=0$ then
$$f(z)=\frac{(\pi-w)w^2(w -3)}{w^2(1+O(w^2))}=\frac{(\pi-w)(w -3)}{1+O(w^2)}$$
which implies that $z=0$ is a removable singularity and $\mbox{Res}(f;0)=0$.
For $n=1$ then
$$f(z)=\frac{w(w+\pi)^2((w+\pi)^2 -3)}{w^2(1+O(w^2))}=\frac{(w+\pi)^2((w+\pi)^2 -3)}{w(1+O(w^2))}$$
which implies that $z=\pi$ has order ONE and
$$\mbox{Res}(f;\pi)=[(w+\pi)^2((w+\pi)^2 -3)]_{w=0}=\pi^4-3\pi^2.$$
