$$J =\int x \sqrt{1- x^2 \over 1 + x^2}dx$$
Substituting $u = \sqrt{1 + x^2}$
$$J = \int \sqrt{2 - u^2} du = \sqrt{2}\int \sqrt{1 - \left({u \over \sqrt{2}}\right)^2} du$$
Now substituting $\sin z = u/\sqrt{2}$
$$J = 2\int \cos^2 z dz = z + (\sin 2z)/2 + C = \arcsin\left(\sqrt{1+ x^2}\over 2\right) + {\sqrt{1-x^4}\over 2} + C $$.
The give answer is $\displaystyle \arcsin(x^2) + {\sqrt{1-x^4}\over 2} + C$.
What went wrong in my attempt ?
Note that $$\frac{d}{dx}\arcsin(x^2)=\frac{2x}{\sqrt{1-x^4}}$$ and $$\frac{d}{dx}2\arcsin\left(\frac{\sqrt{1+x^2}}{\sqrt 2}\right)=\frac{2x}{\sqrt{1-x^4}}$$
So, the error in the OP is in the term $\arcsin\left(\frac{\sqrt{1+x^2}}{2}\right)$, which should be instead $\arcsin\left(\frac{\sqrt{1+x^2}}{\sqrt 2}\right)$ and the "given answer" needs to have $\frac12 \arcsin(x^2)$ instead of $\arcsin(x^2)$.
The resolution to the apparent discrepancy comes from the identity
$$2\arcsin\left(\sqrt{1+x^2}\over\sqrt{2}\right) = \arcsin(x^2)+\pi/2\tag 1$$
which can be verified directly by taking the sine of both sides of $(1)$ and using $\arcsin(1)=\pi/2$. We have used instead that the two sides of $(1)$ have equal derivatives and are equal at $x=1$.