The inverse of $-1+\dfrac{\cos((\frac{1}{2}+m)w)}{\cos(w)}$ Is it possible to compute the inverse of the following function 
$f(w)=-1+\dfrac{\cos((\frac{1}{2}+m)w)}{\cos(w)}$
when $0 \leq w \leq 2\pi$.

It is not necessarily invertible on the interval $[0,2\pi]$ as shown in this example when $m=1$. You may try using other values of $m$ or other intervals at this desmos.com link.

