Show $\sum_{n=0}^\infty\frac{1}{a^2+n^2}=\frac{1+a\pi\coth a\pi}{2a^2}$
How to show the following equality? $$\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}.$$
This one is a proof I gave when I was attending my high school, before studying complex analysis. It is a bit flawed, but just a little.
Step 1. If $p(x)$ is a real polynomial satisfying $p(0)=1$ and its roots are simple and real, $$\sum_{\xi:p(\xi)=0}\frac{1}{\xi}=-\frac{p'(0)}{p(0)}$$ follows from Vieta's theorem.
Step 2. All the roots of $\frac{\sin x}{x}$ are simple and real. Moreover, $$\frac{\sin x}{x}=\prod_{n=1}^{+\infty}\left(1-\frac{x^2}{\pi^2 n^2}\right)$$ holds. It is the Weierstrass product for the sine function.
Step 3. $\{a^2+1,a^2+2^2,a^2+3^2,\ldots\}$ is the zero set of the function: $$f(x)=\frac{\sinh\left(\pi\sqrt{a^2-x}\right)}{\pi\sqrt{a^2-x}}.$$
Step 4. Since $$f(0)=\frac{\sinh(\pi a)}{\pi a},\qquad f'(0)=-\frac{\cosh(\pi a)}{2a^2}+\frac{\sinh(\pi a)}{2\pi a^4},$$ Step 1 gives:
$$\sum_{n=1}^{+\infty}\frac{1}{n^2+a^2}=\frac{\pi a \coth(\pi a)-1}{2a^2}.$$
Known issues: the determination of the square root function and the fact that we can treat $\frac{\sin x}{x}$ like an "infinite degree" polynomial with known roots. Beyond the naif approach, this shows that the Vieta's theorem for polynomials and the residue theorem for meromorphic functions are very closely related.