TITLE: Show that $\int_0^\infty \frac{x\cos ax}{1+x^2}\coth \frac{\pi x}{4} dx=\frac{\pi}{2}e^{-a}+\cosh a\log \coth \frac{a}{2}+2\sinh a \arctan(e^{-a})-2$
QUESTION [5 upvotes]: Hi I am trying to prove this 
$$
\int_0^\infty \frac{x\cos ax}{1+x^2}\coth \frac{\pi x}{4} dx=\frac{\pi}{2}e^{-a}+\cosh a\log \coth \frac{a}{2}+2\sinh a \arctan(e^{-a})-2,\qquad a>0.
$$
What a desirable result to want to obtain!:)
I am trying to possibly reduce it to integrals of the form
$$
\int_0^\infty \frac{\cos a x}{1+x^2}dx ,\quad \int_0^\infty \frac{x\cos a x}{1+x^2}dx
$$
which are trivial to compute and the results of these seem in the answer as wel.  However  I am having trouble doing so.  Perhaps we can use
$$
\coth x=\frac{1+e^{2x}}{1-e^{-2x}}
$$
and factorize the integral into two pieces but than we have integrals of the form (excluding $\pi/4$ factor),
$$
\int_0^\infty \frac{x\cos ax}{(1+x^2)(1-e^{-2x})}dx+\int_0^\infty \frac{x\cos ax\, e^{2x}}{(1+x^2)(1-e^{-2x})}dx
$$
which seem tricky.  Is this the right approach?  How can we solve this problem?  THanks

REPLY [4 votes]: This one works well using contours.
Since the function is even, write:
$$\int_{-\infty}^{\infty}\frac{x\cos(ax)\cosh(\pi a/4)}{(x^{2}+1)\sinh(\pi a/4)}=2\int_{0}^{\infty}\frac{x\cos(ax)\cosh(\pi a/4)}{(x^{2}+1)\sinh(\pi a/4)}dx$$  
Consider $$f(z)=\frac{ze^{iaz}\cosh(\frac{\pi z}{4})}{(z^{2}+1)\sinh(\frac{\pi z}{4})}$$
and use a semicircle in the UHP centered at the origin with radius $4N+1$ (I changed this due to Random Variables advice).  That way $\coth(\pi x/4)$ remains bounded.  
The poles lie at $\pm i, \;\ 4ni$.
The pole at $-i$ can be disregarded because it is not in the contour.
So, $$2\pi i Res(f,i)=\pi e^{-a}.....(1)$$
$$2\pi i Res(f, 4ni)=32\sum_{n=0}^{\infty}\frac{ne^{-4an}}{16n^{2}-1} \;\ \;\ ***$$
The sum evaluates to:
$$2\cosh(a)log(\coth(a/2))+4\sinh(a)\tan^{-1}(e^{-a})-4$$
sum this with (1) and divide by 2 (due to the evenness), and obtain:
$$\frac{\pi}{2}e^{-a}+2\tan^{-1}(e^{-a})+\cosh(a)\ln(\coth(a/2))-2$$
To show the arc goes to 0, look at Random Variables advice below.
It was a better idea and more precise than I initially had. I had just used R instead of 4N+1.

***The sum can be done by breaking into partial fractions, using geometric series, then integrating. I let Maple do the grunt work. 
$$32\sum_{n=0}^{\infty}\frac{e^{-4an}n}{16n^{2}-1}=4\sum_{n=0}^{\infty}\frac{e^{-4an}}{4n+1}+4\sum_{n=0}^{\infty}\frac{e^{-4an}}{4n-1}$$
$$=4\sum_{n=0}^{\infty}\int_{0}^{1}(e^{-4a}x^{4})^{n}dx+4\sum_{n=0}^{\infty}\int_{0}^{1}(e^{-4a}x^{4})^{n}x^{-2}dx$$
$$=4\int_{0}^{1}\frac{1}{1-e^{-4a}x^{4}}dx+4\int_{0}^{1}\frac{1}{x^{2}(1-e^{-4a}x^{4})}dx$$
$$=e^{-a}\ln(1+e^{-a})-e^{-a}\ln(1-e^{-a})+e^{a}\ln(1+e^{-a})-e^{a}\ln(1-e^{-a})+2e^{a}\tan^{-1}(e^{-a})-2e^{-a}\tan^{-1}(e^{-a})-4$$
which, can be written in terms of the cosh and coth by using hyperbolic/log identities.