# Let $f:\mathbb R \to \mathbb R$ be a function such that for any irrational number $r$…

Let $f:\mathbb R \to \mathbb R$ be a function such that for any irrational number $r$, and any real number $x$ we have $f(x)=f(x+r)$. Show that $f$ is a constant function.

I'm not sure how to do this question, and if anybody could give a complete proof, I would greatly appreciate it. Thx!

• First show that for each irrational number, $f(r)=f(0)$. Then show that for each rational number $p$, $f(p)=f(\sqrt{2})=f(p+(\sqrt{2}-p))$? – Li Chun Min Jun 2 '17 at 2:58

Let $x,y\in \mathbb{R}$. Choose irrational $r$ such that $x+r, y+r$ are irrational. Then we have $$f(x) = f(x+y+r)=f(y+x+r)=f(y)$$ Thus f is constant.
• @QuantumPizza as $y+r$ irrational $f(x) = f(x+y+r)$ by the property of $f$, likewise for $f(y)$ – Birch Bryant Jun 2 '17 at 3:06
• Indeed you can choose just an irrational number $r$, but is it trivial? – clark Jun 2 '17 at 3:09