Calculating Residue of $\frac{1}{\sin\left(\frac{\pi}{z}\right)}$ How do I calculate the residue of $f(z)=\frac{1}{\sin\left(\frac{\pi}{z}\right)}$ at the points $z=\frac{1}{n}$, $n\in\mathbb{Z}\setminus\{0\}$?
I know that the set $\{\frac{1}{n}:n\in\mathbb{Z}\setminus\{0\}\}$ is the set of isolated singularities of $f$ and the points $\frac{1}{n}$ are the poles. So $$Res\left(f;\frac{1}{n}\right)=\lim_{z\to\frac{1}{n}}\left(z-\frac{1}{n}\right)f(z)=\lim_{z\to\frac{1}{n}}\frac{\left(z-\frac{1}{n}\right)}{\sin\left(\frac{\pi}{z}\right)}$$$$=\frac{1}{\pi}\lim_{z\to\frac{1}{n}}z\left(z-\frac{1}{n}\right)\left(1+\frac{\pi^2}{6z^2}+\frac{\pi^4}{120z^4}+\dots\right).$$
But is it possible to calculate the limit from here?
 A: At each points z=1/n , f has simple poles.
For Residue at that each point z₀=1/n, just do find,
$\begin{align}\lim_{z \to 1/n} (z-1/n)(1/sin(π/z)) &=\lim_{z \to 1/n}(1/cos(π/z))*(-z²/π)          \end{align}$
So, $residue=
\begin{cases}
-1/πn²,  & \text{if $n$ is even} \\
 1/πn², & \text{if $n$ is odd}
\end{cases} $
I think it will help
A: One well-known result from complex analysis, that will instantly solve your problem, is the following:
Proposition
If $f,g$ are holomorphic around $z=z_0$ and $g$ has a zero of order one at $z=z_0$, then
$$\mathrm{Res}\left(\frac{f}{g},z_0\right)=\frac{f(z_0)}{g'(z_0)}.$$
Proof. Let $h:=\frac{f}{g}$. We claim that $$\mathrm{Res}(h,z_0)=\lim_{z\to z_0} (z-z_0)h(z).$$
In fact, $h(z)$ can locally around $z=z_0$ be written as $h(z)=\sum_{n\geq -1}a_n (z-z_0)^n$ (as $h$ has a pole of order $\leq 1$ at $z=z_0$). Hence
$$(z-z_0)h(z)=\sum_{n\geq -1}a_n(z-z_0)^{n+1}=a_{-1}+\sum_{n\geq 0}a_n(z-z_0)^n.$$
The claim follows.
Now, using the claim, that $h=\frac{f}{g}$ and that $g(z_0)=0$, we obtain:
$$\mathrm{Res}\left(\frac{f}{g},z_0\right)=\lim_{z\to z_0} (z-z_0)\frac{f(z)}{g(z)}=\frac{1}{\frac{g(z)-g(z_0)}{z-z_0}}\cdot f(z)\to\frac{1}{g'(z_0)}\cdot f(z_0) \text{ as } z\to z_0.$$
A: If $f(z)=g(z)/h(z)$ with $g(z_0)\neq 0, h(z_0)\neq 0, h'(z_0)\neq 0$, then, $\operatorname{Res}(f,z_0)=\frac{g(z_0)}{h'(z_0)}$.
Here: $f(z)=1, g(z)=\sin(\pi/z)$ and $z_0=1/n$.
$$\implies \operatorname{Res}(f,1/n)=\left.\frac{1}{-\frac{\pi}{z^2}\cos(\pi/z)}\right|_{z=1/n}=\frac{(-1)^{n+1}}{n^2\pi}$$
