TITLE: Prove that a function is a constant a.e.
QUESTION [7 upvotes]: Let $f(x) \in L^1 [a, b]$ satisfies $\lim_{h \to 0} 1/h \int_{a}^b |f(x+h)-f(x)|dx = 0$. I want to prove that there exists $c$ such that $f(x) = c$ a.e.
Morally what happens is that $\int_{a}^b |f'(x)|dx = 0$ which gives the desired result but $f(x)$ is not necessarily differentiable. How can I show this rigorously?

REPLY [2 votes]: I will assume that $f$ is defined outside of $[a, b]$ in a suitable way so that it is locally integrable on $\mathbb{R}$.
Define $F$ by
$$ F(x) = \int_{a}^{x} f(t) \, \mathrm{d}t. $$
Then it is well-known that the set $E$ of points $x$ in $[a, b]$ where $F'(x) = f(x)$ is Lebesgue-full in $[a, b]$, that is, $[a, b] \setminus E$ has zero Lebesgue measure. Now for any two points $c, d \in E$ with $ c< d$ and $h > 0$,
\begin{align*}
&\left| \frac{F(d+h) - F(d)}{h} - \frac{F(c+h) - F(c)}{h} \right|\\
&\quad= \left| \frac{1}{h} \int_{c}^{d} (f(x+h) - f(x)) \, \mathrm{d}x \right|
\leq \frac{1}{h} \int_{c}^{d} \left| f(x+h) - f(x) \right| \, \mathrm{d}x.
\end{align*}
Then, letting $h \to 0$ and using the assumption, we have
$$ \left| f(d) - f(c) \right| \leq 0 $$
and hence $f(d) = f(c)$. Since this is true for any $c, d \in E$, we find that $f$ is constant on $E$, proving the claim.