Solution verification for $y'$ when $y=\sin^{-1}(\frac{2x}{1+x^2})$ I was required to find $y'$ when $y=\sin^{-1}(\frac{2x}{1+x^2})$
This is my solution.

Above when I put $\sqrt{x^4-2x+1}=\sqrt{(1-x^2)^2}$ then I get the correct answer but when I put $\sqrt{x^4-2x+1}=\sqrt{(x^2-1)^2}$ then I get something else.
Now my question is that which one is correct and why? How you will come to know that we should put $\sqrt{x^4-2x+1}=\sqrt{(1-x^2)^2}$ and not $\sqrt{x^4-2x+1}=\sqrt{(x^2-1)^2}$
Kindly help me.  

Hint:
Given
$$
y = \sin^{-1}\left( \frac{2x}{1+x^2}\right),
$$
then
$$
\sin(y) = \frac{2x}{1+x^2},
$$
so
$$
\cos(y) y' = \left( \frac{2x}{1+x^2} \right)'.
$$
Now
$$
\cos(y) = \sqrt{ 1 - \sin^2(y) } =
\sqrt{ 1 - \left( \frac{2x}{1+x^2} \right)^2 },
$$
so you get
$$
y' = \frac{ \displaystyle \left( \frac{2x}{1+x^2} \right)' }
{ \displaystyle \sqrt{ 1 - \left( \frac{2x}{1+x^2} \right)^2 }}.
$$
And
$$
\left( \frac{2x}{1+x^2} \right)' = 2 \frac{1 - x^2}{(1+x^2)^2}.
$$
So final is
$$
y' = 2 \frac{ 1 - x^2 }{ \displaystyle (1+x^2) \sqrt{ (1+x^2)^2 - 4x^2 }}
= 2 \frac{ 1 - x^2 }{ \displaystyle (1+x^2) \sqrt{ (1-x^2)^2 }}.
$$
Thus
$$
y' =
\left\{
\begin{array}{rcl}
|x| < 1 : \displaystyle \frac{2}{1+x^2}\\\\
|x| > 1 : \displaystyle \frac{-2}{1+x^2}
\end{array}
\right.
$$
