The function $f$ is defined on $\mathbb{R}$ such that for every $\delta\gt0$, $|f(y)-f(x)|\lt\delta^2$ for all $x,y\in\mathbb{R}$ and $|y-x|\lt\delta$. Prove that $f$ is a constant function.
So, what I know, is that I need to show that $f(a)=f(b)$ for all points $a,b\in\mathbb{R}$. Or for every $\epsilon\gt0$, $|f(a)-f(b)|\lt\epsilon$.
I'm at a loss here. I got a hint to divide the interval $[a, b]$ into $n$ smaller intervals. But I don't understand why, and how this would help me.
Hints and preferably a proof are very much appreciated. Thanks in advance.