Derivative of $f(x)=\arcsin\left(\cos\sqrt{x}\right)+\arccos\left(\sin\sqrt{x}\right)$

calculusderivativestrigonometry

$f:{\mathbb{R}}^{+}\cup \left\{0\right\}\to \mathbb{R}$

$f(x)=\arcsin\left(\cos\sqrt{x}\right)+\arccos\left(\sin\sqrt{x}\right)$ then what is the derivative of function $f?$

A)$\frac{-1}{\sqrt{x}}$

B)$\frac{1}{\sqrt{x}}$

c)$\frac{1}{2\sqrt{x}}$

Here is my solution: I found derivative of function is
$$\frac{-1}{2\sqrt{x}}\left(\frac{1}{\sin\sqrt{x}}+\frac{1}{\cos\sqrt{x}}\right).$$

But I can not reach the answer that given in question. Any help will be appreciated.

Best Answer

Applying the chain rule we get: $\\ f'(x)=\frac{1}{\sqrt{1-(\cos\sqrt{x})^2}}\cdot (-\sin\sqrt{x})\cdot\frac{1}{2\cdot\sqrt{x}}-\frac{1}{\sqrt{1-(\sin\sqrt{x})^2}}\cdot (\cos\sqrt{x})\cdot\frac{1}{2\cdot\sqrt{x}}=\\=-\frac{1}{2\cdot\sqrt{x}}\cdot(\frac{\sin\sqrt{x}}{|\sin\sqrt{x}|}+\frac{\cos\sqrt{x}}{|\cos\sqrt{x}|})$

So the correct answer, as @Bernard Massé was saying, is the first one, but only in the interval $(0,(\frac{\pi}{2})^2)$, where both $\sin\sqrt{x}$ and $\cos\sqrt{x}$ are positive..