For the inverse cosine function, we have

$\displaystyle \cos x=y$ implies $\displaystyle x=\cos^{-1}y$ and $\displaystyle 0 \leq x \leq \pi$

Let's say if I want to find the inverse of $\displaystyle g(x)=\cos x$ where $\displaystyle -2\pi \leq x \leq -\pi$

Is the following correct?

$\displaystyle g(x)= \cos x = \cos(x+2\pi)$

Let $\displaystyle y=g(x)$

$\displaystyle y=cos(x+2\pi)$

$\displaystyle x+2\pi=\cos^{-1}y$ since $\displaystyle 0 \leq x+2\pi \leq \pi$

$\displaystyle x=\cos^{-1}y-2\pi$

Hence, $\displaystyle g^{-1}(x)=\cos^{-1}x-2\pi$ where $\displaystyle -1 \leq x \leq 1$

Is there any other way of doing this?

What about finding the inverse of

$\displaystyle h(x)=\cos x$ where $\displaystyle -\pi \leq x \leq 0$?

Many thanks for those who can help