How do I find all functions $F$ with $F(x_1) − F(x_2) \le (x_1 − x_2)^2$ for all $x_1, x_2$? In calculus class we were given this so-called "coffin problem" originally from Moscow State University.
Find all real functions $F(x)$, having the property that for any $x_1$ and $x_2$ the
following inequality holds:
$$F(x_1) − F(x_2) \le (x_1 − x_2)^2$$
I have the solution to this problem, which is supposed to make the question very intuitive once you see it. However, I still do not quite understand it, and I would appreciate your help.
Solution:
The inequality implies
$$\frac{F(x_1) − F(x_2)}{|x_1 − x_2|} \le |x_1 − x_2|,$$
so the derivative of $F$ at any point $x_2$ exists and is equal to zero. Therefore,
by the fundamental theorem of calculus, the constant functions are exactly the
functions with the desired property.
Based on this solution, I substituted $x_1=x_2+h$ and took the limit as $h$ approaches zero, therefore by first principles, the derivative of $F(x)$ at $x_2$ is less than or equal to zero. Where do I proceed from here?
 A: The intended solution seems to be something like the following:
Fix some $x \in \mathbb{R}$.  By assumption, for any $h \in \mathbb{R}$ (in particular, for any very small value of $h$), taking $x_1 = x+h$ and $x_2 = x$, we get
$$ F(x+h) - F(x) \le \big( (x-h) - x \big)^2
\implies \frac{|F(x+h) - F(x)|}{|h|} \le |h|. $$
Take $h$ to zero, do a little algebra (the limit passes into the absolute value, since the absolute value function is continuous at $0$), and apply the Squeeze Theorem to get
$$ \Bigg\lvert \underbrace{\lim_{h\to 0}  \frac{F(x+h) - F(x)}{h}}_{=F'(x),\text{ if it exists}} \Bigg\rvert
\le \lim_{h\to 0} |h|
= 0.$$
This implies that $F$ is differentiable at $x$, and that $F'(x) = 0$.  But $x$ was chosen arbitrarily, so $F$ is differentiable everywhere and $F' \equiv 0$.  Therefore $F$ is a constant function.
A: Exchanging $x_1$ with $x_2$ in the original inequality shows $F(x_1)-F(x_2)$ is bound by $\pm(x_1-x_2)^2$, i.e. $\left|\frac{F(x_1)-F(x_2)}{x_1-x_2}\right|\le|x_1-x_2|$. This proves the two-sided derivative is $0$.
But you actually don't need derivatives to solve the problem. Since $|F(x)-F(0)|\le x^2$ for all $x$, $|F(x)-F(0)|\le\lim_{n\to\infty}n\left(\frac{x}{n}\right)^2=\lim_{n\to\infty}\frac{x^2}{n}=0$ by the triangle inequality.
