TITLE: Find all function satisfying a given inequality
QUESTION [5 upvotes]: Find all functions $ F : R \rightarrow R $ 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 $
My attempt:
Observe that 
$ -(x_1 - x_2)^2 \le F(x_1) - F(x_2) \le (x_1 - x_2)^2  $
Assume WLOG that $ x_1 - x_2 >0 $, then we have 
$ -(x_1 - x_2) \le (F(x_1) - F(x_2))/(x_1 - x_2) \le x_1 - x_2 $ 
As $ x_1 $ tends to $x_2$, we have
$ 0 \le dF/dx \le 0 $ 
hence 
$ dF/dx = 0 $
Therefore $ F(x) = $ constant
Is this solution correct? (probably not because the problem didn't say nothing about the function be differentiable)
Any tip will be great, thanks.

REPLY [2 votes]: You are correct, and as a point of interest this problem is one of the coffin problems. Problem 2 on This link