Show, using the mean value theorem and given $|f(x)-f(y)| ≤ |x-y|^3$ and $x, y ∈ [0,1]$, that $f(x)$ has to be constant. [duplicate]

Let $f$ be a function defined on R and suppose that there exists $M>0$ such that for any $x,y∈R$, $|f(x)-f(y)|≤M|x-y|^2$. Prove that $f$ is a constant function.

I don't even know how to start, I know that I need to show that $f(x)$ equal to some number , zero for instance. I think that $M$ is the upper bound of $f$ but I don't think it help.


For any $x,y$, the difference quotient of $f$ obeys $$\bigg| \frac{f(x) - f(y)}{x-y} \bigg| \leq M|x-y|.$$ In particular $f$ is differentiable and its derivative is zero everywhere (both by the squeeze theorem).

Since the derivative is everywhere zero, what can you say about $f$?