<s>[INST] A question on differentiation : Let $$f(x)=\sin^{-1}(2x\sqrt{1-x^2})$$
I found out $f'(x)$ in three methods and got three different answers ! 
1) Putting $x=\cos\theta$, we get $f(x)=2\cos^{-1}x$, on differentiating this we get 
$$f'(x)=\frac{-2}{\sqrt{1-x^2}}$$
2) Putting $x=\sin\theta$, we get $f(x)=2\sin^{-1}x$, on differentiating we get 
$$f'(x)=\frac{2}{\sqrt{1-x^2}}$$
This is contradicting with the previous result that we arrived at by substituting $x=\cos\theta$. Can someone help me out with the correct solution for this problem!
 [/INST] HINT:
As the principal value of  $\sin^{-1}x$ lies  $\in [-\frac\pi2, \frac\pi2]; \pi\le 2\sin^{-1}x\le \pi$
So, $$\sin^{-1}(2x\sqrt{1-x^2})=\begin{cases} 
2\sin^{-1}x &\mbox{if } -\frac\pi4\le \sin^{-1}x\le \frac\pi4  \\
-\pi-2\sin^{-1}x & \mbox{if }  -\frac\pi2\le \sin^{-1}x< -\frac\pi4 \\
\pi-2\sin^{-1}x & \mbox{if } \frac\pi4< \sin^{-1}x\le \frac\pi2 \end{cases}  $$
As the principal values of $\cos^{-1}x$ lies  $\in [0,\pi], 0\le 2\cos^{-1}x\le 2\pi,$
So, $$\sin^{-1}(2x\sqrt{1-x^2})=\begin{cases} 2\cos^{-1}x &\mbox{if } 0\le \cos^{-1}x< \frac\pi4 \iff  \frac\pi4< \sin^{-1}x\le \frac\pi2 \\
2\cos^{-1}x-2\pi & \mbox{if }  \frac\pi4\le \cos^{-1}x< \frac{3\pi}4\iff  -\frac\pi2\le \sin^{-1}x< -\frac\pi4\\
\pi-2\cos^{-1}x & \mbox{if } \frac{3\pi}4\le \cos^{-1}x\le \frac\pi2\iff -\frac\pi4\le \sin^{-1}x\le \frac\pi4 \end{cases}  $$
Now differentiate for each region
</s>