What is $\arcsin(\cos{x})$ (Spivak Calculus exercise 15-18)? In the first part of the exercise I proved that $\sin(x+\frac{\pi}2)=\cos{x}$.
The second part is asking what $\arcsin(\cos{x})$ is. Presumably, they want a rule for unrestricted $x$.
We have $\arcsin(\cos{x})=\arcsin(\sin(x+\frac{\pi}2))$. It was said that the domain of $\sin$ usually restricted to $\left[-\frac{\pi}2, \frac{\pi}2\right]$, hence I assume that $x+\frac{\pi}2 \in \left[-\frac{\pi}2, \frac{\pi}2\right]$, and this set is also the co-domain of the $\arcsin$ function.
Since $\sin$ is periodic with period $2\pi$, $\sin(x+\frac{\pi}2)=\sin(2k\pi+x+\frac{\pi}2)$, $2k\pi+x+\frac{\pi}2 \in \left[2k\pi-\frac{\pi}2, 2k\pi+\frac{\pi}2\right], k \in \mathbb{Z}$.
And we have that $\arcsin(\sin(2k\pi+x+\frac{\pi}2))=2k\pi+x+\frac{\pi}2$.
But the answer in the solutions manual is $\begin{cases} x-2k\pi+\frac{\pi}2, x \in \left[2k\pi-\pi, 2k\pi\right] \\ 2k\pi+\frac{\pi}2-x, x \in \left[2k\pi, 2k\pi+\pi\right] \end{cases}$
I can plot the graph and see how $2k\pi+x+\frac{\pi}2$ doesn't work, but where did they get this piecewise function?
 A: By periodicity and by symmetry, we have $$\arcsin(\sin(x))=x+2k\pi$$ or
$$\arcsin(\sin(x))=\pi-x+2k\pi,$$
whichever falls in the range $\left[-\dfrac\pi2,\dfrac\pi2\right]$.
In other words,
$$\begin{cases}x\in\left[-\dfrac\pi2,\dfrac\pi2\right]+2k\pi\to x-2k\pi,\\x\in\left[\dfrac{3\pi}2,\dfrac\pi2\right]+2k\pi\to \pi-x-2k\pi.\end{cases}$$
Now replace $x$ by $x-\dfrac\pi2$.
A: Let $y=\arcsin (\cos x) $. Note that since $|\cos x|\le 1,y$ is defined on all real $x$. 
It is true for all $x\in [-1,1]$ that $\arcsin x+\arccos x=\pi/2$
Hence $y=\pi/2-\arccos (\cos x)$
$\arccos(\cos x)=\begin{cases}x; x\in [0,\pi]\\2\pi-x; x\in [\pi,2\pi]\\ -2\pi+x;x\in[2\pi,3\pi]\\ 2(2\pi)-x; x\in[3\pi,4\pi]\end{cases}$ etc.
In general, 
$\arccos(\cos x)=2(-1)^{n+1}n\pi-(-1)^{n+1}x$  when $x\in [n\pi, (n+1)\pi], n\in \mathbb Z^+\cup\{0\}$ 
$y=\pi/2+(-1)^{n+1}x-2(-1)^{n+1}n\pi$ when $\in [n\pi, (n+1)\pi]$. 
Can you take it from here by taking $n=$ even and then taking $n=$ odd number?
Also note that $\cos x$ is even function so above definitions are valid for negative $x$ values as well. 
A: here's my solution based on @YvesDaoust's answer:
$\cos{x}=\sin\left({x}+\frac{\pi}2\right), x \in R$, hence $\arcsin(\cos(x)) = \arcsin\left(\sin\left({x}+\frac{\pi}2\right)\right)$
The co-domain of $\arcsin$ is $[-\frac{\pi}2,\frac{\pi}2]$, and we must restrict the domain of $\sin$ to the same interval, there are 2 cases, in therms of our $\sin(x+\frac{\pi}2)$:
Case 1: $x+\frac{\pi}2 \in [2k\pi-\frac{\pi}2, 2k\pi+\frac{\pi}2]$
Subtract $2k\pi$, $x+\frac{\pi}2-2k\pi \in [-\frac{\pi}2,\frac{\pi}2]$, moreover $\sin(x+\frac{\pi}2)=\sin(x+\frac{\pi}2-2k\pi)$, hence  $\arcsin(\cos(x))=x+\frac{\pi}2-2k\pi$ when $x \in [2k\pi-\pi, 2k\pi]$.
Case 2: $x+\frac{\pi}2 \in [2k\pi+\frac{\pi}2, 2k\pi+\frac{3\pi}2]$
$\pi-(x+\frac{\pi}2) \in [\pi-2k\pi-\frac{3\pi}2, \pi-2k\pi-\frac{\pi}2]=[-2k\pi-\frac{\pi}2, -2k\pi+\frac{\pi}2]$
Add $2k\pi$ to get the desired interval:
$\pi-(x+\frac{\pi}2)+2k\pi = \frac{\pi}2+2k\pi-x \in [-\frac{\pi}2, \frac{\pi}2]$
A: Let $\arcsin(\cos x)=y$
$\implies\sin y=\cos x=\sin\left(\dfrac\pi2+x\right)$
$y=n\pi+(-1)^n\left(\dfrac\pi2+x\right)$ where $n$ is any integer
If $n$ is even $=2m$(say) $$y=2m\pi+\dfrac\pi2+x$$
What if $n$ is odd $=2m+1$(say)?
Now in your solution we need $$x-2k_1\pi+\dfrac\pi2=2k_2\pi+x+\dfrac\pi2\implies k_2=-k_1$$
As $k_1$ is any integer,  $k_2$ also has the same domain!
