TITLE: Calculate the value of the integral $\int_{0}^{\infty} \frac{\cos 3x}{(x^{2}+a^{2})^{2}} dx$ where $a>0$ is an arbitrary positive number.
QUESTION [6 upvotes]: Question: Calculate the value of the integral $ \displaystyle \int_{0}^{\infty} \frac{\cos 3x}{(x^{2}+a^{2})^{2}} dx$ where $a>0$ is an arbitrary positive number.
Thoughts: I don't know how to establish convergence so that a symmetric limit can be used, but if I can do so, then we have that the integral equals $\displaystyle \frac{1}{2} \int_{-\infty}^{\infty} \frac{\cos 3x}{(x^{2}+a^{2})^{2}} dx = \displaystyle \lim_{R \to \infty} \int_{-R}^{R} \frac{\cos 3x}{(x^{2}+a^{2})^{2}} dx = Re \left (\displaystyle \lim_{R \to \infty} \int_{-R}^{R} \frac{e^{i(3x)}}{(x^{2}+a^{2})^{2}} dx  \right ) $
which has double poles at $x=ia$ and $x=-ia$, so the integral may be evaluated by calculating residues. Can anyone show me how to solve the problem? All input is appreciated, I am studying for an exam in complex analysis.

REPLY [4 votes]: If you are interested in another method:
$$\begin{aligned}f(t)=\int_0^{\infty} \frac{\cos 3xt}{(x^2+a^2)^2}\,dx\Rightarrow \mathcal{L}\{f(t)\} &=\int_0^{\infty}e^{-st}\int_0^{\infty}\frac{\cos 3xt}{(x^2+a^2)^2}\,dx\,dt\\&=\int_0^{\infty}\frac{1}{(x^2+a^2)^2}\int_0^{\infty} e^{-st}\cos 3xt\,dt\,dx\\&=\int_0^{\infty}\frac{s\,dx}{(x^2+a^2)^2(9x^2+s^2)}\\&=\frac{3\pi}{2a^2(3a+s)^2}+\frac{\pi s}{4a^3(3a+s)^2}\end{aligned}$$
Which follows from a quick partial fraction decomposition.
Next,
$$\mathcal{L}^{-1}\left\{\frac{3\pi}{2a^2(3a+s)^2}\right\}+\mathcal{L}^{-1}\left\{\frac{\pi s}{4a^3(3a+s)^2}\right\}=\frac{3\pi t}{2a^2e^{3at}}+\frac{\pi(1-3at)}{4a^3e^{3at}}$$
By setting, $t=1$, we get:
$$\int_0^{\infty}\frac{\cos 3x\,dx}{(x^2+a^2)^2}=\frac{\pi(3a+1) }{4a^3e^{3a}}$$