I was solving the integral $\int\sqrt{2x-x^2}\,\mathrm dx$. I divided it as $\int\sqrt{x}\sqrt{2-x}\,\mathrm dx$ and used the substitution for $x=2\sin^2t$ and $\mathrm dx=4\sin t\cos t\,\mathrm{d}t$
The result I found was $$\arcsin\left(\sqrt{\frac{x}{2}}\right)-\frac{\sqrt{2x-x^2}}{2}({1-x})+C$$
However, on an online calculator I saw the result was $$\frac{(x-1)\sqrt{2x-x^2}+\arcsin(x-1)}{2}+C$$ Apparently it used the substitution with $u=1-x$ respectively $u =\sin t$ and rewriting the integral as $\int \cos^2t\,\mathrm dt$ it found the solution for $t$ and switched the substituted elements.
I understood the solution given there but why my solution gave a different result than that? I had a similar problem in another question as well. And the only difference is with $\arcsin$, I thought it was because I substituted with $2\sin^2x$ which is a power of a trigonometric function but I don't understand why that would be a problem. Is it actually related to that, or is there another reason why it didn't work?