Given $f(x)=x+[x]$ where $$f:\Bbb{R}\to\bigcup_{n\in \Bbb > Z}[2n,2n+1)$$
Find $f^{-1}(x)$ ?
My Attempt:
$y=x+[x]=2[x]+\{x\}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ $Since $x=[x]+\{x\}$
$\Rightarrow y-\{x\}=2[x]$
The above equation implies $y-\{x\}$ is an integer, therefore it can be written as $y-\{y\}$.Hence, it implies $\{x\}=\{y\}.$
$\Rightarrow y-\{y\}=2[x]$
$\Rightarrow [x]=\frac{[y]}{2}$
Adding {x} both sides we get,
$\Rightarrow [x]+\{x\}=\frac{[y]}{2}+\{x\}$
$\Rightarrow x=\frac{[y]}{2}+\{y\}=y-\frac{[y]}{2}$
Hence,
$$f^{-1}(x)=x-\frac{[x]}{2}$$
What are some other ways to solve this problem and to find inverses of such type of function ?
In the above context, $[x]$ is Greatest Integer Function(floor) and $\{x\}$ is fractional part of $x$.