Calculate integral $ \int_{0}^{\infty}\frac{1 - at^{2}}{(1 + bt^{2})^{3}} \cos(nt)dt $ How to calculate the following
definite integral containing cosine and rational function of polynomial
$$
\int_{0}^{\infty}\frac{\left(1 - at^{2}\right)\cos\left(nt\right)}{\left(1 + bt^{2}\right)^{3}}\,{\rm d}t\ ?
$$
Here $a, b$ and $n$ are positive constants, greater than $1$.
 A: HINT:
Note that
$$\int_0^\infty \frac{(1-at^2)\cos(nt)}{(1+bt^2)^3}\,dt=\frac12 \text{Re}\left(\int_{-\infty}^\infty \frac{(1-ax^2)e^{inx}}{(1+bx^2)^3}\,dx\right)$$
Move to the complex plane, close the contour in the upper-half plane, and apply the residue theorem.  Note that the pole at $i/\sqrt b$ is of third order.
A: Rewrite the integral as
$$I =\int_0^{\infty} \frac{(1-at^2)\cos(nt)}{(1+bt^2)^3}dt
=\frac1{b^3}\int_0^{\infty} \frac{\cos(n t)}{(\frac1b +t^2)^3}dt
-\frac a{b^3}\int_0^{\infty} \frac{t^2\cos(n t)}{(\frac1b +t^2)^3}dt \tag1
$$
and note that
$$J(p,q)=\int_{0}^{\infty} \frac{\cos(p t)}{q+ t^2} dt
=\frac{\pi e^{-p\sqrt{q}}}{2\sqrt{q}}$$
obtained via $J_p’’(p,q)=qJ(p,q)
$, along with $J(0,q) = \frac{\pi}{2\sqrt{q}}$ and $J_p’(0,q)= -\frac\pi2$. Then, evaluate the two integrals in (1) as follows
$$\int_0^{\infty} \frac{\cos(n t)}{(\frac1b+t^2)^3}dt
= \frac12 \frac{\partial^2 J(p,q)}{\partial q^2}\bigg|_{q=\frac1b,p=n}
=\frac{\pi}{16}e^{-\frac n{b^{1/2}}}b^{3/2}(n^2+3n b^{1/2}+3b)
$$
$$\int_0^{\infty} \frac{t^2\cos(n t)}{(\frac1b+t^2)^3}dt
= -\frac12 \frac{\partial^2\partial^2 J(p,q)}{\partial p^2\partial q^2}\bigg|_{q=\frac1b,p=n}
=-\frac{\pi}{16}e^{-\frac n{b^{1/2}}}b^{1/2}(n^2-n b^{1/2}-b)
$$
As a result
$$ I =\frac{\pi}{16}e^{-\frac n{b^{1/2}}}
\left[ \frac{n^2}{b^{3/2}}\left(1+\frac ab\right)+\left(\frac nb+\frac1{b^{1/2}}\right)\left(3-\frac ab\right)\right]
$$
