# How to prove that $\sum_{n=1}^{+\infty}\frac{1}{n^2+1}=\frac{-1+\pi \coth (\pi)}{2}$?

I typed into my Mathematica:$\sum _{n=1}^{\infty } \frac{1}{n^2+1}$ , and the result was: $$\frac{-1+\pi \coth (\pi)}{2}$$ I know how to estimate the aforementioned sum , but I have no idea how to get its closed form.

• I believe I accidentally found this sum a long time ago whilst determining the Fourier series of a $2 \pi$ periodic function which is $0$ where $-\pi < x \leq 0$ and $e^x$ where $0 < x \leq \pi$. If you're familiar with Fourier series you could try that. – G. H. Faust Feb 18 '14 at 13:35
• @G.H.Faust Interesting, $\mathcal{F}_{\omega }^{-1}\left\{\frac{1}{\omega ^2+1}\right\}(t)=\frac{e^{-|t|}}{2}$ , then $F_n=\frac{1}{2\pi }\int _{-\pi }^{\pi }e^{-|t|}\cdot\Pi\left(\frac{t}{2\pi}\right) e^{-i n t}dt = \frac{(-1)^n e^{-\pi } \left(-1+(-1)^n e^{\pi }\right)}{\left(1+n^2\right) \pi }$ , and $f_n=\frac{1}{2\pi }\int _{-\pi }^{\pi }h(t) e^{-i n t}dt=\frac{i \left(-1+(-1)^n e^{\pi }\right)}{2 (i+n) \pi }$, where $h(t)$ is your function. It gives possibility of solving the problem, but I feel something like a lack of systematics. – Darius Feb 18 '14 at 16:20
• I'm not $100$% sure what you're doing or saying there, but I checked the series from the function I described and it did provide the correct result without much difficulty (using equations from evaluating the series at $0$ and $\pi$). It looks like you're using the exponential form of the series, which might not be helpful. – G. H. Faust Feb 18 '14 at 17:57
• @G.H.Faust I am using in my Mathemathica: FourierCoefficient[HeavisidePi[(t - Pi/2)/Pi]*E^t, t, n] and FourierCoefficient[HeavisidePi[t/2/Pi]*E^(-Abs[t]), t, n]. Interesting , you inspired some idea. If $g(t)=e^{-|t|}\cdot\Pi\left(\frac{t}{2pi}\right)$ and $f(t)=\sum_{n=-\infty}^{+\infty}g(t+2n\pi)$ then I have just to consider $f(0)$ and $f(\pi)$, remembering also that $f(t)=\sum_{n=-\infty}^{+\infty}F_n\cdot e^{i\cdot n t}$ , where $F_n=\frac{1}{2\pi}\int_{-\pi}^{+\pi}g(t)e^{-i\cdot n t}$, which makes solution more systematic. – Darius Feb 18 '14 at 19:37
• There is standard technique for this kind of sum which is documented at this MSE link. – Marko Riedel Feb 18 '14 at 23:46

Knowing the partial fraction decomposition of the cotangent [a standard (because it's easy to derive and very useful) example in complex analysis texts illustrating the Mittag-Leffler theorem],

$$\pi \cot \pi z = \frac{1}{z} + \sum_{n\neq 0} \frac{1}{z-n} + \frac{1}{n} = \lim_{N\to\infty} \sum_{n=-N}^N \frac{1}{z-n},$$

we can compute the sum of all series of the form

$$\sum_{n=1}^\infty \frac{1}{n^2 - a^2}$$

where $a$ is not an integer:

\begin{align} \sum_{n=1}^\infty \frac{1}{n^2-a^2} &= \lim_{N\to\infty}\sum_{n=1}^N \frac{1}{n^2-a^2}\\ &= -\frac{1}{2a}\lim_{N\to\infty} \sum_{n=1}^N \frac{1}{a-n} + \frac{1}{a+n}\\ &= -\frac{1}{2a}\lim_{N\to\infty} \left(-\frac{1}{a} +\sum_{n=-N}^N \frac{1}{a-n}\right)\\ &= -\frac{1}{2a}\left(\pi \cot \pi a - \frac{1}{a}\right)\\ &= \frac{1-\pi a\cot \pi a}{2a^2}. \end{align}

To obtain the terms $\frac{1}{n^2+1}$ we choose $a = i$ and get

$$\sum_{n=1}^\infty \frac{1}{n^2+1} = \frac{1 - \pi i \cot \pi i}{2i^2}.$$

Using $i^2 = -1$ in the denominator and

$$\cot \pi i = \frac{\cos \pi i}{\sin \pi i} = \frac{\cosh \pi}{i\sinh\pi} = \frac{1}{i}\coth \pi,$$

the result becomes

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

• Perhaps it would be best to explain how the series for the cotangent function was derived? – Lucian Feb 18 '14 at 13:57
• Do you mean I should add the derivation, or just say that it is a standard complex analysis result? The first seems a bit much (though if one assumes enough things, it's doable), the second doesn't seem to really add something. I don't see a sweet spot in between, have you any suggestions for that? – Daniel Fischer Feb 18 '14 at 14:01
• No, that's OK. At least now I know where it comes from. Thanks! – Lucian Feb 18 '14 at 14:34