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?

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.
