Derivative of $\sin^{-1}\frac{x+\sqrt{1-x^2}}{\sqrt 2}$ I'm a calculus beginner. I was asked to find the derivative of the function: $$\sin^{-1}\frac{x+\sqrt{1-x^2}}{\sqrt 2}.$$
I'm able to solve it in the following way:
I first calculate the derivative of $\frac{x+\sqrt{1-x^2}}{\sqrt 2}$ and get $\frac{1}{\sqrt 2}(1-\frac{x}{\sqrt{1-x^2}})$. Then the derivative of the given function is $\frac{1}{\sqrt{1-(\frac{x+\sqrt{1-x^2}}{\sqrt 2}})^2}\cdot \frac{1}{\sqrt 2}(1-\frac{x}{\sqrt{1-x^2}})$. Simplifying this gives the final answer $\frac{1}{\sqrt{1-x^2}}$. But the simplication process is quite lengthy and involves some bizarre calculations. Is there tricks/ways to solve these kinds of derivatives that do not involve too much calculations like above?
 A: Substitution is a good way to solve these kinds of problems. In the original problem, the term $\sqrt{1-x^2}$ suggests the substitution $x=\sin\theta\ \text{or}\cos\theta$. Also, notice that $\sin\frac\pi 4=\cos\frac\pi 4=\frac{1}{\sqrt2}$. Now Substituting $x=\sin\theta$ where $\theta\in[-\frac\pi 2,\frac\pi 2]$, we get
$$\begin{align}\sin^{-1}\left(\frac{x+\sqrt{1-x^2}}{\sqrt 2}\right) &= \sin^{-1}\left(\frac{1}{\sqrt2}(\sin\theta+\cos\theta)\right) \\ &= \sin^{-1}\left(\frac{1}{\sqrt2}\sin\theta+\frac{1}{\sqrt2}\cos\theta\right)\\ &= \sin^{-1}\left(\cos\frac\pi 4\sin\theta+\sin\frac\pi 4\cos\theta\right) \\ &= \sin^{-1}\left(\sin\left(\frac\pi 4+\theta\right)\right). 
\end{align}$$
Now we have $\sin^{-1}\left(\sin\left(\frac\pi 4+\theta\right)\right)=\frac\pi 4+\theta=\frac\pi 4+\sin^{-1}x$ when $\theta\in[-\frac\pi 2,\frac\pi 4]$ and $\sin^{-1}\left(\sin\left(\frac\pi 4+\theta\right)\right)=\pi-\left(\frac\pi 4+\theta\right)=\frac{3\pi} 4-\theta=\frac{3\pi} 4- \sin^{-1}x\ \text{when}\ \theta\in[\frac\pi 4,\frac\pi 2]$.
You just have to find the derivatives in both cases now.
A: Let $f(x) = \sin^{-1}\frac{x+\sqrt{1-x^2}}{\sqrt{2}} $. We have, for $\theta = \sin^{-1} x \in[-{\pi\over 2},{\pi\over 2}]$:
$$ f(\sin \theta) = \sin^{-1}\frac{\sin\theta+\sqrt{1-\sin^2\theta}}{\sqrt{2}} = \sin^{-1}\frac{\sin\theta+\cos\theta}{\sqrt{2}} = \sin^{-1}\big(\sin(\theta+{\pi\over 4})\big)$$
That is
$$ f(\sin\theta) = \left\{\begin{array}{ll}\theta+ {\pi\over 4} & \text{for }\theta\in [-{\pi\over 2},{\pi\over 4}] \\ \pi-(\theta+ {\pi\over 4})={3\pi\over 4}-\theta & \text{for } \theta\in [{\pi\over 4},{\pi\over 2}]\end{array} \right. $$
$$ f(x) = \left\{\begin{array}{ll}{\pi\over 4} + \sin^{-1} x& \text{for } x \in[-1,{\sqrt{2}\over 2}] \\ {3\pi\over 4} - \sin^{-1} x & \text{for } x \in[{\sqrt{2}\over 2},1]\end{array} \right. $$
Taking the derivative we have
$$ f'(x) = \left\{\begin{array}{ll}{1\over\sqrt{1-x^2}} & \text{for }x\in (-1,{\sqrt{2}\over 2}) \\ -{1\over\sqrt{1-x^2}} & \text{for } x \in({\sqrt{2}\over 2},1)\end{array} \right. $$
In the point $x={\sqrt{2}\over 2}$ the derivative doesn't exist (though left-sided and right-sided derivates do).
A: If you're confused about why your own method seemingly missed that the derivative is discontinuous, see here. The magic happens in line $4$. We have
$$\begin{split}
f'(x) 
&= \frac{1}{\sqrt{1-\left(\frac{x+\sqrt{1-x^2}}{\sqrt 2}\right)^2}}\cdot \frac{1}{\sqrt 2}\left(1-\frac{x}{\sqrt{1-x^2}}\right) \\
&= [\ldots] \\
&= \frac{1}{\sqrt{1-x^2}}\cdot \frac{\sqrt{1-x^2} - x}{\sqrt{\left(\sqrt{1-x^2} - x\right)^2}} \\
&= \frac{1}{\sqrt{1-x^2}}\cdot \frac{\sqrt{1-x^2} - x}{\left\lvert\sqrt{1-x^2} - x\right\rvert} \\
&= \frac{1}{\sqrt{1-x^2}}\cdot \operatorname{sign}\left(\sqrt{1-x^2} - x\right).
\end{split} $$
