<s>[INST] Can the antiderivate of $\frac{1}{(x^2+1)^2}$ be calculated without using the iteration formula? To calculate the antiderivate of $$\frac{1}{(x^2+1)^2}$$ , we can either use the iteration formula reducing the exercise to the integral of $\ \frac{1}{x^2+1}\ $ or we can use $$(\frac{x}{x^2+1})'=\frac{1-x^2}{(x^2+1)^2}$$ , but I do not see how we can get the antiderivate of $\ \frac{1-x^2}{(x^2+1)^2}\ $ either without any guess (If we know this antiderivate , we can express $\frac{1}{(x^2+1)^2}$ as a linear combination of $\ f(x):=\frac{1}{x^2+1}\ $ and $\ g(x):=\frac{1-x^2}{(x^2+1)^2}\ $ , namely $\ \frac{1}{(x^2+1)^2}=\frac{f(x)+g(x)}{2}\ $)

How can I calculate $\int \frac{dx}{(x^2+1)^2}$ only by using intgration by parts and the substitution rule as well as other basic integration rules ? I am looking for a solution not containing a guess or the iteration formula.

 [/INST] For substitution method, see How do I solve this trigonometric substitution integral?.
For  intgration by parts,
$$\int\dfrac{dx}{(1+x^2)^2}=\int\dfrac{2x}{(1+x^2)^2}\cdot\dfrac1{2x}\ dx$$
$$=\dfrac1{2x}\int\dfrac{2x}{(1+x^2)^2}dx-\int\left(\int\dfrac{2x}{(1+x^2)^2}dx\cdot \dfrac{d(1/2x)}{dx}\right)dx$$
$$=-\dfrac1{2x(1+x^2)}-\dfrac12\int\dfrac{dx}{(1+x^2)x^2}$$
Now $$\int\dfrac{dx}{(1+x^2)x^2}=\int\dfrac{(1+x^2)-x^2}{(1+x^2)x^2}dx=?$$
</s>