Evaluating $\int^{\infty}_{0}\frac{\cos x}{(x^2+1)^2}dx$ 
Finding value of $\displaystyle \int^{\infty}_{0}\frac{x\sin x}{(x^2+1)^3}dx$

Let $$ I = \frac{1}{2}\int^{\infty}_{0}\sin x\frac{2x}{(x^2+1)^3}dx$$
Integrating by parts
$$ \Rightarrow I = -\frac{\sin x}{(x^2+1)^2}\bigg|^{\infty}_{0}+\int^{\infty}_{0}\frac{\cos x}{(x^2+1)^2}dx=\int^{\infty}_{0}\frac{\cos x}{(x^2+1)^2}dx$$ 
How do i solve it? 

$$I=\int_0^\infty \frac{x \sin x}{(1+x^2)^3}dx=-\frac14 \underbrace{\frac{\sin x}{(1+x^2)^2}\bigg|_0^\infty}_{=0} +\frac14 \int_0^\infty \frac{\cos x}{(1+x^2)^2}dx $$
Now we have that $I=-\frac14 J'(1)$ because we can take: $$J(a)=\int_0^\infty \frac{\cos x}{a+x^2}dx \Rightarrow J'(a)=-\int_0^\infty \frac{\cos x}{(a+x^2)^2}dx$$
Thus all we need to do is to find $J(a)$ then take a derivate and set $a=1$.
But one can directly find for example here that: $$J(a)=\frac{\pi}{2 \sqrt a }e^{-\sqrt a}\Rightarrow J'(a)=\frac{\pi}{2}\left(-\frac12 a^{-3/2}e^{-\sqrt a} -\frac{1}{\sqrt a} e^{-\sqrt a} \frac{1}{2\sqrt a}\right)$$
$$\Rightarrow I=-\frac14J'(1)=\frac{\pi}{8}\left(\frac12 e^{-1}+\frac12 e^{-1}\right)=\frac{\pi}{8e}$$
