TITLE: Find the infinite sum of the series $\sum_{n=1}^\infty \frac{1}{n^2 +1}$
QUESTION [36 upvotes]: This is a homework question whereby I am supposed to evaluate:
$$\sum_{n=1}^\infty \frac{1}{n^2 +1}$$
Wolfram Alpha outputs the answer as 
$$\frac{1}{2}(\pi \coth(\pi) - 1)$$
But I have no idea how to get there. Tried partial fractions (by splitting into imaginary components), tried comparing with the Basel problem (turns out there's little similarities), nothing worked.

REPLY [15 votes]: We can start from the Weierstrass product for the $\sinh$ function:
$$\frac{\sinh z}{z}=\prod_{n=1}^{+\infty}\left(1+\frac{z^2}{\pi^2 n^2}\right)\tag{1} $$
then consider the logarithmic derivative of both sides. This leads to:
$$\coth z-\frac{1}{z}=\sum_{n=1}^{+\infty}\frac{2z}{z^2+\pi^2 n^2}\tag{2} $$
or to:
$$\pi\coth(\pi w)-\frac{1}{w}=\sum_{n=1}^{+\infty}\frac{2w}{w^2+ n^2}.\tag{3} $$
Now just set $w=1$ in $(3)$.

Further approach: by the Poisson summation formula, since the Laplace distribution and the Cauchy distribution are related via the Fourier transform, we have that $\sum_{n\geq 0}\frac{1}{n^2+1}$ is simply related to $\sum_{n\geq 0}e^{-\pi n}$, which is a geometric series.