Problem: Let $f: \mathbb{R} \to \mathbb{R} $ be a function satisfying
\[
\vert f(x) - f(y) \vert \leq |x - y|^2,\quad \forall\ x,y\in \mathbb{R} .
\]
Then prove that $f$ is constant.
Solution: Note that given any $x,y\in \mathbb{R} $, we have
\[
\vert f(x) - f(y) \vert \leq |x - y|^2,
\]
which, in particular, implies that $f$ is a continuous function. So for any $x,h \in \mathbb{R} $, we have
\begin{align*}
& \vert f(x + h) - f(x) \vert \leq \vert (x + h) - x \vert ^2 \\
\implies & \frac{\vert f(x + h) - f(x) \vert }{\vert h \vert } \leq \vert h \vert \\
\implies & 0 \leq \frac{\vert f(x + h) - f(x) \vert }{\vert h \vert } \leq \vert h \vert.
\end{align*}
By Sandwich's theorem, we get
\[
\lim_{h \to 0} \frac{\vert f(x + h) - f(x) \vert }{\vert h \vert } = 0,
\]
thus $f$ is differentiable at $x$ with $f'(x) = 0$ for $x\in \mathbb{R} $. Therefore, $f$ is constant.