$\int_a^bf^2(x)\,dx\le \frac{2}{3}\int_a^bf(x)\,dx$ for a convex differentiable function

In Prove $\int _0^\infty f^2 dx \leq \cdots $ for $f$ convex the following theorem was shown:

If $F$ is convex and non-negative on $[0, \infty)$ then $$ \int _0^\infty F^2(x) dx \leq \frac{2}{3}\cdot \max_{x \in \mathbb R^+} F(x) \cdot \int _0^\infty F(x) dx \, .$$

Our function $f$ is non-negative and convex on $[a, b]$ with $f(a) = 0$ and $f(b) = 1$. If we define $F$ on $[0, \infty)$ as $$ F(x) = \begin{cases} f(b-x) & \text{ for } 0 \le x \le b-a \\ 0 & \text{ for } x > b-a \end{cases} $$ then $F$ satisfies the hypotheses of the above theorem, and therefore $$ \int_a^bf^2(x)\,dx = \int _0^\infty F^2(x) dx \leq \frac{2}{3}\cdot \max_{x \in \mathbb R^+} F(x) \cdot \int _0^\infty F(x) dx = \frac{2}{3}\int_a^bf(x)\,dx \, . $$


Alternatively we can modify the proof of the above theorem for this case. Define $\varphi: [a, b] \to \Bbb R$ as $$ \varphi(x) = \frac 23 f(x) \int_a^x f(t) \, dt - \int_a^x f^2(t) \, dt \, . $$ The goal is to show that $\varphi$ is (weakly) increasing. Then the desired conclusion follows with $$ 0 = \varphi(a) \le \varphi(b) = \frac 23 \int_a^b f(t) \, dt - \int_a^b f^2(t) \, . $$ Since $f$ is assumed to be differentiable, we have $$ \varphi'(x) = \frac 23 f'(x) \int_a^x f(t) \, dt + \frac 23 f^2(x) - f^2(x) \\ = \frac 23 f'(x) \int_a^x f(t) \, dt - \frac 13 f^2(x) \, . $$ Now we distinguish two cases:

  • If $f'(x) =0$ then $f'(t) =0$ for $a \le t \le x$, so that $f(x) = f(a) = 0$ and therefore $\varphi'(x) = 0$.
  • If $f'(x) >0$ then we estimate $f(t)$ from below by the tangent at $(x, f(x))$: $$ \int_a^x f(t) \, dt \ge \int_{x-f(x)/f'(x)}^x \bigl( f(x) + (t-x)f'(x) \bigr) \, dt = \frac{f^2(x)}{2f'(x)} $$ and therefore $\varphi'(x) \ge 0$.

So $\varphi'(x) \ge 0$ for all $x \in [a, b]$, which means that $\varphi$ is increasing on the interval, and we are done.

Remark 1: The proof becomes easier if we assume that $f$ is twice differentiable. Then $$ \varphi''(x) = \frac 23 f''(x) \int_a^x f(t) \, dt \ge 0 $$ so that $\varphi'(x) \ge \varphi'(0) = 0$.

Remark 2: The proof works even without the assumption that $f$ is differentiable: As a convex function, $f$ has a right derivative $$ f_+'(x) = \lim_{\substack{h \to 0\\ h > 0}} \frac{f(x+h)-f(x)}{h} $$ everywhere in $[a, b)$, and we can replace $f'$ by $f_+'$ and $\varphi'$ by $\varphi_+'$ in the above argument.