$1\leq p<\infty$ and $f\in L^p(R)$. $g(x)=\int_x^{x+1} f(t)dt$. Show that $g$ is continuous. What if $f\in L^{\infty} (\mathbb{R})$? Suppose $1\leq p<\infty$ and $f\in L^p(\mathbb{R})$. Define $g(x)=\int_x^{x+1} f(t)dt$. 
Show that $g$ is continuous. What if $f\in L^{\infty} (\mathbb{R})$?

Two attempts to prove $g$ is continuous:


*

*I tried to apply Holder's inequality to g and 1, but I don't see how to use Holder's inequality to prove $d(g(x),g(x_0)< \epsilon$.
\begin{align*} \int_R g\cdot1 d\mu &\leq \bigg( \int_R g^p d\mu \bigg)^{1/p} \bigg(\int_R1d\mu\bigg)^{1/q}\\ &\leq \bigg[ \int_R \bigg(\int_x^{x+1} f(t)dt\bigg)^p d\mu \bigg]^{1/p} [\mu(R)]^{1/q}\\
&\leq \cdots\\ \end{align*}

*(This has been considered as an incorrect proof.) 
Let $x_0 \in \mathbb{R}$ and $\epsilon > 0$. $f\in L^p(\mathbb{R}) \implies \big (\int_{\mathbb{R}}|f(t)|^pdt\big)^{1/p} <\infty \implies f(t)\leq M$(are these implications correct?). 
Let $\delta = \frac{\epsilon}{2M}$. Suppose $x\in \mathbb{R}$ and $d(x,x_0)=|x-x_0| < \delta$.
Then, 
\begin{align*}
|g(x)-g(x_0)|&= \bigg|\int_x^{x+1}f(t)dt-\int_{x_0}^{x_0+1}f(t)dt \bigg| \tag{1}\\
&= \bigg|\int_x^{x_0}f(t)dt +\int_{x_0}^{x+1}f(t)dt-\int_{x_0}^{x+1}f(t)dt -\int_{x+1}^{x_0+1}f(t)dt \bigg| \tag{2}\\
&= \bigg|\int_x^{x_0}f(t)dt - \int_{x+1}^{x_0+1}f(t)dt \bigg| \tag{3}\\
&\stackrel{true? why?}{=} \bigg| \delta\ f(x_1) - \delta\ f(x_1+1) \bigg| \text{ for some $x_1$ in $[x,x_0]$} \tag{4} \\
&= \bigg| \delta\ \big[\ f(x_1) - f(x_1+1)\big] \bigg| \tag{5} \\
&\leq | \delta|\times 2M = \epsilon. \tag{6}
\end{align*}
Therefore $h$ is continuous.
Can someone verify this proof? Or give me some suggestions to improve it. Any hints for proving the case when $f\in L^\infty(\mathbb{R})$? Thanks.
 A: Let $\epsilon > 0$, then take $\delta = \left(\frac{\epsilon}{2\|f\|_p}\right)^q$ where $\tfrac1p+\tfrac1q =1$. For fixed $x_0$, take any $x$ such that $|x-x_0|<\delta$, then
\begin{align}
|g(x) - g(x_0)|
&= \left|\int_x^{x+1} f(t)\;dt - \int_{x_0}^{x_0+1}f(t)\;dt\right|\\
&= \left|\int_x^{x_0} f(t)\;dt + \int_{x_0}^{x+1} f(t)\;dt- \int_{x_0}^{x+1}f(t)\;dt - \int_{x+1}^{x_0+1}f(t)\;dt\right| \\
&\leq \left|\int_x^{x_0} f(t)\;dt\right| + \left|\int_{x+1}^{x_0+1} f(t)\;dt\right|\\
&= \left|\int_{\mathbb{R}} f(t)\mathbb{I}_{(x,x_0)}\;dt\right| + \left|\int_{\mathbb{R}} f(t)\mathbb{I}_{(x+1,x_0+1)}\;dt\right|\\
&\overset{\text{Holders}}{\leq} \left|\int_{\mathbb{R}} f(t)^p\;dt\right|^{1/p} \left|\int_{\mathbb{R}}\mathbb{I}_{(x,x_0)}^q\;dt\right|^{1/q}
+ \left|\int_{\mathbb{R}} f(t)^p\;dt\right|^{1/p} \left|\int_{\mathbb{R}}\mathbb{I}_{(x+1,x_0+1)}^q\;dt\right|^{1/q}\\
&= \|f\|_p \cdot |x - x_0|^{1/q} + \|f\|_p \cdot |(x+1) - (x_0+1)|^{1/q} \\
&< \|f\|_p \cdot 2\delta^{1/q} = \epsilon
\end{align}
using that abuse of notation that $(a, b)$ actually means $(\min(a,b), \max(a,b))$.
A: There's a more elementary way to prove this, without using Holder. I'll work on $[0,\infty)$ for convenience.
Basic result: if $f:[0,\infty) \to \mathbb R$ is integrable on each $[0,x], x\ge 0,$ then $F(x) = \int_0^x f$ is continuous on $[0,\infty).$ This follows from the dominated convergence theorem: Suppose $x_n$ is a sequence in $[0,\infty)$ converging to $x_0.$ We have $f\cdot \chi_{[0,x_n]}\to f\cdot \chi_{[0,x]}$ a.e. A dominating function for this setup is $|f|\chi_I,$ where $I$ is a bounded interval containing all $x_n$ and $x_0.$ The result follows.
A corollary is that $x\to \int_x^{x+1}f$ is continuous. That's simply because the integral equals $F(x+1)-F(x).$
Now if $f\in L^1$ or $f\in L^\infty,$ then the integrability hypothesis above holds, and the desired conclusion follows. If $f\in L^p, 1<p<\infty,$ the integrability condition holds as well: For any $x>0,$ let $A_x = [0,x]\cap \{|f(t)|\le 1\},$ $B_x = [0,x]\cap \{|f(t)|>1\}.$ Then
$$\int_0^x|f| =  \int_{A_x}|f| + \int_{B_x}|f| \le  \int_{A_x}|f| + \int_{B_x}|f|^p.$$
Both of the integrals on the right are finite, and we're done.
A: Ok, I'll tackle the easier case. Suppose $f\in L^{\infty}(\mathbb{R})$, then we estimate
$$
\left|\int_y^{y+1}f(t)\mathrm dt-\int_x^{x+1}f(t)\mathrm dt \right| 
$$
for $|y-x|<\delta<1$ and wlog $y>x$. Then, 
$$
\left|\int_y^{y+1}f(t)\mathrm dt-\int_x^{x+1}f(t)\mathrm dt \right| =
\left|\int_{x+1}^{y+1}f(t)\mathrm dt-\int_x^{y}f(t)\mathrm dt \right|\\
\leq \int_{x+1}^{y+1}|f(t)|\mathrm dt+\int_x^y|f(t)|\mathrm dt\leq||f||_\infty|y-x|
$$
