Differentiate $y=\sin^{-1}\left(2x\sqrt{1-x^2}\right),\quad\frac{-1}{\sqrt{2}}
Find $\dfrac{\mathrm dy}{\mathrm dx}$ if 
  $y=\sin^{-1}\left(2x\sqrt{1-x^2}\right),\quad\frac{-1}{\sqrt{2}}<x<\frac{1}{\sqrt{2}}$
I can solve it as follows:
$$
\begin{align}
y'&=\frac{1}{\sqrt{1-4x^2(1-x^2)}}\frac{d}{dx}\Big(2x\sqrt{1-x^2}\Big)\\&=\frac{1}{\sqrt{1-4x^2+4x^4}}\bigg(2x\frac{-2x}{2\sqrt{1-x^2}}+2\sqrt{1-x^2}\bigg) \\
&=\frac{1}{\sqrt{(1-2x^2)^2}}\bigg(\frac{-2x^2}{\sqrt{1-x^2}}+2\sqrt{1-x^2}\bigg)\\
&=\frac{1}{|1-2x^2|}\frac{-2x^2+2-2x^2}{\sqrt{1-x^2}}\\
&=\frac{2(1-2x^2)}{|1-2x^2|\sqrt{1-x^2}}\\
\end{align}
$$
As $\frac{-1}{\sqrt{2}}<x<\frac{1}{\sqrt{2}}\implies|x|<\frac{1}{\sqrt{2}}\implies 0<x^2<\frac{1}{2}\implies 0<2x^2<1\\\implies-1<-2x^2<0\implies 0<1-2x^2<1$
Thus, $|1-2x^2|=1-2x^2$
$$
y'=\frac{2(1-2x^2)}{(1-2x^2)\sqrt{1-x^2}}=\frac{2}{\sqrt{1-x^2}}
$$
My Attempt
But if I try to solve it by substituting $x=\sin\alpha\implies\alpha=\sin^{-1}x$
$$
y=\sin^{-1}\bigg(2\sin\alpha\sqrt{\cos^2\alpha}\bigg)=\sin^{-1}\bigg(2\sin\alpha|\cos\alpha|\bigg)
$$
Here, $\frac{-1}{\sqrt{2}}<x<\frac{1}{\sqrt{2}}\implies \frac{-\pi}{4}<\sin^{-1}x=\alpha<\frac{\pi}{4}\implies \cos\alpha>0\implies|\cos\alpha|=\cos\alpha$
$$
\begin{align}
y&=\sin^{-1}\bigg(2\sin\alpha\cos\alpha\bigg)=\sin^{-1}\bigg(\sin2\alpha\bigg)\\&\implies\sin y=\sin2\alpha=\sin\Big(2\sin^{-1}x\Big)\\
&\implies y=n\pi+(-1)^n(2\sin^{-1}x)=\begin{cases}n\pi+2\sin^{-1}x,\quad \text{n even}\\
n\pi-2\sin^{-1}x,\quad \text{n odd}
\end{cases}
\end{align}
$$
Thus,
$$
y'=\begin{cases}\frac{d}{dx}\Big(n\pi+2\sin^{-1}x\Big)=\frac{2}{\sqrt{1-x^2}},\quad \text{n even}\\
\frac{d}{dx}\Big(n\pi-2\sin^{-1}x\Big)=\frac{-2}{\sqrt{1-x^2}},\quad \text{n odd}
\end{cases}
$$
How do I eliminate the case $y'=\frac{-2}{\sqrt{1-x^2}}$ ?
 A: At one point you have $y=\sin^{-1}(\sin 2\alpha)$. It means that $-\pi/2\le y\le \pi/2$, so your only allowed solution is $n=0$.
A: The idea is very good. However, the notation $\sin^{-1}t$ usually doesn't mean “the set of all angles $\varphi$ such that $\sin\varphi=t$”, but rather

$\sin^{-1}t$ denotes the unique angle $\phi\in[-\pi/2,\pi/2]$ such that $\sin\varphi=t$.

The fact that $\sin^{-1}$ is not the inverse function of the sine is the reason why many people, including myself, prefer to use $\arcsin t$ instead of the logically wrong $\sin^{-1}t$. It is the inverse function of a restriction of the sine function.
This way, for $\varphi\in[-\pi/2,\pi/2]$ and $t\in[-1,1]$ it holds that
$$
\sin(\sin^{-1}t)=t
\qquad
\sin^{-1}(\sin\varphi)=\varphi
$$
If $\alpha=\sin^{-1}x$, then indeed $-\pi/4<\alpha<\pi/4$, so $\cos\alpha>0$. Thus
$$
\sqrt{1-x^2}=\sqrt{1-\sin^2\alpha}=\cos\alpha
$$
Then $2x\sqrt{1-x^2}=2\sin\alpha\cos\alpha=\sin2\alpha$ and $-\pi/2<2\alpha<\pi/2$.
Therefore $\sin^{-1}(\sin2\alpha)=2\alpha=2\sin^{-1}x$ and so
$$
y'=\frac{2}{\sqrt{1-x^2}}
$$
