Compute $ \int_{-\infty}^{\infty} \frac{x^2}{(1+x^2)^2} dx$ Compute $$ \int_{-\infty}^{\infty} \frac{x^2}{(1+x^2)^2} dx$$
Of course we have $$ \int_{-\infty}^{\infty} \frac{x^2}{(1+x^2)^2} dx = 2 \int_{0}^{\infty} \frac{x^2}{(1+x^2)^2} dx = 2 \int_{0}^{\infty} \left( \frac{x}{1+x^2}  \right) ^2 dx =  \lim_{ A \to \infty }  \int_{0}^{A} \left( \frac{x}{1+x^2}  \right) ^2 dx $$
I think that firstly I should compute $ \int \left( \frac{x}{1+x^2}  \right) ^2 dx $ but I don't have idea.

This integral may be evaluated using the residue theorem.  The integrand has poles at $x=\pm i$; if we close with a contour in the upper half plane, then we need only worry about the pole at $x=i$.  The integral is therefore
$$i 2 \pi \left [\frac{d}{dx} \frac{x^2}{(x+i)^2} \right ]_{x=i} = i 2 \pi\left [\frac{i 2 x}{(x+i)^3} \right ]_{x=i} = i 2 \pi \frac{-i}{4} = \frac{\pi}{2}$$
