My Tips for Converting Integrals into Series
We begin with Euler’s product formula for sine:
\[ \sin x = x\prod_{n=1}^{\infty}\left(1-\frac{x^2}{n^2\pi^2}\right) \]
Substituting \(x=\pi t\) and taking the natural logarithm of both sides gives:
\[ \ln\left(\frac{\sin\pi t}{\pi t}\right) = \sum_{n=1}^{\infty} \ln \left(1-\frac{t^2}{n^2}\right) \]
Since the series converges uniformly on compact subsets of \((-1, 1)\), we may differentiate both sides term by term with respect to \(t\),
\[ -\frac{\pi\cot(\pi t)}{2t} + \frac{1}{2t^2} = \sum_{n=1}^{\infty} \frac{1}{n^2-t^2} \]
Finally, setting \(t=-iu\) (equivalently, continuing analytically to the imaginary axis) yields:
\[ \frac{\pi\coth(\pi u)}{2u} - \frac{1}{2u^2} = \sum_{n=1}^{\infty} \frac{1}{n^2+u^2} \]