<s>[INST] 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.
 [/INST] Integrate as follows
\begin{align}
\int {\dfrac{1}{(x^2+1)^2}}\,dx
&= \int {\dfrac{1}{x^2+1}}\,dx - \int {\dfrac{x^2}{(x^2+1)^2}}\,dx\\
 &= \int {\dfrac{1}{x^2+1}}\,dx + \frac1{2}\int x\>d\left({\dfrac{1}{x^2+1}}\right)\\
 &= \frac1{2} \frac x{x^2+1} + \frac1{2}\int {\dfrac{1}{x^2+1}}\,dx\\
 &= \frac1{2} \frac x{x^2+1} + \frac1{2}\tan^{-1} x+C
\end{align}
</s>