Show $\sum_{n=0}^\infty\frac{1}{a^2+n^2}=\frac{1+a\pi\coth a\pi}{2a^2}$

Related problems: (I), (II). This problem is a direct application of Fourier transform and Poisson summation formula. Recalling the definition of Fourier transform and the Poisson summation formula respectively

$$ F(w) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty} f(x) e^{-ixw} dx \,,$$

$$ \sum_{-\infty}^{\infty} f(n) = \sqrt{2\pi}\sum_{-\infty}^{\infty} F(2n\pi)\,, $$

where $F$ is the Fourier transform of $f$. Advancing with our problem, first, we compute the Fourier transform of $ f(x)=\frac{1}{x^2+a^2} $ which is equal to

$$ F(w) = \sqrt{\frac{\pi}{2}}\frac{1}{a}e^{-a|w|}\,.$$

Applying Poisson formula, we have

$$ \sum_{n=0}^{\infty}\frac{1}{n^2+a^2} = \frac{\pi}{a}\sum_{n=0}^{\infty}e^{-2an\pi} = \frac{\pi}{a} \sum_{n=0}^{\infty}r^{n}=\frac{\pi}{a}\frac{1}{1-r}\,,\quad r = e^{-2 \pi a} \,,$$

$$\Rightarrow \sum_{n=0}^{\infty}\frac{1}{n^2+a^2} = \frac{\pi}{a} \frac{1}{1-e^{-2a\pi}}=\frac{\pi}{a} \frac{e^{2a\pi}}{e^{2a\pi}-1} \,. $$

Now, I leave it to you to manipulate the above expression to reach the form

$$ \sum_{n=0}^\infty\frac{1}{a^2+n^2}=\frac{1+a\pi\coth a\pi}{2a^2} $$

You can use the identity

$$ \coth x = \frac{\cosh x}{\sinh x} = \frac {e^x + e^{-x}} {e^x - e^{-x}} = \frac{e^{2x} + 1} {e^{2x} - 1} \,. $$


It is well known that

$$\sum_{n=-\infty}^\infty f(n)= -\sum_{j=1}^k \operatorname*{Res}_{z=j}\pi \cot (\pi z)f(z) $$

Assume $a \neq 0$.

To find the residues of $g(z) := \pi \cot (\pi z)\frac{1}{a^2+n^2}$, we see

$$\frac{1}{a^2+n^2} = \frac{1}{(n+ia)(n-ia)}$$

so $g$ has poles at $z_1 = ia$ and $z_2 = -ia$. Their respective residues, $b_1$ and $b_2$ can be found:

$$b_1 = \operatorname*{Res}_{z=ia}\,g(z) = \lim_{z \to ia} \pi \cot (\pi z)\frac{(z-ia)}{(z+ia)(z-ia)} = \pi \cot (\pi i a)\frac{1}{2ia} = -\frac{\pi \coth (\pi a)}{2a}$$

$$b_2 = \operatorname*{Res}_{z=-ia}\,g(z) = \lim_{z \to -ia} \pi \cot (\pi z)\frac{(z+ia)}{(z+ia)(z-ia)} = -\pi \cot (-\pi i a)\frac{1}{2ia} = -\frac{\pi \coth (\pi a)}{2a}$$

And finally:

$$\sum_{k=-\infty}^\infty \frac{1}{a^2+k^2} = -(b_1+b_2)=\frac{\pi \coth (\pi a)}{a}$$

To change the starting number from $-\infty$ to $0$, we divide the series, as it is symmetrical (i.e. $g(n)=g(-n)$):

$$ \sum_{k=-\infty}^\infty \frac{1}{a^2+k^2}= \frac{\pi \coth (\pi a)}{a}=\\ \sum_{k=-\infty}^{-1} \frac{1}{a^2+k^2}+\frac{1}{a^2}+\sum_{k=1}^\infty \frac{1}{a^2+k^2}=\\ \frac{1}{a^2}+2\sum_{k=1}^\infty \frac{1}{a^2+k^2}=\\ \frac{1}{a^2}+2\left(\sum_{k=0}^\infty \frac{1}{a^2+k^2}-\frac{1}{a^2}\right)=\\ 2\sum_{k=0}^\infty \frac{1}{a^2+k^2}-\frac{1}{a^2} $$

Thus

$$\sum_{k=0}^\infty \frac{1}{a^2+k^2} = \frac{\pi \coth (\pi a)}{2a}+\frac{1}{2a^2} = \frac{\pi a\coth (\pi a)+1}{2a^2}$$


Now, a real analytic proof. This one has no flaws (I hope).

Lemma 1. Integration by parts gives: $$\frac{1}{a}\int_{0}^{+\infty}\cos(n x)\,e^{-a x}\,dx = \frac{1}{a^2+n^2} = \int_{0}^{+\infty}\frac{\sin(n x)}{n}\,e^{-a x}\,dx.$$

Lemma 2. The series $$\sum_{n=1}^{+\infty}\frac{\sin(nx)}{n}$$ converges on $\mathbb{R}\setminus 2\pi\mathbb{Z}$ to the function: $$ f(x) = \pi\left(\frac{1}{2}-\left\{\frac{x}{2\pi}\right\}\right).$$

Lemma 3. The dominated convergence theorem hence gives: $$\sum_{n=1}^{+\infty}\frac{1}{a^2+n^2}=\pi\int_{0}^{+\infty}\left(\frac{1}{2}-\left\{\frac{x}{2\pi}\right\}\right)e^{-ax}\,dx,$$ and by splitting $[0,+\infty)$ as $[0,2\pi)\cup[2\pi,4\pi)\cup\ldots$ we have:

$$\sum_{n=1}^{+\infty}\frac{1}{a^2+n^2}=\frac{e^{2a\pi}}{e^{2a\pi}-1}\int_{0}^{2\pi}\frac{\pi-x}{2}e^{-ax}dx=\frac{\pi a \coth(\pi a)-1}{2a^2}.$$