Proving $\arcsin(\sin(x))=(-1)^{k}(x-k\pi)$ I want to write $\arcsin(\sin(x)), x\in \mathbb{R},$ as a piecewise function described by a general formula:
$f(x)=\arcsin(\sin(x))=
  \begin{cases}
                                   ... ,\text{ $x\in\left[\frac{2k-1}{2}\pi,\frac{2k+1}{2}\pi\right)$} \text{ ; $k\in\mathbb{Z}^{-}$} \\
                                   x ,\quad\quad\quad\quad\text{$x\in\left[-\frac{\pi}{2},\frac{\pi}{2}\right)$} \\
  -x+\pi,\quad\text{$x\in\left[\frac{\pi}{2},\frac{3\pi}{2}\right)$} \\
x-2\pi, \quad \text{$x\in\left[\frac{3\pi}{2},\frac{5\pi}{2}\right)$}\\
... ,\text{ $x\in\left[\frac{2k-1}{2}\pi,\frac{2k+1}{2}\pi\right)$} \text{ ; $k\in\mathbb{Z}^{+}$} \\
  \end{cases}$
$f(x)=\arcsin(\sin(x))=(-1)^{k}(x-k\pi), x\in\left[\frac{2k-1}{2}\pi,\frac{2k+1}{2}\pi\right)
$
The general case I came up with seems to hold, at least when analysing the graph of $f(x)$, however I cannot find any way of rigorously proving its validity.
Is there any method I can use to prove $\arcsin(\sin(x))=(-1)^{k}(x-k\pi), x\in\left[\frac{2k-1}{2}\pi,\frac{2k+1}{2}\pi\right)$?
 A: First, if $-1 \leq y \leq 1$ there exists one and only one real number $\theta$ such that $-\frac\pi2 \leq \theta \leq \frac\pi2$
and $\sin(\theta) = y.$
If you have not already seen a proof of this, you can prove it.
Next, you must use a definition of $\arcsin$
according to which if $-1 \leq y \leq 1$
then $\arcsin(y)$ is the unique number $\theta$ in the interval
$\left[-\frac\pi2, \frac\pi2\right]$ such that $\sin(\theta) = y.$
If that is not actually how your definition is stated, you should be able to show that your definition implies this fact.
Of course the fact above implies that $\arcsin$ is a function
$\arcsin:\left[-1,1\right]\to\left[-\frac{\pi}{2},\frac{\pi}{2}\right],$
that is, the domain and codomain are as you have stated,
but you need the explicit mapping of the values.
Now for any integer $k$ and for
$\frac{2k-1}{2}\pi \leq x < \frac{2k+1}{2}\pi,$
let $y = \sin(x)$ and let $\phi = (-1)^k (x-k\pi).$
Show that $-1 \leq y \leq 1,$ that $-\frac\pi2 \leq \phi \leq \frac\pi2,$
and that $\sin(\phi) = y.$
But when $-1 \leq y \leq 1$ we know is one and only one real number $\theta$ that satisfies $-\frac\pi2 \leq \theta \leq \frac\pi2$
and that $\sin(\theta) = y.$
It follows that $\phi$ is the unique number $\theta$ in the interval
$\left[-\frac\pi2, \frac\pi2\right]$ such that $\sin(\theta) = y$
and therefore  $\arcsin(y) = \phi.$
Substitute $y = \sin(x)$ and $\phi = (-1)^k (x-k\pi)$ in the equation
$\arcsin(y) = \phi$ and you're done.
You might use induction for the steps where you show that
$-\frac\pi2 \leq \phi \leq \frac\pi2$ and that $\sin(\phi) = y.$
Perhaps you can do it by induction on $\lvert k\rvert$,
but it may be easier to treat the even and odd cases separately
so that the inductive step increases $\lvert k\rvert$ by $2.$
