<s>[INST] Which solution to $\int \frac{x^3}{(x^2+1)^2}dx$ is correct? I tried solving the following integral using integral by parts :
$$\int \frac{x^3}{(x^2+1)^2}dx$$
but I got a different answer from Wolfram Calculator This is the answer that I got :
$$\int \frac{x^3}{(x^2+1)^2}dx=\frac{1}{2(x^2+1)}+\frac{1}{2}\ln(x^2+1)+C$$
I am wondering if I am wrong or the calculator if I am where did I do something wrong.

Here is my solution :
$$\int \frac{x^3}{(x^2+1)^2}dx$$
$$\int x^2\frac{x}{(x^2+1)^2}dx$$
$\implies u =x^2 \qquad u'=2x$
$\displaystyle\implies v'=\frac{x}{(x^2+1)^2}\qquad v=\int\frac{x}{(x^2+1)^2}dx$
$$\int\frac{x}{(x^2+1)^2}dx$$
$\implies \zeta=x^2+1$
$\implies\displaystyle \frac{d\zeta}{2}=x$
$$\boxed{v=\frac{1}{2}\int\frac{d\zeta}{\zeta^2}=-0.5\zeta^{-1}=\frac{-1}{2(x^2+1)}}$$
$$\int x^2\frac{x}{(x^2+1)^2}dx=x^2\frac{-1}{2(x^2+1)}-\underbrace{(\int \frac{-2x}{2(x^2+1)}dx)}_{-\frac{1}{2}\ln(x^2+1)}$$
$$\boxed{\int \frac{x^3}{(x^2+1)^2}dx=\frac{-x^2}{2(x^2+1)}+\frac{1}{2}\ln(x^2+1)+C}$$
 [/INST] Both are correct. $\frac{-x^2}{2(x^2+1)}+\frac{1}{2}\ln(x^2+1)+C=\frac 1{2(x^2+1)}+\frac{1}{2}\ln(x^2+1)+C'$ where $C'=C-\frac 1  2$
[Just transfer $\frac 1{2(x^2+1)}$ to the left side and combine it with $\frac{-x^2}{2(x^2+1)}$].
</s>