In our text book's(Higher Math 1st Paper-by S U Ahmed) differentiation chapter there is a section about replacing $x$(inside inverse trigonometric function) with trigonometric functions. A example problem was $\frac{d}{dx}\sin^{-1}\left(2x\sqrt{1-x^2}\right)$ and the solution given is;
Let \begin{align*} y &=\sin^{-1}\left(2x\sqrt{1-x^2}\right)\\ &= \sin^{-1}\left(2\sin \theta \sqrt{1-\sin^2 \theta}\right)\\ &=\sin^{-1}\left(2\sin \theta \cos \theta \right)\\ &=\sin^{-1}(\sin 2\theta )\\ &=2\theta\\ &=2 \sin^{-1}x \end{align*} Now, \begin{align*} \frac{d}{dx}\sin^{-1}\left(2x\sqrt{1-x^2}\right)&=\frac{d}{dx}2 \sin^{-1}x\\ &=\dfrac{2}{\sqrt{1-x^2}} \end{align*} But plotting two functions reveals the differentiation is not actually correct. If we differentiate by parts the answer would be $\frac{2\left(-2x^{2}+1\right)}{\sqrt{1-4x^{2}\left(1-x^{2}\right)}\sqrt{1-x^{2}}}$
[
Now my question is why this solution is wrong?
My guess: May be this is because replacing $x$ with $\sin \theta$ changes the range of $x$ from $(-\infty,\infty )$ to $[-1,1]$ and may be it causes some issue.