# How to calculate the residues of $\frac{\pi \cot(\pi z)}{1+z^2}$ at poles $i, -i, 0$

In an effort to find the infinite sum $\sum{\frac{1}{n^2+1}}$ I need to calculate the residues of $\frac{\pi \cot(\pi z)}{1+z^2}$ at poles $i, -i, 0$. I have two questions: first, how do I do this? I am used to denominators like $n^2$ but not $1 + n^2$, so it doesn't appear to be as simple as taking the Laurent expansion for $\cot(u)$ and finding the $u$ term. Second, why am I not also looking at the poles $1, 2, 3,\ldots$ since certainly $\sin(k\pi) = 0$ for $k \in \mathbb{N}$?

-

Factor ${z^2} + 1$ as ${z^2} + 1 = (z + i)(z - i)$. Then, using $i\cot (iz) = \coth (z)$, we have $${\text{Res}}(\pi \cot (\pi z);i) = \mathop {\lim }\limits_{z \to i} \frac{{(z - i)\pi \cot (\pi z)}}{{(z + i)(z - i)}} = - \frac{{\pi \coth (\pi )}}{2}$$ and $${\text{Res}}(\pi \cot (\pi z); - i) = \mathop {\lim }\limits_{z \to - i} \frac{{(z + i)\pi \cot (\pi z)}}{{(z + i)(z - i)}} = - \frac{{\pi \coth (\pi )}}{2}$$ so $$\sum\limits_{n = - \infty }^\infty {\frac{1}{{{n^2} + 1}} = } - \sum {{\text{Res}}(\pi \cot (\pi z);{z_k})} = \pi \coth (\pi ).$$ Therefore $$\sum\limits_{n = - \infty }^\infty {\frac{1}{{{n^2} + 1}} = } \sum\limits_{n = - \infty }^{ - 1} {\frac{1}{{{n^2} + 1}} + \sum\limits_{n = 0}^0 {\frac{1}{{{n^2} + 1}} + \sum\limits_{n = 1}^\infty {\frac{1}{{{n^2} + 1}} = } } } 1 + 2\sum\limits_{n = 1}^\infty {\frac{1}{{{n^2} + 1}}} = \pi \coth (\pi )$$ i.e. $$\sum\limits_{n = 1}^\infty {\frac{1}{{{n^2} + 1}}} = \frac{{\pi \coth (\pi ) - 1}}{2}$$ because ${(- n)^2} = {n^2}$. Hope this helps.