Integral $\int_0^\infty \frac{\sin^2(x)}{x^2(x^2+1)} dx$ =? After reading articles on differentiation under the integral sign, I hit this post from MIT OCW, where after introducing the power tool, it challenges reader to do
$$\int_0^\infty \frac{\sin^2(x)}{x^2(x^2+1)} dx$$
Obviously I have no clue where to start. Could any one give a hint?
 A: 
Could any one give a hint?

Partial fraction decomposition, together with the fact that 


*

*$\displaystyle\int_0^\infty\frac{\sin^2x}{x^2}dx=\frac\pi2$ 

*$\sin^2x=\dfrac{1-\cos2x}2$

*$\displaystyle\int_0^\infty\frac{\cos x}{x^2+a^2}dx=\frac\pi{2a~e^a}$
A: This is a possible way to evaluate the integral. Partial fraction decomposition and the double angle formula yield
$$\int^\infty_0\frac{\sin^2{x}}{x^2(1+x^2)}dx=\frac{1}{2}\int^\infty_0\frac{1-\cos{2x}}{x^2}dx-\frac{1}{2}\int^\infty_0\frac{1-\cos{2x}}{1+x^2}dx$$
The first integral can be evaluated in many ways, differentiation under the integral sign is one of them. I prefer to proceed with a simple fact that follows from the definition of the gamma function.
$$\int^{\infty}_0t^{n-1}e^{-xt} \ dt=\frac{\Gamma(n)}{x^n}$$
Hence the first integral is
\begin{align}
\frac{1}{2}\int^\infty_0\frac{1-\cos{2x}}{x^2}dx
&=\frac{1}{2}\int^\infty_0(1-\cos{2x})\int^\infty_0te^{-xt} \ dt \ dx\\
&=\frac{1}{2}\int^\infty_0t\int^\infty_0e^{-xt}(1-\cos{2x}) \ dx \ dt\\
&=\int^\infty_0\left(\int^\infty_0e^{-xt}\sin{2x} \ dx\right)dt\\
&=\int^\infty_0\frac{2}{t^2+4}dt\\
&=\frac{\pi}{2}\\
\end{align}
The second integral can be broken up further and evaluated using the residue theorem.
\begin{align}
\frac{1}{2}\int^\infty_0\frac{1-\cos{2x}}{1+x^2}dx
&=\frac{\pi}{4}-\frac{1}{4}\Re\oint_{\Gamma}\frac{e^{2iz}}{1+z^2}dz\\
&=\frac{\pi}{4}-\frac{1}{2}\Re\left(\pi i\operatorname{Res}(f,i)\right)\\
&=\frac{\pi}{4}-\frac{1}{2}\Re\left(\pi i\frac{e^{-2}}{2i}\right)\\
&=\frac{\pi}{4}-\frac{\pi}{4e^2}
\end{align}
Hence
$$\int^\infty_0\frac{\sin^2{x}}{x^2(1+x^2)}dx=\frac{\pi}{4}\left(1+e^{-2}\right)$$
