The following problem is only tangentially related to my present work, and I do not have any applications. However, I am curious to know the solution -- or even to see a lack thereof, indicating that the problem may be worth a serious research.

Let $\mathcal F$ denote the class of all functions $f\colon[0,1]\to{\mathbb R}$ satisfying the inequality $$ f(tx+(1-t)y) \le tf(x) + (1-t)f(y) + |y-x|, \ x,y,t \in [0,1] $$ and the boundary condition $\max\{f(0),f(1)\}\le 0$.

Substituting $x=0$ and $y=1$, we see that all functions from $\mathcal F$ are uniformly bounded from above by $1$, and we let $$ F(x) := \sup \{ f(x)\colon f\in {\mathcal F} \}. $$ An interesting observation is that the function $F$ itself belongs to $\mathcal F$; hence, it is the pointwise maximal function of this class. What is this function, explicitly?

It is not difficult to see that $F$ is continuous on $[0,1]$, symmetric around $x=1/2$, positive on $(0,1)$, and vanishing at $x=0$ and $x=1$. Substituting $t=x$ and $y=0$ and renaming the variables in the resulting estimate gives $F(x)\le 2\sqrt x$; hence, indeed, $$ F(x) \le \min\{2\sqrt x,1,2\sqrt{1-x} \}. $$ On the other hand, the functions $\min\{4x,1,4(1-x)\}$ and $ex\ln(1/x)$ belong to $\mathcal F$, implying $$ F(x) \ge \min\{4x,1,4(1-x)\} $$ and $$ F(x) \ge \max \{ ex\ln(1/x), e(1-x)\ln(1/(1-x))\}, $$ for all $x\in[0,1]$.

The graphs of the bounding functions in the right-hand sides:

(Thus, the graph of $F$ resides somewhere between the highest of the green curves and the red curve.)

Comparing the estimates, we see that $F(x)=1$ for $x\in[1/4,3/4]$, and $0<F(x)<1$ for $x\in(0,1/4)$ and also for $x\in(3/4,1)$. I have more estimates and observations of this sort. Say, I can show that if $x=e^{-k}$, then $F(x)=ex\ln(1/x)$; that is, $F(e^{-k})=ke^{1-k}$ for $k\ge 2$. Another funny fact is that for any function $f\in{\mathcal F}$ (and in particular for the function $f=F$) one has $$ f(tx+(1-t)y) \le tf(x) + (1-t)f(y) + F(t)|y-x|, \ x,y,t \in [0,1]. $$ However, with all these partial results and rather tight bounds, so far I was unable to find $F(x)$ in general. Any ideas?