Residue of $\frac{\cos(\frac{\pi}{z-1})}{z^2 \sin z}$ at $z=1$ Residue of $$\frac{1}{z^2 \sin z}\cos\left(\frac{\pi}{z-1}\right)$$ at $z=1$.
More importantly, I don't even know whether it exists or not. The one who creates this question has made questions that are unsolvable.
I have tried some methods while they are not so successful.


*

*Wolfram alpha. It doesn't even give an answer this times.

*Series expansion. But this turns out to be too ugly. Expanding $\cos$, $z^2$ and $\sin $ respectively, and evaluate the coefficient of $\frac{1}{z-1}$ seems impossible and silly (without aid of matlab).

*see if it is a removable singularity. Considering $\lim_{z \to 1} (z-1) f(z)$, I once thought I made it by $-1 \leq \cos z \leq 1$, but this inequality doesn't apply in complex.
Please help.
 A: Instead of computing the residue in the given point, compute the residues in the other singularities. Given $f(z)=\frac{\cos\frac{\pi}{z-1}}{z^2\sin z},$ we have:
$$ \operatorname{Res}_{z=k\pi} f(z) = \frac{(-1)^k}{\pi^2 k^2} \cos\frac{\pi}{\pi k -1} $$
for any $k\in\mathbb{Z}\setminus 0$ and:
$$ \operatorname{Res}_{z=0} f(z) = \frac{3\pi^2-1}{6},$$
so the residue you want to compute is given by a convergent series:
$$ \operatorname{Res}_{z=1} f(z) = \frac{1-3\pi^2}{6}-\sum_{k=1}^{+\infty}\frac{(-1)^k}{\pi^2 k^2}\left(\cos\frac{\pi}{\pi k-1}+\cos\frac{\pi}{\pi k+1}\right) = \color{red}{-4.7143885\ldots}.$$
Thanks to Daniel Fischer and Ron Gordon, this holds because the sum of all the residues is zero, since for any positive number $n$,
$$ \oint_{|z|=\frac{\pi}{2}+n\pi}f(z)\,dz = O\left(\frac{1}{n}\right).$$
Moreover, since for any positive natural number $k$:
$$ \operatorname{Res}_{z=k\pi}f(z)=\frac{1}{2\pi i}\left(\int_{|z|=(k+1/2)\pi}f(z)\,dz-\int_{|z|=(k-1/2)\pi}f(z)\,dz\right) = O\left(\frac{1}{k^2}\right), $$
we have:
$$ \oint_{|z|=R}f(z)\,dz=O\left(\frac{1}{R}\right) $$
for any $R\in\mathbb{R}_{>1}\setminus\pi\mathbb{N}.$
