I'm reading a result from Brezis' Functional Analysis
Proposition 8.5. Let $u \in L^p(\mathbb{R})$ with $1<p<\infty$. The following properties are equivalent:
- (i) $u \in W^{1, p}(\mathbb{R})$,
- (ii) there exists a constant $C$ such that for all $h \in \mathbb{R}$, $$ \|\tau_h u-u\|_{L^p} \leq C|h| . $$
Moreover, one can choose $C=\|u^{\prime}\|_{L^p}$ in (ii).
Recall that $(\tau_h u)(x)=u(x+h)$.The proof of the implication (i) $\implies$ (ii) is given as follows:
This implication is also valid when $p=1$. By Theorem 8.2 we have, for all $x$ and $h$ in $\mathbb{R}$, $$ u(x+h)-u(x)=\int_x^{x+h} u^{\prime}(t) d t=h \int_0^1 u^{\prime}(x+s h) d s . $$
Thus $$ |u(x+h)-u(x)| \leq|h| \int_0^1\left|u^{\prime}(x+s h)\right| d s . $$
Applying Hölder's inequality, we have $$ |u(x+h)-u(x)|^p \leq|h|^p \int_0^1\left|u^{\prime}(x+s h)\right|^p d s . $$
It then follows that $$ \begin{aligned} \int_{\mathbb{R}}|u(x+h)-u(x)|^p d x & \leq|h|^p \int_{\mathbb{R}} d x \int_0^1\left|u^{\prime}(x+s h)\right|^p d s \\ & \leq|h|^p \int_0^1 d s \int_{\mathbb{R}}\left|u^{\prime}(x+s h)\right|^p d x. \end{aligned} $$
But for $0<s<1$, $$ \int_{\mathbb{R}}\left|u^{\prime}(x+s h)\right|^p d x=\int_{\mathbb{R}}\left|u^{\prime}(y)\right|^p d y, $$
from which (ii) can be deduced.
Above proof is non-trivial. On the other hand, it seems I have a found a simpler approach. There are possibly subtle mistakes that I could not recognize in below attempt. Could you please have a check on it?
By Theorem 8.2 we have, for all $x$ and $h$ in $\mathbb{R}$, $$ u(x+h)-u(x) = \int_x^{x+h} u^{\prime}(t) d t. $$
Then $$ \begin{align*} \| \tau_h u - u\|_{L^p}^p &= \int_{\mathbb R} \left | \int_x^{x+h} u^{\prime}(t) d t \right |^p dx \\ &= h^p \int_{\mathbb R} \left | \frac{1}{h} \int_x^{x+h} u^{\prime}(t) d t \right |^p dx. \end{align*} $$
We need an auxilary result (from the same book):
Exercise 4.9 (Jensen's inequality) Let $(\Omega, \mathcal F, \mu)$ be a measure space with $\mu(\Omega) < \infty$. Let $J:\mathbb R \to (-\infty, +\infty]$ be a convex lower semi-continuous function such that $j$ is not identically equal to $+\infty$. Let $f \in L^1 (\Omega)$ such that $f(\omega) \in D(J)$ for $\mu$-a.e. $\omega \in \Omega$ and that $J(f) \in L^1 (\Omega)$. Then $$ J \bigg ( \frac{1}{\mu(\Omega)} \int_\Omega f \, \mathrm d \mu \bigg ) \le \frac{1}{\mu(\Omega)} \int_\Omega J \circ f \, \mathrm d \mu. $$ Here $D(J) := \{x \in \mathbb R : f(x) \neq +\infty\}$ is the domain of $J$.
The map $x \mapsto |x|^p$ is clearly convex and thus continuous for $p \in [1, \infty)$. WLOG, we assume $h>0$. By Exercise 4.9, we get $$ \left | \frac{1}{h} \int_x^{x+h} u^{\prime}(t) d t \right |^p \le \frac{1}{h} \int_x^{x+h} |u^{\prime}(t)|^p d t. $$
Then $$ \begin{align*} \| \tau_h u - u\|_{L^p}^p &\le h^{p-1} \int_{\mathbb R} \int_x^{x+h} |u^{\prime}(t)|^p d t dx \\ &= h^{p-1} \int_\mathbb R \left ( \int_{t-h}^t dx \right ) |u^{\prime}(t)|^p dt \quad \text{by Fubini's theorem} \\ &= h^{p} \|u'\|_{L^p}^p. \end{align*} $$
This completes the proof.