# 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?

• Notice $\int_0^\infty \frac{\cos x}{(1+x^2)^2} dx = \frac12 \int_{-\infty}^\infty \frac{e^{ix}}{(1+x^2)^2}dx$. You can evaluate integral on RHS by converting it to a contour integral over the upper half-plane and take residue at $x = i$ – achille hui Mar 29 '19 at 14:28
• Break the polynomial in the denominator into factors using complex numbers use partial fraction and then it is trivial – Aditya Garg Mar 29 '19 at 14:28

$$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}$$