TITLE: Find a function $f(x)$ such that $\forall \epsilon \gt 0, f(x) = f(x + \epsilon)$
QUESTION [5 upvotes]: Our professor asked us if we can find a function $f(x)$ such that $\forall \epsilon \gt 0, f(x) = f(x + \epsilon)$. In other words, a function that it's periodic no matter how small you pick the period $\epsilon$.
He also said that:

The constant function $f(x) = c$ satisfies the above equation, but he's looking for another one.
This function cannot be plotted or something like that, I didn't understand this part.

Any hints on this?
EDIT: So, as I was expecting, when $\epsilon \in \mathbb{R}$, only constant functions are valid solutions.  
What about the case $\epsilon \in \mathbb{Q}$?

REPLY [4 votes]: Let $x\in \Bbb R$ and put $\varepsilon=y-x$, for any $y>x$. Then $f(x)=f(x+\varepsilon)=f(y)$. Since $y>x$ was arbitrary, we conclude that $f(x)=f(y)$ for every $y>x$. Now, as $x\in\Bbb R$ was arbitrary, we conclude that $f(x)=f(y)$ for all $x,y\in\Bbb R$, that is, the only functions satisfying the property are constant functions.