Suppose $f$ is integrable. Prove that $$ \int |f(x+h) - f(x)| dx \to 0 $$ as $h \to 0.$
The hint in the back of the book says that I should apply the following theorem:
Suppose $f$ is a Lebesgue measurable real-valued integrable function on $\mathbb{R}$. Let $\epsilon >0.$ Then there exists a continuous function $g$ with compact support such that $$ \int |f-g| < \epsilon.$$
I don't readily see how I can use this theorem to solve the exercise. How is this useful?
You want to prove that $\limsup_{h\to0}\int\lvert f(x+h)-f(x)\rvert\,dx=0$. Now, for all $\varepsilon>0$, there is some $g\in C_c(\Bbb R)$ such that $$\int\lvert f(x)-g(x)\rvert\,dx\le\varepsilon$$ Therefore for all $\varepsilon$ there is some $g$ such that for all $h$ \begin{align}&\int\lvert f(x+h)-f(x)\rvert\,dx\le \\&\le\int\lvert f(x+h)-g(x+h)\rvert\,dx+\int\lvert g(x)-f(x)\rvert\,dx+\int\lvert g(x+h)-g(x)\rvert\,dx\le\\&\le 2\varepsilon+\int \lvert g(x+h)-g(x)\rvert\,dx\end{align}
Now, by continuity $g(x+h)-g(x)\to 0$ as $h\to0$ and therefore, by dominated convergence, $$\lim_{h\to0}\int\lvert g(x+h)-g(x)\rvert\,dx= 0$$
Therefore, for all $\varepsilon>$, $$\limsup_{h\to0}\int\lvert f(x+h)-f(x)\rvert\,dx\le \limsup_{h\to 0} 2\varepsilon +\int\lvert g(x+h)-g(x)\rvert\,dx=2\varepsilon$$
And therefore $\limsup_{h\to0}\int\lvert f(x+h)-f(x)\rvert\,dx=0$.