TITLE: Show $f$ is constant if $|f(x)-f(y)|\leq (x-y)^2$.
QUESTION [23 upvotes]: Problem: Let $f$ be defined for all real $x$, and suppose that 
$$|f(x)-f(y)|\le (x-y)^2$$
for all real $x$ and $y$. Prove $f$ is constant.
Source: W. Rudin, Principles of Mathematical Analysis, Chapter 5, exercise 1.

REPLY [30 votes]: For any $x\in\mathbb{R}$,
$$
\begin{align}
|f'(x)|
&=\lim_{h\to0}\frac{|f(x+h)-f(x)|}{|h|}\\
&\le\lim_{h\to0}\frac{h^2}{|h|}\\
&=0
\end{align}
$$
Therefore, $f$ is constant.