Function going from $0$ to $1$ with minimal concavity How small can I take $C>0$ such that there exists an $f\in C^2(\mathbb R;\mathbb R)$ satisfying the following properties:


*

*$f(x)=0$ for $x\leq 0$ and $f(x)=1$ for $x\geq 1$

*$f'(x)\geq 0$   for every $x\in \mathbb R$

*$f''(x) \geq -C$ for every $x\in \mathbb R$.


For example, if $C=2\pi$ one can take $f(x)   =     -\frac{1}{2\pi}\sin(2\pi x) +  x$ for $x\in [0,1]$ and as in condition 1) elswhere.
What about $C<2\pi$? Is it possible to take arbitrary small $C>0$?
 A: You can't have $C\le 2$, but any $C>2$ can be attained. 
To prove the first claim, use integration by parts: 
$$
\int_0^1 xf''(x)\,dx = -\int_0^1  f'(x)\,dx = -1
$$
So, if $f''\ge -C$, then $-1\ge -C \int_0^1 x \,dx$, hence $C\ge 2$. Equality cannot be attained, because $f''$ cannot be equal to $-2$ identically: this would break $C^2$ property.
Still, it's worth considering $g(x)=1-(x-1)^2$, for which $g'\equiv -2$. True, this is not even $C^1$ when extended. But with an arbitrarily small perturbation of $g$, the extension can be made $C^2$ smooth: you need to insert a small but very convex  piece near $0$, and  taper off the curvature near $1$. I suggest working with the second derivative: draw a piecewise linear function $h$ such that $h\ge -2-\epsilon$ everywhere, $h = -2-\epsilon$ on most of the interval, $h(0)=h(1)=0$, $\int_0^1 h(x)\,dx=0$, and $\int_0^1 xh(x)\,dx = -1$. Note that $h$ will need to have a tall narrow peak near $0$ in order to satisfy $\int_0^1 h(x)\,dx=0$. Integrate twice to construct $f$.
