We are asked to prove the following:
Let $f\in L^p(\mathbb R)$, with $1\leq p<\infty$. Show that $$g(x)=\int_{x}^{x+1}f(t)\,dt$$ is continuous. We did the following:
From Hölder's inequality, for $a,b\in\mathbb R$ and for any function $h\in L^p(\mathbb R)$, one can show that $$ \int_{a}^{b} |h(t)|\, dt \leq (b-a)^\frac{p-1}{p} \left(\int_{a}^{b} |h|^{p} \,dt\right)^\frac{1}{p}.$$ Let $x,y\in\mathbb R$ with $x<y$. Then we have $$|g(y)-g(x)| \leq \int_{x}^{y} |f(t)|\,dt + \int_{x+1}^{y+1} |f(t)|\,dt \leq 2(y-x)^\frac{p-1}{p} \|f\|_p \xrightarrow{y \rightarrow x} 0.$$
Is this correct or are we missing some justification? We read this online solution: 
which uses the dominated convergence theorem, but we don't know where this theorem applies in our reasoning. Any help will be appreciated, thank you.