# Show that an irrationally periodic function is also a constant function [duplicate]

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.

• Not just possible duplicate -- it's verbatim. – colormegone Jul 28 '15 at 2:10

Hint: It is enough to show that you have $f(x) = f(x+r)$ for every real number $r$. You have it for all irrational $r$, so you just need to prove it for rational $r$. You can write any rational number as a sum of two irrational numbers.
• Ah! So one could say, given irrational number $r$, and rational number $k$, since $k=r+(k-r)$, the sum of two irrational numbers, for any rational $k$, $f(x)=f(x+k)$. As this property applies to all real numbers, rational or not, the function must be equal for all real numbers, and henceforth, it is constant. Is this a valid solution – bob the pie Jul 28 '15 at 1:50