Find $\dfrac{dy}{dx}$ if $y=\sin^{-1}\bigg[\sqrt{x-ax}-\sqrt{a-ax}\bigg]$ 
Derivative of $y=\sin^{-1}\bigg[\sqrt{x-ax}-\sqrt{a-ax}\bigg]$

Put $\sqrt{x}=\sin\alpha,\;\sqrt{a}=\sin\beta$
$$
y=\sin^{-1}\bigg[\sqrt{x-ax}-\sqrt{a-ax}\bigg]=\sin^{-1}\bigg[\sqrt{x(1-a)}-\sqrt{a(1-x)}\bigg]\\
=\sin^{-1}\bigg[\sin\alpha|\cos\beta|-|\cos\alpha|\sin\beta\bigg]
$$
My reference gives the solution $\dfrac{1}{2\sqrt{x}\sqrt{1-x}}$, but is it a complete solution ?
How do I proceed further with my attempt ?
 A: Assume $0 < x < 1$ and $0 < a < 1$. Then, $0< \alpha < \frac\pi2$ and  $0< \beta< \frac\pi2$. Continue with what you have,
$$
y=\sin^{-1}\bigg(\sin\alpha\cos\beta-\cos\alpha\sin\beta\bigg)=\sin^{-1}[\sin(\alpha-\beta)]=\alpha-\beta
$$
Since $\alpha = \sin^{-1}\sqrt x$ and $(\sin^{-1}t)' = \frac1{\sqrt{1- t^2}}$, the derivative is,
$$\frac{dy}{dx} = \frac{d\alpha}{dx}=\frac12 \frac 1{\sqrt x} \frac1{\sqrt{1- x}}=\frac1{2\sqrt{x(1- x)}} $$
A: Using
$$ (\arcsin u)'=\frac1{\sqrt{1-u^2}}u' $$
one has
\begin{eqnarray}
\frac{dy}{dx}&=&\frac{1}{\sqrt{1-(\sqrt{x-ax}-\sqrt{a-ax})^2}}(\sqrt{x-ax}-\sqrt{a-ax})'\\
&=&\frac1{\sqrt{1-(x-ax)-(a-ax)+2\sqrt{a(1-a)x(1-x)}}}\bigg[\frac{\sqrt{1-a}}{2\sqrt x}+\frac{\sqrt a}{2\sqrt{1-x}}\bigg]\\
&=&\frac{1}{\sqrt{(1-a)(1-x)+ax+2\sqrt{a(1-a)x(1-x)}}}\cdot\frac{\sqrt{(1-a)(1-x)}+\sqrt{ax}}{2\sqrt{x(1-x)}}\\
&=&\frac{1}{2\sqrt{x(1-x)}},
\end{eqnarray}
where
$$ 1-(x-ax)-(a-ax)=(1-a)(1-x)+ax $$
is used.
A: You can also use the $\arcsin$ addition formula to get
\begin{eqnarray}
f(x) &=& \arcsin\left(\sqrt{x-ax}-\sqrt{a-ax}\right)=\\
&=&\arcsin\left(\sqrt x \sqrt{1-a}-\sqrt a \sqrt{1-x}\right)=\\
&=&\arcsin\sqrt x - \arcsin \sqrt a.
\end{eqnarray}
And now, easily,
$$f'(x) = \left(\arcsin \sqrt x\right)'.$$
