Question: What is the value of $$\sum\_{n=1}^{\infty}\frac1{1+n^2}$$
I don't know how to solve it.  

I tried to solve it by power series, but I failed.

Answer: 
Hint:
$$\frac{\pi x}{2}\coth \pi x=\frac{1}{2}+\sum\_{n=1}^{\infty }\frac{1}{\left ( \frac{n}{x} \right )^2+1}$$
at $x=1$
$$\sum\_{n=1}^{\infty }\frac{1}{n^2+1}=\frac{\pi}{2}\coth \pi -\frac{1}{2}$$
It is shown in [this answer](https://math.stackexchange.com/a/143179) that
$$
\mathrm{PV}\sum\_{n\in\mathbb{Z}}\frac1{n+z}=\pi\cot(\pi z)\tag{1}
$$
converges for all $z\in\mathbb{C}$.
Therefore,
$$
\begin{align}
\sum\_{n=1}^\infty\frac1{n^2+z^2}
&=\frac i{2z}\sum\_{n=1}^\infty\left(\frac1{n+iz}+\frac1{-n+iz}\right)\\
&=\frac i{2z}\left[\mathrm{PV}\sum\_{n\in\mathbb{Z}}\frac1{n+iz}-\frac1{iz}\right]\\
&=-\frac1{2z^2}+\frac{\pi i}{2z}\cot(\pi iz)\\[6pt]
&=-\frac1{2z^2}+\frac\pi{2z}\coth(\pi z)\tag{2}
\end{align}
$$
Plugging in $z=1$ gives
$$
\sum\_{n=1}^\infty\frac1{n^2+1}=-\frac12+\frac\pi2\coth(\pi)\tag{3}
$$