Differenciating a function with respect to another function confusion I am having problem solving the following question-
Differenciate $\tan^{(-1)}{(\sqrt{1-x^2}/x)}$ with respect to $\cos^{(-1)}{(2x\sqrt {1-x^2})}$, where $x$ is not $0$.
My attempt -
I took the tan function as $a$ and cos one as $b$.
Now we need ${(da/dx)/(db/dx)} $
So here if I substitute $x=\cos\theta$ 
or $x=\sin\theta$,
da/dx is $-1/(\sqrt{1-x^2})$.
Now for the second function if I substitute  $x=\cos\theta$ or $x=\sin\theta$ I dont get the same answer. Why is it so?
My book has taken $x$ to be between $-1/\sqrt{2}$ and $1/\sqrt{2}$ for the second function and hence arrived at the answer 0.5.My book says $x=\sin\theta $
is correct and $x=\cos\theta $
is wrong. How is this implied from the question?
P.S.-1st page, 2nd page
Please help
 A: By the substitution indicated in the numerator
$$  \dfrac{d(\tan^{-1}{\dfrac {\sqrt{1-x^2}}{x})}}{d[ \cos^{-1}2 x{\sqrt{1-x^2}]} }= \dfrac{d\varphi}{d(\cos^{-1} (sin 2 \varphi)}= \dfrac{d \varphi}{d(\pi/2 - 2 \varphi)}= \mp \dfrac12.$$
EDIT 1:
Due to presence of square-root either sign is correct in full domain. Sign change outside $  x= \pm \frac{1}{\sqrt 2}  $

A: 
Consider the above figure. The blue curve shows the function
$$y:=f(x):=\arctan{\sqrt{1-x^2}\over x}\ ,$$
and the orange curve shows the function
$$z:=g(x):=\arccos\bigl(2x\sqrt{1-x^2}\bigr)\ ,$$
both in the interval $-1< x<1$. Due to the usual conventions concerning $\sqrt{\mathstrut\cdot}$ and the inverse trigonometric functions there are $4$ different regimes to be seen in the intervals $$-1<x<-{1\over\sqrt{2}},\qquad -{1\over\sqrt{2}}<x<0,\qquad 0<x<{1\over\sqrt{2}},\qquad {1\over\sqrt{2}}<x<1\ .$$
It follows that there are four different functions $\psi_k:\ z\mapsto y$ at stake here.
For the case $0<x<{1\over\sqrt{2}}$ introduce the auxiliary variable $\theta$ by means of
$$x:=\sin\theta\quad\left(0<\theta<{\pi\over4}\right)\ .$$
Then $\sqrt{1-x^2}/x=\cot\theta$, and
$$\hat y(\theta)=\arctan(\cot\theta)={\pi\over2}-\theta\ .$$
Furthermore $2x\sqrt{1-x^2}=\sin(2\theta)$. As $0<2\theta<{\pi\over2}$ we therefore obtain
$$\hat z(\theta)=\arccos\bigl(\sin(2\theta)\bigr)={\pi\over2}-2\theta\ .$$
It follows that under this regime we have  $y={\pi\over4}+{z\over2}$, so that
$${dy\over dz}\equiv{1\over2}\ .$$
For the case ${1\over\sqrt{2}}<x<1$ introduce the auxiliary variable $\theta$ by means of
$$x:=\sin\theta\quad\left({\pi\over4}<\theta<{\pi\over2}\right)\ .$$
Then we still have $\sqrt{1-x^2}/x=\cot\theta$, and
$$\hat y(\theta)=\arctan(\cot\theta)={\pi\over2}-\theta\ .$$
Furthermore $2x\sqrt{1-x^2}=\sin(2\theta)$, but now ${\pi\over2}<2\theta<\pi$. This leads to
$$\hat z(\theta)=\arccos\bigl(\sin(2\theta)\bigr)=2\theta-{\pi\over2}\ .$$
It follows that under this regime we have  $y={\pi\over4}-{z\over2}$, so that
$${dy\over dz}\equiv-{1\over2}\ .$$
I leave the two other regimes to you.
