Showing $\cos (\arcsin(\cos(\theta))) = \lvert \sin (\theta) \rvert$ Where does an absolute function should appear and why?
Having the following equation:
$$ \cos (\arcsin(\cos(\theta))) = \lvert \sin (\theta) \rvert $$
With $ -\frac{\pi}{2} \le \theta \le \frac{\pi}{2}$.
I draw a triangle and easily found the following:  


*

*Defining: $\cos(\theta) \equiv \frac{a}{\sqrt{a^2 + 1}} \\$

*then $\arcsin(\cos(\theta)) = \frac{\pi}{2} - \theta$

*thus $\cos (\arcsin(\cos(\theta))) = \sin(\theta)$


But why should the absolute value appear and on which phase?
How does the absolute value ultimately surrounds the entire expression?
 A: the left hand side of your equation is an even function of $\theta,$  therefore the right hand side must also be an even function of $\theta.$  that is the reason you see the absolute value sign on the right hand side.

p.s. if you take $0 < t < \pi/2,$  then $\sin^{-1}(\cos t) = \pi/2 - t$ and $\cos(\sin^{-1}(\cos t) ) = \cos(\pi/2 -t) = \sin t = |\sin t|.$
if you take $-\pi/2< t < 0,$  then $\sin^{-1}(\cos t) = \pi/2 + t$ and $\cos(\sin^{-1}(\cos t) ) = \cos(\pi/2 +t) = -\sin t = |\sin t|.$
A: Because $\cos$ is positive between $-\frac{\pi}{2}\le \theta \le \frac{\pi}{2}$. Note further that sine is negative between $-\frac{\pi}{2}\le \theta \lt 0$.
A: 
$1$. Defining: $\cos(\theta)\equiv\dfrac{a}{\sqrt{a^2+1}}$

This is your first mistake, since we can also have $\cos(\theta)\equiv-~\dfrac{a}{\sqrt{a^2+1}}$

$2$. Then $\arcsin(\cos(\theta))=\dfrac\pi2-\theta$

This is your second mistake, since we can also have $\arcsin(\cos(\theta))=\dfrac\pi2+\theta$

$3$. Thus $\cos(\arcsin(\cos(\theta)))=\sin(\theta)$

This is your third mistake, which follows from the previous two.
A: If we ignored domain and range of functions, we'd end up something like this:
$$\begin{split}
\cos(\theta) &= \sin( \frac{\pi}2 + \theta) \\
\arcsin(\cos(\theta)) &= \frac{\pi}2 + \theta (*)\\
\cos(\arcsin(\cos(\theta))) &= \cos(\frac{\pi}2 + \theta) \\
&= -\sin \theta
\end{split}$$
However the $(*)$ line isn't quite right. The range of $\arcsin$ is $[-\frac{\pi}2,\frac{\pi}2]$, and the range of the right hand side is $[0,\pi]$. So for positive $\theta$, it's incorrect, it should really be:
$$
\begin{split}
\arcsin(\cos(\theta)) &=
\left\{
 \begin{array}{ll}
  \frac{\pi}2 + \theta  & \mbox{if } \theta < 0 \\
  \frac{\pi}2 - \theta & \mbox{if } \theta \geq 0 \end{array}
\right. \\
&= \frac{\pi}2 - |\theta| \\
\cos(\arcsin(\cos(\theta))) &= \cos(\frac{\pi}2 - |\theta|) \\
&= \left\{
 \begin{array}{ll}
  -\sin(\theta)  & \mbox{if } \theta < 0 \\
  \sin(\theta) & \mbox{if } \theta \geq 0 \end{array}
\right. \\
\end{split}
$$
Since $\sin \theta < 0$ for $-\frac{\pi}2 \leq \theta \leq 0$, that simply reduces to $\cos(\arcsin(\cos(\theta))) = |\sin(\theta)|$.
