# Integral $\int_0^\infty \frac{\sin x}{\cosh ax+\cos x}\frac{x}{x^2-\pi^2}dx=\tan^{-1}\left(\frac{1}{a}\right)-\frac{1}{a}$

Please help me prove the following identity: $$\int_0^\infty \frac{\sin x}{\cosh ax+\cos x}\frac{x}{x^2-\pi^2}dx=\tan^{-1}\left(\frac{1}{a}\right)-\frac{1}{a}\quad a>0$$ This integral is from Gradshteyn and Ryzhik's tables.

• I managed to reduce it down to $$2\sum_{n=1}^{\infty} \frac{(-1)^n}{n}\frac{\partial}{\partial a}\left(\int_0^{\infty} \frac{\sin(nx)e^{-anx}}{x^2-\pi^2}\,dx\right)$$ but I can't evaluate the integral in terms of $n$ and $a$ and I am not sure if what I have reached is correct. – Pranav Arora Jun 6 '14 at 9:49
• Maybe Plancherels Theorem can help? – TheOscillator Jun 6 '14 at 10:46

Lemma. For $a>0$ and $x\in\Bbb{R}$, $$\sum_{n=1}^\infty2(-1)^{n-1}\sin(nx)e^{-anx}=\frac{\sin x}{\cosh(ax)+\cos x}\tag {1}$$
Proof. Indeed, \eqalign{ \sum_{n=1}^\infty2(-1)^{n-1}\sin(nx)e^{-anx}&= -2\Im\left(\sum_{n=1}^\infty(-1)^n e^{(i-a)nx}\right)\cr &=2\Im\left(\frac{e^{(i-a)x}}{1+e^{(i-a)x}}\right)\cr &=\frac{\sin x}{\cosh(ax)+\cos x}.\qquad\square }
Now, let $$I(a)=\int_0^\infty\frac{\sin x}{\cosh(ax)+\cos x}\cdot\frac{x}{x^2-\pi^2}\,dx.$$ Then \eqalign{ I(a)&=\sum_{n=1}^\infty2(-1)^{n-1}\int_0^\infty\frac{x}{x^2-\pi^2}\sin(nx)e^{-anx}dx\cr &=\sum_{n=1}^\infty2(-1)^{n-1}\int_0^\infty\frac{t}{t^2-n^2\pi^2}\sin t e^{-at}dt\cr &=\int_0^\infty\left(\sum_{n=1}^\infty\frac{2t(-1)^{n-1}}{t^2-n^2\pi^2}\right)\sin t e^{-at}dt\cr &\buildrel{(*)}\over{=}\int_0^\infty\left(\frac{1}{t}-\frac{1}{\sin t}\right)\sin t e^{-at}dt\cr &=\int_0^\infty\frac{\sin t}{t} e^{-at}dt-\int_0^\infty e^{-at}dt\cr &=\arctan\frac{1}{a}-\frac{1}{a} } as desired.
For more information on the partial fraction decomposition $(*)$ of the $\csc$ function, one may consult Alfors' Book Chapter 5. pp.185--188. $\qquad\square$