The subsequent statement can be regarded as a follow-up to
- If $\int_0^x f \ dm$ is zero everywhere then $f$ is zero almost everywhere
- Is $f$ non-negative a.e. if its primitive is non-decreasing?
Let $f:[a,b]\to\mathbb{R}$ be Lebesgue integrable. Furthemore, let $$ g:[a,b]\ni x\mapsto\int_a^x f(t)\,\mathrm{d}t\in\mathbb{R} $$ be convex. Then $f$ is non-decreasing almost everywhere.
Let $a\le x_0<x_1<x_2\le b$. Since $f$ is convex, we have $$ \frac{g(x_2)-g(x_1)}{x_2-x_1}-\frac{g(x_1)-g(x_0)}{x_1-x_0}\ge 0\text{.} $$ This can be reduced to $$ \int_{x_1}^{x_2} \frac{f(t)}{x_2-x_1}\,\mathrm{d}t \ge\int_{x_0}^{x_1} \frac{f(t)}{x_1-x_0}\,\mathrm{d}t\text{.} $$ The last formula roughly shows that the 'average' $f$ on $[x_0,x_1]$ does not exceed the 'average' of $f$ on $[x_1,x_2]$. Do you know a rigorous argument showing that $f$ is non-decreasing a.e.?