# How to prove $\sum_{n=0}^{\infty} \frac{1}{1+n^2} = \frac{\pi+1}{2}+\frac{\pi}{e^{2\pi}-1}$

How can we prove the following

$$\sum_{n=0}^{\infty} \dfrac{1}{1+n^2} = \dfrac{\pi+1}{2}+\dfrac{\pi}{e^{2\pi}-1}$$

I tried using partial fraction and the famous result $$\sum_{n=0}^{\infty} \dfrac{1}{n^2}=\frac{\pi^2}{6}$$

But I'm stuck at this problem.

• Have you learned any residue calculus yet?
– kobe
Jan 19, 2015 at 18:28
• @kobe Not yet, I'm in high school.
– user208998
Jan 19, 2015 at 18:31
• It is $\frac{1}{2}\pi\coth\pi-\frac{1}{2}$ Jan 19, 2015 at 18:37
• For the expansion of $\coth$, see math.stackexchange.com/questions/505210/… Jan 19, 2015 at 18:41
• Not sure about the algebra-precalculus tag and by the real analysis tag are you looking for a solution using tools from real-analysis alone? Jan 19, 2015 at 19:23

First consider the following expansion of $\pi \cot(\pi z)$:

$$\pi \cot(\pi z) = \frac{1}{z} + \sum_{n = 1}^\infty \frac{2z}{z^2 - n^2} \quad (z \neq 0, \pm 1, \pm 2,\ldots)$$

Replacing $z$ by $iz$, we have

$$-i\pi \coth(\pi z) = \frac{1}{iz} - \sum_{n = 1}^\infty \frac{2iz}{z^2 + n^2} = -i\left(\frac{1}{z} + 2\sum_{n = 1}^\infty \frac{z}{z^2 + n^2}\right)$$

Thus

$$\pi \coth(\pi z) = \frac{1}{z} + 2\sum_{n = 1}^\infty \frac{z}{z^2 + n^2} \quad (z \neq 0, \pm i, \pm 2i,\ldots)$$

Evaluting at $z = 1$ results in

$$\pi \coth(\pi) = 1 + 2\sum_{n = 1}^\infty \frac{1}{1 + n^2},$$

or

$$\sum_{n = 1}^\infty \frac{1}{1 + n^2} = \frac{\pi \coth(\pi) - 1}{2}.$$

Therefore

\begin{align}\sum_{n = 0}^\infty \frac{1}{1 + n^2} &= \frac{\pi\coth(\pi)+ 1}{2}\\ &= \frac{1}{2}\left(\frac{\pi(e^{\pi} + e^{-\pi})}{e^{\pi} - e^{-\pi}} + 1\right)\\ &= \frac{1}{2}\left(\frac{\pi(e^{2\pi} + 1)}{e^{2\pi} - 1} + 1\right)\\ &= \frac{(\pi + 1)e^{2\pi} + (\pi - 1)}{2(e^{2\pi} - 1)}\\ &= \frac{(\pi + 1)(e^{2\pi} - 1) + 2\pi}{2(e^{2\pi} - 1)}\\ &= \frac{\pi + 1}{2} + \frac{\pi}{e^{2\pi} - 1}.\\ \end{align}

• @ kobe Well done, but there's an error in the first formula of the last block. It should read as in the line before. This error leads to a wrong formula which, unfortunaletly, appears in the heading of the OP as well. I recommend you correct both errors. Dec 9, 2019 at 14:11
• I'm not seeing the error, @Dr.WolfgangHintze. The OP's formula is correct. You can check here and here.
– kobe
Dec 9, 2019 at 19:47
• @ kobe , I'm sorry. You are right,the formula is correct. I didn't notice that you switched from first index 1 to first index 0 with which it is correct. I'll correct my comment. Dec 9, 2019 at 21:20

Hint: Differentiate the natural logarithm of Euler's infinite product expression for the sine function, then use the well-known relations between trigonometric and hyperbolic functions.