Can you solve $\int 1/(x^2+1)^2\, dx$ I know that the integral looks like like the anti-derivative of $\arctan$, but i don't know how to use this fact so I tried to use a fraction decomposition to: $$\frac{1}{(x^2+1)^2}$$
to solve the anti-derivative : $$\int \frac{1}{(x^2+1)^2}\, dx$$
so :$$\frac{1}{(x^2+1)^2}=\frac{A}{x^2+1}+\frac{B}{x^2+1}\iff \frac{1}{x^2+1}=A+B$$
$$1+0x^2=(A+B)x^2+(A+B)1$$
Thus I got this system of equations:
$$\cases{A+B=1 \\ A+B=0}$$ Which is impossible. I also tried to use substitution but it didn't help me.

$I=\int \frac{dx}{(x^2+1)^2}=\frac{1}{2} \int \frac{1+x^2+1-x^2}{x^4+2x^2+1}.dx$
$\implies I= \frac{1}{2} \left ( \int \frac{1+x^2}{x^4+2x^2+1}.dx +\int \frac{1-x^2}{x^4+2x^2+1}.dx\right).$
$I_1=\int \frac{1+x^2}{x^4+2x^2+1}.dx=\int \frac{1+\frac{1}{x^2}}{x^2+2+\frac{1}{x^2}}.dx=\int \frac{1+\frac{1}{x^2}}{(x-\frac{1}{x})^2+4}.dx$
Now $t=x-\frac 1 x \implies dt=\left(1+\frac{1}{x^2} \right)dx$
$I_1=\int\frac{dt}{t^2+4}=\frac{1}{2}\tan^{-1}\left(\frac{t}{2}\right)$.
$I_2=\int \frac{1-x^2}{x^4+2x^2+1}.dx=-\int \frac{1-\frac{1}{x^2}}{x^2+2+\frac{1}{x^2}}.dx=-\int \frac{1-\frac{1}{x^2}}{(x+\frac{1}{x})^2+1}.dx$
Now $p=x+\frac 1 x \implies dp=\left(1-\frac{1}{x^2} \right)dx$
$I_2=\int\frac{dp}{p^2+1}=\tan^{-1}(p)$
$I=I_1+I_2=\frac{1}{2}\tan^{-1}\left(\frac{x-\frac 1 x}{2}\right)+\tan^{-1}(x+\frac 1 x).$
