<s>[INST] Residue of 1/sin^3(z) What are the residues of $ \frac{1}{sin^{3}z} $?
From the residue theorem the residues are at  
$$\lim_{z \rightarrow z_{0}} \frac{1}{(n-1)!} \frac{d^{n-1}}{dz^{n-1}} (z-z_{0})^{n} f(z)$$
$$\lim_{z \rightarrow n\pi} \frac{1}{2!} \frac{d^{2}}{dz^{2}}  \frac{(z-n\pi)^{3}}{sin^{3}z}$$
$$=\lim_{z \rightarrow n\pi} \frac{1}{2}   (z-n\pi)(3csc^{5}(z)+9cot^{2}(z)csc^{3}(z))-6cot(z)csc^{3}z$$
But what is the $\lim_{z \rightarrow n\pi} \frac{1}{2}   (z-n\pi)(3csc^{5}(z)+9cot^{2}(z)csc^{3}(z))-6cot(z)csc^{3}z$?
 [/INST] I find that with higher-order poles, it is easier to simply compute the residue right from the Laurent expansion.
$$\sin{z} = \sin{n \pi} + \cos{n \pi} (z-n \pi) -\frac1{2!} \sin{n \pi} (z-n \pi)^2 - \frac1{6!} \cos{n \pi} (z-n \pi)^3 + \cdots = (-1)^n (z-n \pi) - \frac16 (-1)^n (z-n \pi)^3 + \cdots$$
Thus,
$$\begin{align}\frac1{\sin^3{z}} &= \frac{(-1)^n}{\left [(z-n \pi) - \frac16 (z-n \pi)^3 + \cdots\right ]^3}\\ &= \frac{(-1)^n}{(z-n \pi)^3} \left [1-\frac16 (z-n \pi)^2 + \cdots\right ]^{-3} \\ &= \frac{(-1)^n}{(z-n \pi)^3} \left [1+\frac12 (z-n \pi)^2 + \cdots\right ]\\ &= \frac{(-1)^n}{(z-n \pi)^3}  + \frac{(-1)^n}{2} \frac1{z-n \pi} + \cdots \end{align}$$
where the dots represents higher orders.  As the residue is the coefficient of $1/(z-n \pi)$, the residue is $\frac12 (-1)^n$.
</s>