I was reading a textbook on Sobolev space and encountered the following claim:
Suppose $f\in L_p([0,1])$ for some $1\leq p<\infty$, meaning that $\int_0^1{|f(x)|^p dx}<\infty$. Then $$ \lim_{h\to 0} \int_{|h|}^{1-|h|}\big|f(x+h)-f(x)\big|^p dx = 0. $$
Can anybody gives me a hint on how to prove this? It is obvious that the claim does not hold for $p=\infty$, though.
The limit is clearly true if $f$ is continuous since then $f$ is uniformly continuous ($[0,1]$ is compact). The continuous functions are dense in $L^p$ for $1 \le p < \infty$ - this is a fact whose proof you can look up in an analysis book.
The corresponding statement for $p=\infty$ would be that $||f(\cdot+h)-f(\cdot)||_{\infty,[h,1-h]} \to 0$ as $h \to 0^+$. But consider $f(x) = 1$ on $[0,.5]$ and $f(x) = 0$ on $(.5,1]$. Then $||f(\cdot+h)-f(\cdot)||_{\infty,[h,1-h]} = 1$ for all small $h$.