How to compute $\int \frac{1}{(x^2+1)^2}dx$? Suppose we know $\int \frac{1-x^2}{(x^2+1)^2}=\frac{x}{x^2+1}+C$
How to compute $\int \frac{1}{(x^2+1)^2}dx$?
I tried writing it as $\frac{1+x^2-x^2}{(x^2+1)^2}=\frac{1-x^2}{(x^2+1)^2}+\frac{x^2}{(x^2+1)^2}$. But then how do you deal with $\frac{x^2}{(x^2+1)^2}$?
Some ideas?
 A: The approach shown by Elliot G is perfectly fine, but if you like a viable alternative, you may consider that:
$$ \frac{1}{x^2+1} = \frac{1}{(x+i)(x-i)} = \frac{1}{2i}\left(\frac{1}{x-i}-\frac{1}{x+i}\right) $$
hence by squaring both sides:
$$ \frac{1}{(x^2+1)^2} = -\frac{1}{4}\left(\frac{1}{(x-i)^2}+\frac{1}{(x+i)^2}-\frac{2}{x^2+1}\right)$$
so:
$$ \int\frac{dx}{(x^2+1)^2} = C+\frac{1}{4}\left(\frac{1}{x-i}+\frac{1}{x+i}\right)+\frac{1}{2}\arctan x $$
or:

$$ \int\frac{dx}{(x^2+1)^2} = C+\frac{1}{2}\left(\frac{x}{x^2+1}+\arctan x\right).$$

A: To find $$\int\frac{x^2dx}{(x^2+1)^2}$$ you may want consider the trigonometric subsitution $x=\tan t$ and $dx=\sec^2t dt$
This gives:
$$\int\frac{\tan^2t \sec^2t dt}{(\tan^2t+1)^2}=\int\frac{\tan^2t \sec^2t dt}{\sec^4t}=\int\frac{\tan^2t  dt}{\sec^2t}=\int \frac{\sin^2t\cos^2t}{\cos^2t}dt=\int \sin^2tdt$$
The last integral is easily evaluated with the reduction formula for $\sin^2t= \dfrac {1 - \cos 2 t} 2$.
A: So your problem reduces to
$$\int\frac{x^2dx}{(x^2+1)^2}$$
Integrate by parts: let $u=x$ and $dv=\frac{x}{(x^2+1)^2}dx$. Then $du=dx$ and $v=-\frac{1}{2}(x^2+1)^{-1}$ so we have
$$-\frac{1}{2}x(x^2+1)^{-1}+\frac{1}{2}\int\frac{dx}{x^2+1}$$
and that last integral may jump out at you as a particular trig derivative
