What are the necessary conditions on $f$ if $f(x)=f(\sin(\pi x)+x)\iff x\in\Bbb{Z}$? I am aware that the statement:
$$f(x)=f(\sin(\pi x)+x)\iff x\in\Bbb{Z}$$
is not true for all $f$. For example, $f$ can be $x$ to any constant power or any constant to the $x$th power but it cannot be the gamma function $\Gamma(x)$ or $\sin(x)$ or $x^x$. I have been told that it is important to note whether or not $f$ is injective. However, $f(x)=x^2$ is not injective, yet it satisfies the statement. If being injective is only a sufficient condition as opposed to a necessary condition, what exactly do we know about the class of functions that makes this statement true?
Thanks in advance!
 A: Here is a condition that $f$ must satisfy if it happens to be periodic: The period must be larger than $1$. Otherwise, the function $f$ satisfies $f(x+T)=f(x)$ for all $x$ where $T\in (0,1]$. But then there exists $x_0\in\Bbb{R}-\Bbb{Z}$ with $\sin(\pi x_0)=T$ for which $f(x_0+\sin(\pi x_0))=f(x_0)$.
A: Another necessary condition for a continuous $f$ would be: $f$ should not have a unique global maximum or global minimum at any $0<a<1$ over $[0,t]$ where $t=\arg\max_{0\leq x\leq 1}(x + \sin(\pi x)]$. Also, let $g(x) = f(x+\sin(\pi x))$. 
Suppose it does have a global maximum over $[0,t]$ at some $0<a<1$. Let $b$ be the smallest positive real such that $b+\sin(\pi b)=a$. Certainly, $0<b<a$. Now, $g(b)=f(a)>f(b)$, since $f(a)$ is the maximum. Similarly, $g(a)<f(a)$. This implies that $f$ and $g$ must intersect somewhere within $[b,a]$, a contradiction. A similar argument hold is there existed a global minimum.
This condition can be applied to $[2m,2m+t]$, for any integer $m$. Hope this helps.
A: WARNING: INCORRECT see comments for why
If f is continuous on some connected sets it must be monotonic on them. Say it is not. Then there is some point $x^*$ such that in some of its neighborhood V such that $x^*=\sup_V f$. Then it can be shown easily that there are $x_1,x_2$ in some neighborhood of $x^*$ such that $f(x_1)=f(x_2)$ and $d(x_1,x_2)\lt 1$ causing a contradiction.
note: here monotone is defined as that there is no $x^*$ such that it is the superior of all $f(x)$ in some of its neighborhood, which can be shown to be equivalent to the concept of monotone in real valued functions of one real variable.
