TITLE: Prove that every function that verifies $|f(x)-f(y)|\leq(x-y)^2$ for all $x,y$ is constant.
QUESTION [7 upvotes]: Let $f\colon \mathbb{R} \rightarrow \mathbb{R}$ be a function. In order to prove that every function that verifies $\lvert f(x)-f(y)\rvert \leq(x-y)^2$ for all $x,y$, is constant, I have considered on applying the Lagrange's theorem. There exists some $c\in[x,y]$ for which:
$$\frac{\lvert f(x)-f(y)\rvert}{x-y}=f'(c)\leq (x-y)$$
Which would certainly lead to success if I'm able to prove that that is $0$, the problem is I don't know how to proceed with the proof. Any help appreciated.

REPLY [3 votes]: There is a more elementary way to see this that uses no differentiability assumptions. 
For any $\epsilon$ we can take a sequence of points $x_0 \leq x_1 \leq \dots \leq x_n$ such that $x = x_0$ and $y = x_n$ and $|x_i - x_{i+1}| < \epsilon \llless 1$. Moreover, we can take $n \leq |x-y|/\epsilon$.
We then have:
$$ |f(x) - f(y)| = |f(x_0) - f(x_n)| = |(f(x_0) - f(x_1)) - \dots - (f(x_{n-1} - f(x_n))|$$
We then get: $|f(x) - f(y)| \leq |x_0 - x_1|^2 + \dots |x_{n-1} + x_n|^2$ by applying the triangle inequality and the hypothesis. We then have $|f(x) - f(y)| \leq n \epsilon^2 \leq \epsilon |x-y|$ which goes to zero as $\epsilon \rightarrow 0$. Thus $f(x) = f(y)$.
Essentially, small things get smaller under squaring so you can make the different too small for the values to be distinct.