Prove $\lim\limits_{h\to0}\int_a^b\left|f(x+h)-f(x)\right|\,\mathrm dx=0$ Let $f(x)$ be a Riemann integrable function on any finite interval $I\subset\mathbb{R}$. Supposing $f(x)=0$ for $x\notin[a,b]$, show that $$\lim\limits_{h\to0}\int_a^b\left|f(x+h)-f(x)\right|\,\mathrm{d}x=0.$$
How to prove that if not familiar with the fact that Riemann integrable function is almost everywhere continuous?
 A: Hint.
You can prove the result for continuous functions as a continuous function on a compact interval is uniformly continuous.
Then, if $f$ is Riemann-integrable, you can for all $\epsilon >0$ find a step function $h_\epsilon$ such that:
$$ \int_a^b \left\vert f-h_\epsilon  \right\vert < \epsilon$$ 
and finally a function $g_\epsilon$ continuous such that
$$ \int_a^b \left\vert h_\epsilon-g_\epsilon  \right\vert < \epsilon$$
A: Brutal force: Let $\epsilon >0$. Then since $f$ is Riemann integrable, there is a $\delta >0$ so that any partition $P$ of 
$$a-1= x_0<x_1 < x_2 < \cdots x_n= b+1$$
with $x_{i+1} - x_i < \delta$ will have 
$$ U(f, P)- L(f, P)<\epsilon.$$
Now consider the partition 
$$ a < a+ h < a+ 2h < \cdots <a+ kh < b$$
where $a+ (k+1)h \ge b$ and $h < \delta/2$. Then 
\begin{equation}
\begin{split}
\int_a^b |f(x+ h) - f(x)| dx &= \sum_i \int_{a+ ih}^{a+ (i+1)h} |f(x+ h) - f(x)|dx \\
&\le \sum_i h \left( \sup_{x\in [a+ih,a+ (i+2) h]} f(x) -  \inf_{x\in [a+ih,a+ (i+2) h]} f(x)\right) \\
&\le  U(f, \hat P ) - L(f, \hat P) < \epsilon
\end{split}
\end{equation}
where $\hat P$ is the partition
$$ a< a+2h< a+ 4h < \cdots < a +\ell (2h) < b,$$
where $a + (\ell +1) 2h \ge b$. Thus 
$$\int_a^b |f(x+ h) - f(x)| dx < \epsilon$$
whenever $h < \delta/2$ and we are done. 
A: Here is a cleaner argument. We know that $C_c(\mathbb{R})$, namely the continuous functions with compact support are dense in $L^1(\mathbb{R})$. With this, denote $f_h \triangleq f(x+h)$. Take a $g \in C_c(\mathbb{R})$ such that
$$
||f-g||_{L^1(\mathbb{R})}<\frac{\epsilon}{2}.
$$
Now note by triangle inequality that,
$$
||f_h-f||_{L^1(\mathbb{R})} \leq \underbrace{||f_h-g_h||_{L^1(\mathbb{R})}}_{\leq \frac{\epsilon}{2}} + \underbrace{||g_h-g||_{L^1(\mathbb{R})}}_{\to 0,\ \text{as} \ h\to 0} + \underbrace{||g-f||_{L^1(\mathbb{R})}}_{<\frac{\epsilon}{2}}
$$
where the middle convergence follows since, as $|g(x+h)-g(x)|\to 0$ as $h\to0$, due to continuity of $g(\cdot)$ and since $|g(x+h)-g(x)|\leq 2|g(x)|\in L^1$, we have by dominated convergence that $\int |g(x+h)-g(x)|\to 0$.
Hence, for every $\epsilon>0$,
$$
\lim_{h\to 0}||f_h-f||_{L^1(\mathbb{R})} < \epsilon.
$$
Since $\epsilon>0$ is arbitrary, we conclude.
