$ \lim_{x\to \frac{1}{{\sqrt 2}^+}} \frac{\cos ^{-1} \left( 2x\sqrt{1-x^2}\right)}{x-\frac{1}{\sqrt{2}}}$ 
$\displaystyle \lim_{x\to {1\over \sqrt{2}^+}} \dfrac{\cos ^{-1} \left( 2x\sqrt{1-x^2}\right)}{x-\dfrac{1}{\sqrt{2}}}$

I have tried substituting $x$ for $\sin \theta$, doing the calculations and ended up with -$2√2$. But the solution provided was $2√2$. Then I tried this question again, but this time used $\cos \theta$ instead of $\sin \theta$ and the answer did match. I don't understand why $x$ as $\sin \theta$ doesn't give the correct result. I have checked all my steps but couldn't find any flaw with $\sin \theta$ as substitution. Can anyone tell me whether $\sin \theta $ a wrong substitution for this question or not?

Let $x=t+\frac1{\sqrt 2}$ to make
$$A=\dfrac{\cos ^{-1} \left( 2x\sqrt{1-x^2}\right)}{x-\dfrac{1}{\sqrt{2}}}=\dfrac{\cos ^{-1}(T)}t\qquad \text{with} \qquad T=2 \left(t+\frac{1}{\sqrt{2}}\right) \sqrt{1-\left(t+\frac{1}{\sqrt{2}}\right)^2}$$
Now, using Taylor expansions around $t=0^+$
$$T=1-4 t^2-4 \sqrt{2} t^3+O\left(t^4\right)$$ Now, using the expansion of $\cos ^{-1}(.)$,we then have
$$\cos ^{-1}(T)=2 \sqrt{2} t+2 t^2+\frac{t^3}{3 \sqrt{2}}+O\left(t^4\right)$$
$$A=2 \sqrt{2}+2 t+\frac{t^2}{3 \sqrt{2}}+O\left(t^3\right)$$
