This is my solution of this problem :
Question. $\displaystyle \int \frac{x^3}{1+x^2} \, \mathrm{d}x$
Solution. Let $1+x^2 = u$. Then
$$\frac{\mathrm{d}u}{\mathrm{d}x} = 2x \quad\Rightarrow \quad \mathrm{d}u = 2x \, \mathrm{d}x \quad \Rightarrow \quad x \, \mathrm{d}x = \frac{1}{2}\, \mathrm{d}u. $$
Also, $x^2 = u - 1$. Using both, we get
\begin{align*} \int \frac{x^3}{1+x^2} \, \mathrm{d}x &= \int \frac{x \cdot x^2}{1+x^2} \, \mathrm{d}x = \int \frac{u-1}{u} \, \mathrm{d}u \\ &= \int \left( 1 - \frac{1}{u} \right) \, \mathrm{d}u = u - \log u + \mathsf{C} \\ &= 1 + x^2 - \log (1 + x^2) + \mathsf{C} \end{align*}
But the answer is this
$$ \frac{x^2 - \log(x^2 + 1)}{2} + \mathsf{C}. $$
What am I doing wrong in my solution ?