Evaluating $\sum_{n=1}^{\infty} \frac{1}{n^2+1}$

This sum is harder, and perhaps less natural, to find than the sum for $\sum \frac{1}{n^2}$. We use Fourier series of $e^{x}$ with respect to $\{e^{i nx} / 2\pi\}$and apply Parseval's theorem.

Note that we can use this method of evaluation to find $\sum \frac{1}{n^2}$, too! We do the same for the (simpler) function $f(x) = x$. We could also directly evaluate the Fourier series for $f(x) = (\pi - |x|)^2$ on $(-\pi, \pi)$ at $x = 0$ to conclude the same (this function aso gives us the sum $\sum \frac{1}{n^4} = \frac{\pi^4}{90}$). (Source of these examples to Rudin's Principles of Mathematical Analysis)

We begin by calculating $\displaystyle \int_{-\pi}^{\pi} |f(x)|^2 \, dx = \int_{-\pi}^{\pi} e^{2x} \, dx = \frac{e^{2\pi} - e^{-2\pi}}{2}$.

Moving on to the Fourier coefficients, we have $c_n = \displaystyle \dfrac{1}{\sqrt{2\pi}} \int_{-\pi}^{\pi} e^{-inx+x} \, dx = \dfrac{1}{\sqrt{2\pi}}\left( \int_{-\pi}^{\pi} e^x \cos(nx)\,dx - i\int_{-\pi}^{\pi} e^x \sin(nx)\,dx\right).$ Integrating the first integral with parts $f = \cos(nx)$ and $e^x\,dx = dg$ we get $$\left.e^x \cos(nx)\right|_{-\pi}^{\pi} + n\int_{-\pi}^{\pi} e^x \sin(nx)\,dx$$

We integrate by parts again and combine the resulting "like terms" (integrals) to get $$(n^2+1) \int_{-\pi}^{\pi} e^x \cos(nx) \, dx = e^x (\cos(nx) + n \sin(nx))|_{-\pi}^{\pi} = (-1)^n (e^{\pi} - e^{-\pi})$$

and so $$\frac{1}{\sqrt{2\pi}} \int_{-\pi}^{\pi} e^x \cos(nx) = \frac{(-1)^n}{\sqrt{2\pi}} \frac{e^{\pi} - e^{-\pi}}{n^2 + 1}.$$

Similarly, we get $$\dfrac{1}{\sqrt{2\pi}} \int_{-\pi}^{\pi} e^x \sin(nx) \, dx = -\frac{n(-1)^n}{\sqrt{2\pi}} \frac{e^{\pi} - e^{-\pi}}{n^2 + 1}.$$

Hence $$|c_n|^2 = \frac{(e^\pi - e^{-\pi})^2 + n^2 (e^{\pi} - e^{-\pi})^2}{2\pi(n^2+1)^2} = \frac{1}{2\pi}\frac{(e^{\pi}-e^{-\pi})^2}{n^2+1}$$ since $|a+bi|^2 = a^2 + b^2$.

Putting it all together using Parseval's formula we have

\begin{align} \sum_{n=-\infty}^{\infty} |c_n|^2 &= \int_{-\pi}^{\pi} |f(x)|^2 \, dx \\ \frac{1}{2\pi} \sum_{n=-\infty}^{\infty} \frac{(e^\pi - e^{-\pi})^2}{n^2+1} &= \frac{e^{2\pi}-e^{-2\pi}}{2}\\ \sum_{n=-\infty}^{\infty} \frac{1}{n^2 + 1} &= \pi\frac{e^{2\pi} - e^{-2\pi}}{(e^\pi - e^{-\pi})^2}\\ 2 \sum_{n=1}^{\infty} \frac{1}{n^2+ 1} &= \pi \frac{e^\pi + e^{-\pi}}{e^{\pi} - e^{-\pi}} - 1\\ \sum_{n=1}^{\infty} \frac{1}{n^2 + 1} &= \frac{\pi \coth \pi - 1}{2} \end{align}

where we use $e^{2\pi} - e^{-2\pi} = (e^{\pi} - e^{-\pi})(e^{\pi}+e^{-\pi})$ and $c_n = c_{-n}$ in the third line.


This is relatively straightforward if you know the series expansion for $\cot(x)$ from calculus:

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


Why do you find it ridiculous ?

It is very classical, in particular for all series of the form

$$\sum_{n=1}^{\infty} R(n) \ \ \text{where} \ \ R=P/Q \ \ \text{is a rational expression with} \ \ deg(Q)>deg(P)+1$$

For individual cases, you may find astute ways for expressing your series for example as a Fourier sum, but for a general technique, you need residue calculus (part of complex function theory).

See the interesting paper http://www1.american.edu/academic.depts/cas/mathstat/People/kalman/pdffiles/Sixways.pdf .