Derivative of $\arcsin(\cos x)$

calculusderivativestrigonometry

In my calculus course, my teacher asked me to differentiate the function
$$f(x) = \arcsin(\cos x).$$
My work looked like so,
$$
f'(x)=\frac{1}{\sqrt{1-\cos^2x}}\cdot-\sin x
= -\frac{\sin x}{\sqrt{\sin^2 x}}
= -\frac{\sin x}{|\sin x|} = -\frac{|\sin x|}{\sin x}.
$$

However, as I went to confirm my answer with my instructor, they claimed that my answer was incorrect. Instead, they claimed my work should have gone like so:
$$
f'(x)=\frac{1}{\sqrt{1-\cos^2x}}\cdot-\sin x
= -\frac{\sin x}{\sqrt{\sin^2 x}}
= -\frac{\sin x}{\sin x}
= -1.
$$
I attempted to explain how I thought $\sqrt{x^2}$ simplified to $|x|$, but they keep asserting I'm incorrect, claiming that the function $\arcsin x$ does not exist for $|x|>\frac{\pi}{2}$, and that therefore $-1$ should indeed be the correct answer within the domain of the function, which they said was $|x|<\frac{\pi}{2}$.

This has just left my confused about the whole matter. Can anyone explain which derivative is right here, and why?

Best Answer

You are correct. The domain of the function is $\mathbb{R}$ and not $[-\pi/2,\pi/2]$ because the domain of the cosine function is $\mathbb{R}$ and the range is $[-1,1]$, and so the $\arcsin$ function doesn't limit the domain of $f$. Your derivative simplifies to:

$$f'(x) = \left\{\begin{array}{lr} -1, & \text{for } x \in \displaystyle\bigcup_{n\in\mathbb{Z}}(2n\pi,(2n+1)\pi)\\ 1, & \text{for } x \in \displaystyle\bigcup_{n\in\mathbb{Z}} ((2n+1)\pi,(2n+2)\pi). \end{array} \right.$$