<s>[INST] 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?
 [/INST] 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} $$
</s>