Show that if the integral of the "derivative" of a L^1 function is 0, then the function is constant a.e. I'm working on the following problem: 
Let $f\in L^1[a,b]$. Prove that if 
$$\lim\limits_{h\to 0}\frac 1h\int_a^b|f(x+h)-f(x)|dx=0,(*)$$
then there is a constant $c$ such that $f(x)=c$ for almost every $x\in (a,b)$. 
I started by noting that $C_c^\infty([a,b])$ is dense in $L^1([a,b])$, so we can find a sequence $\{f_n\}\subseteq C_c[a,b]$ such that $\|f_n-f\|_{L^1[a,b]}\to 0$ as $n\to \infty$. If we have $(*)$ for $f_n$, where $n$ is sufficiently large, then we can conclude that $f_n$ is constant, and therefore $f$ is constant a.e.. But I got stuck when trying to show $(*)$ for $f_n$, $n$ large. It seems that the usual triangle inequality type argument wouldn't work here since there is a $\frac 1h$ in the front. 
So I was wondering if there is any way to make the above argument work? Or if not, how to solve the problem? Any suggestions/hints would be appreciated!
 A: First, I am not sure if we can define $f(x+h)$ when when $f$ is defined on the interval $[a,b]$, we would need to make sense of $f(b+h)$ for $h>0$. We need to assume $f$ has compact support on $(a,b)$, or $(a,b) = \mathbb{R}$.
Let us assume $f$ has compact support on $(a,b)$, take $\phi\in \mathcal{D}(a,b)$, then by definition of distributional derivative we have
$$-\langle f', \phi \rangle := \langle f, \phi' \rangle = \int_a^b f\phi' dx =  \int_a^b f\left[\lim_{h\rightarrow 0} \frac{\phi(x+h)-\phi(x)}{h}\right] dx .$$
Now we want to bring the limit to the outside of the integral, this is done by dominated covergence theorem, note by mean value theorem, we have the following bounding function
$$ \left|f\frac{\phi(x+h)-\phi(x)}{h}\right| = \left|f\frac{\phi'(\xi) h}{h}\right| \leq |f| \|\phi'\|_{\max},$$
so by Dominated convergence theorem
$$\int_a^b \lim_{h\rightarrow 0}  f\left[\frac{\phi(x+h)-\phi(x)}{h}\right] dx = \lim_{h\rightarrow 0}\int_a^b f\left[ \frac{\phi(x+h)-\phi(x)}{h}\right] dx.$$
Since both $f$ and $\phi$ have compact support, for $|h|$ small enough, so the support of $f$ and $\phi$ can be shifted by $ h$ but still remain in the interval $(a,b)$. Using the change of variable
$$\int_{a}^b f(x)\phi(x+h)dx = \int_{a+h}^{b+h} f(x-h)\phi(x)dx = \int_{a}^{b} f(x-h)\phi(x) dx$$
note this ok even though "$\phi(a-h)$" in the second integral and "$f(a-h)$" in the third integral are undefined. Apply this to the difference quotient
$$\int_a^b f\left[ \frac{\phi(x+h)-\phi(x)}{h}\right] dx = \int_a^b \left[ \frac{f(x)-f(x-h)}{h}\right]\phi dx.$$
Back to the limit, we have 
$$|-\langle f', \phi \rangle | =  \lim_{h\rightarrow 0} \left|\int_a^b -\left[ \frac{f(x-h)-f(x)}{h}\right]\phi dx\right| \leq\lim_{h\rightarrow 0}  \left\| -\frac{f(x-h)-f(x)}{h}\right\|_1 \|\phi\|_\infty = 0$$
This shows $\langle f', \phi \rangle = 0$ for each $\phi\in \mathcal{D}(a,b)$, follow the (nontranvial) standard result, we have $f$ must be a constant. 
A: This is an easy consequence of Lebesgue's Theorem. Let $a<c<d<b$ and assume that $c$ and $d$ are Lebesgue points of $f$. Then $\frac {\int_c^{d} f(x+h)dx -\int_c^{d}f(x)dx} h \to 0$. This gives $\frac {\int_d^{d+h} f(x+h)dx -\int_c^{c+h}f(x)dx} h \to 0$. Since $c$ and $d$ are Lebesgue points this gives $f(c)=f(d)$. Since almost all points are Lebesgue points it follows that $f$ is a.e. constant
