If $f$ is continuous on an interval $I$ and $g(x) = \sin f(x)$, then does there exist $k \in \mathbb{Z}$ such that $f(x) = (-1)^k\arcsin g(x) + k\pi$?
Here, $\arcsin$ is defined on $[-\frac{\pi}{2}, \frac{\pi}{2}]$. Let $f$ be continuous on $I$. Then for every $x \in I$, there exists some $k_x \in \mathbb{Z}$ such that $f(x) = (-1)^{k_x}\arcsin g(x) + k_x\pi$.
What I'm trying to figure out is whether $k_x = k_y$ for every $x, y \in I$, if $f$ is continuous.
An idea I had was trying to define a continuous function from $I$ to $\mathbb{R}$ which mapped $x$ to $k_x$. As $I$ is connected, so must be the image of this function. As this maps to integers, this is only possible if its image is a singleton set.
The reasoning is fine ; however $x \mapsto k_x$ need not be continuous. It is continuous at each point $x$ such that $\arcsin(g(x)) \neq \pm \frac{\pi}{2}$. But in the remaining cases, you can say nothing (you can swith to $k+1$ or $k-1$ without discontinuity). See below for a counterexample.
Short answer : this is false because $f(x)$ can be unbounded. Take simply $f(x)=\pi x$. Then for all $x \notin \frac{1}{2}+\mathbb{Z}$, $k_x$ is the integer closest to $x$.