<s>[INST] 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.
 [/INST] HINT:
$$I=\int\frac{x^2dx}{(x^2+1)^2}=\int x\cdot \frac x{(x^2+1)^2}dx$$
Integrating by parts, 
$$I=x\int \frac x{(x^2+1)^2}dx-\int\left(\frac{d(x)}{dx}\cdot \frac x{(x^2+1)^2}dx\right)dx$$
$$\text{As }\int \frac x{(x^2+1)^2}dx=\frac12\int\frac{d(x^2+1)}{(x^2+1)^2}=-\frac1{2(x^2+1)}$$
$$I=-x\cdot\frac1{2(x^2+1)}+\int \frac1{2(x^2+1)}dx=-\frac x{2(x^2+1)}+\frac{\arctan x}2+C $$
Can you take it from here?
</s>