If $\int_0^xf(t)dt$ is convex in $x$, is $f(t)$ increasing almost everywhere? Suppose that $F(x)\equiv\int_0^xf(t)dt$ is a convex function of $x$. Is it true that $f(t)$ is increasing in $t$ almost everywhere?  
My intuition is yes and here is the reasoning (not very rigorous). For $\int_0^xf(t)dt$ being well defined, $f(t)$ must be continuous almost everywhere. If $f(\cdot)$ is continuous at $x$, we have $F'(x)=f(x)$. If $f(\cdot)$ is also differentiable at $x$, we have $F''(x)=f'(x)\geq0$ as $F(\cdot)$ is convex.  
However, even if $f(\cdot)$ is continuous almost everywhere, it needs not be differentiable at each continuous point. I am not sure if above reasoning can be extended to the case of non-differentiable $f$.
 A: If $F(x)$ is well-defined (as a Lebesgue integral), $f$ must be measurable. 
Suppose there are measurable sets $A$ and $B$ of nonzero measure with
$a < b$ and $f(a) > f(b)$ for all $a \in A,\; b \in B$. 
We may assume (after deleting some subsets of $A$ and $B$, still leaving the measures nonzero) that $\inf(B) - \sup(A) = \delta > 0$ and $\inf(f(A)) - \sup(f(B)) = \epsilon > 0$.
Let $a$ be a Lebesgue point of $A$ and $b$ a Lebesgue point of $B$.  Then for $\eta > 0$ sufficiently small
we have $$ \eqalign{F(a+\eta) - F(a-\eta) &= \int_{a-\eta}^{a+\eta} f(x)\; dx \cr > 2 \eta (\inf(f(A)) - \epsilon/3)}$$
and
$$\eqalign{F(b+\eta) - F(b-\eta) &= \int_{b-\eta}^{b+\eta} f(x)\; dx \cr &< 2 \eta(\sup(f(B)) + \epsilon/3)\cr
& < F(a+\eta) - F(a-\eta)}$$
But if $b - \eta > a + \eta$ this contradicts convexity of $F$.
A: A useful characterisation of convexity on an interval is based on the quantity
$R(x,y) = {f(x)-f(y) \over x-y}$. 
Then $f$ is convex iff $x \mapsto R(x,y)$ is non decreasing for each fixed $y$ (and vice versa, since $R$ is symmetric).
Since $f$ is (presumed) integrable, we know that $F$ is differentiable ae. and at those
points, $F'(x) = f(x)$.
Pick two points $x < y$ at which $F$ is differentiable and $h>0$ such that $x+h < y$.
Then $R(x,x+h) \le R(x,y+h) \le R(y,y+h)$. Now take the limit as $h \downarrow 0$ to get
$F'(x) \le F'(y)$.
