show $\int_0^{\infty} \frac{x\sin ax}{x^2+t^2}dx = \frac{\pi}{2}e^{-at}$

Using contour integration or Fourier inversion, one can show that if $a>0$ then $$ \frac{1}{\pi}\int_{-\infty}^{\infty}\frac{e^{iax}}{1+x^2}\;dx=e^{-a}$$ which implies that $$ \frac{2}{\pi}\int_{0}^{\infty}\frac{\cos(ax)}{1+x^2}\;dx=e^{-a}$$ if $a>0$. Differentiating with respect to $a$ then yields $$\int_{0}^{\infty}\frac{x\sin(ax)}{1+x^2}\;dx=\frac{\pi}{2}e^{-a}$$ and finally replacing $a$ with $at$ and making a substitution in the integral yields the desired result.



I thought it might be instructive to present a way forward that relies on real analysis only and forgoes complex analysis. To that end, we now proceed.


Let $I(a,t)$ be given by

$$\begin{align} I(a,t)&=\int_0^\infty \frac{x\sin(ax)}{x^2+t^2}\,dx\\\\ &\overbrace{=}^{x\mapsto x|t|}\int_0^\infty \frac{x\sin(a|t|x)}{x^2+1}\,dx\\\\ &=\int_0^\infty \frac{(x^2+1-1)\sin(a|t|x)}{x(x^2+1)}\,dx\\\\ &=\int_0^\infty \frac{\sin(a|t|x)}{x}\,dx-\int_0^\infty \frac{\sin(a|t|x)}{x(x^2+1)}\,dx\\\\ &=\frac\pi2\text{sgn}(a|t|)-\int_0^\infty \frac{\sin(a|t|x)}{x(x^2+1)}\,dx\tag1 \end{align}$$


For $|at|>\delta>0$, the integrals $\int_0^\infty \frac{\cos(a|t|x)}{x^2+1}\,dx$ and $\int_0^\infty \frac{x\sin(a|t|x)}{x^2+1}\,dx$ uniformly converge and we may differentiate twice (with respect to $a|t|$) under the integral on the right-hand side of $(1)$ to find for $|at|\ge \delta>0$

$$\frac{d^2I(a,t)}{d(a|t|)^2}=I(a,t)\tag2$$

The general solution to $(2)$ is $I(a,t)=Ae^{-a|t|}+Be^{a|t|}$. To find the integration constants $A$ and $B$ we invoke the conditions (i) $\lim_{at\to 0^+}I(a,t)=\frac{\pi}{2}$ and $(ii)$ $\left.\left(\frac{dI(a,t)}{d(a|t|)}\right)\right|_{a|t|=0}=-\frac\pi2$. Proceeding, we find that $A=\frac\pi2$ and $B=0$.

Putting it all together and exploiting the oddness of the integrand around $a$, we find that

$$I(a,t)=\text{sgn}(a)\frac\pi2 e^{-|at|}$$

And we are done!


By residue theorem, and due to the parity of your integrand, we can write it as

$$\frac{1}{2}\int_{-\infty}^{+\infty} \frac{z\Im \left(e^{iaz}\right)}{(z + it)(z-it)}\ dz = \frac{1}{2}\Im\int_{|z|=1} \frac{z\Im \left(e^{iaz}\right)}{(z + it)(z-it)}\ dz$$

$x = +it$ lies in the upper half plane hence by residues formula:

$$\Im \frac{1}{2}2\pi i \lim_{z\to it} (z-it)\frac{z e^{iaz}}{(z+it)(z-it)} = \Im \frac{\pi}{2}i e^{-at}$$

Whence the result

$$\color{red}{\frac{\pi}{2}e^{-at}}$$