Prove that f is a constant function 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.
 A: 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$?
A: For any $y\in R$, taking limit on the given inequality, we have
$$
0 \leqslant\lim _{x \rightarrow y}\left|\frac{f(x)-f(y)}{x-y}\right| \leqslant \lim _{x \rightarrow y} M|x-y|=0
$$
By the Sandwich Rule, $$
\begin{array}{ll}
& \lim _{x \rightarrow y}\left|\frac{f(x)-f(y)}{x-y}\right|=0 \\
\Rightarrow & \lim _{x \rightarrow y} \frac{f(x)-f(y)}{x-y}=0 \\
\Rightarrow & f^{\prime}(y)=0 \\
\Rightarrow &f \text { is a constant function.}
\end{array}
$$
A: An example of a function $f \colon \mathbb{Q}_p\to \mathbb{Q}_p$ such that
$$|f(x) - f(y)|_p = |x-y|_p^2$$
For $x = \sum_{n \ge n_0} a_n p^n$ take $f(x) = \sum_{n\ge n_0} a_n p^{2n}$
Note that the norm on $\mathbb{Q}_p$ is non-archimedean.
Otherwise, if  $f \colon \mathbb{R}\to X$ metric space and $d(f(x), f(y)) \le C |x-y|^{\alpha}$ for some $C>0$, $\alpha > 1$, and all $x$, $y$, fix $x$, $y$ and  then consider for some $n$ natural the points $x_k = x+ \frac{k}{n}(y-x)$, $k=0, \ldots, n$. We have
$$d(f(x_{k+1}), f(x_k)) \le C|x_{k+1}-x_k|^{\alpha} = C\frac{|x-y|^{\alpha}}{n^{\alpha}}$$
and now with the triangle inequality we get
$$d(f(x), f(y)) \le n \cdot C \frac{|x-y|^{\alpha}}{n^{\alpha}}=C \frac{|x-y|^{\alpha}}{n^{\alpha-1}} $$
Now take $n\to \infty$ and get $d(f(x), f(y)) = 0$.
Now, we can have a nonconstant function if $0 < \alpha < 1$. An example for $\alpha=\frac{1}{2}$:  consider the function $f \colon [0, \infty) \to [0, \infty)$, $f(x) = \sqrt{x}$. We have
$$\frac{|\sqrt{x}-\sqrt{y}|}{\sqrt{|x-y|}}= \frac{|\sqrt{x}-\sqrt{y}|}{\sqrt{|\sqrt{x}-\sqrt{y}|\cdot |\sqrt{x} + \sqrt{y}|}}\le 1$$
