$f, f'\in L^{1}(\mathbb R) \implies \lim_{x\to \infty} f(x)=0 ?$ Suppose $f\in L^{1}(\mathbb R) $ and $f'\in L^{1}(\mathbb R).$
My Question is: 

Can we show, $\lim_{x\to \infty} f(x)=0$ ?

Thanks,
 A: $f'\in L^1(\Bbb R)$, then $\int_{-\infty}^0|f'(t)|dt$ and $\int_0^{+\infty}|f'(t)|dt$ converges, in particular $\int_{-\infty}^0f'(t)dt$ and $\int_0^{+\infty}f'(t)dt$ converges.


*

*The convergence of the integral $\int_0^{+\infty}f'(t)dt$ implies that the function $x\to \int_0^{x}f'(t)dt$ admit a finite limit $l$ (as $x\to +\infty$). But $\int_0^{x}f'(t)dt=f(x)-f(0)$, this implies that $f$ admit a finite limit $M$ (as $x\to +\infty$), if $M\neq 0$ then $|f(x)|\sim |M|$ (in $+\infty$) this is impossible because a constant function $x\to |M|$ is not integrable on $[0,+\infty[$ but $f$ is integrable on this interval . It follow that $M=0$, that is $f\to 0$ as $x\to +\infty$.

*By the same argument (by working in $]-\infty,0]$) we can show that $f(x)\to 0$ as $x\to -\infty$.
A: Yes. Two steps:
Step 1. using the inequality
$$y>x>a\Longrightarrow  \vert f(x)-f(y) \vert\leq\int_a^\infty\vert f'(t)\vert dt$$
we conclude that $f$ satisfies Cauchy criterion as $x\to\infty$ (because $f'\in L^1$,) and consequently the limit $\lim\limits_{x\to\infty}f(x)=\ell$ does exist.
Step 2. the limit $\ell$ must be zero because otherwise $f$ would not belong to $L^1$, and this is an easy task.
A: Suppose $g(x) = x$ and $I_n = [2^n - 3^{-n}, 2^n]$. Let $I = \cup_{n=1}^{\infty} I_n$ and $f(x) = g(x)\chi_{I}(x)$. 
Note that $I_n$ has length $3^{-n}$, and on this interval, $g$ is bounded above by $2^n$. Therefore,
$$\int_{I_n} g(x) dx \leq \left(\frac{2}{3}\right)^n$$
and so
$$\int_{\mathbb{R}} f(x) = \sum_{n=1}^{\infty} \int_{I_n} g(x) dx \leq \sum_{n=1}^{\infty}\left(\frac{2}{3}\right)^n = 2$$
so $f \in L^1$.
Also, $g'(x) = 1$ everywhere, so 
$$\int_{I_n}g'(x) dx = \left(\frac{1}{3}\right)^n$$
and so
$$\int_{\mathbb{R}} f'(x) = \sum_{n=1}^{\infty} \int_{I_n} g'(x) dx =\sum_{n=1}^{\infty}\left(\frac{1}{3}\right)^n = \frac{1}{2}$$
so $f' \in L^1$. 
And, of course, $\lim_{x \rightarrow \infty} f(x)$ does not exist.
We have used the fact that $f$ is differentiable almost everywhere, and the set of zero measure on which it is not differentiable (the endpoints of the $I_n$ intervals) has no effect on $\int f'$.
As the comment by Robert Israel notes (and as Omran Kouba proves), if we require that $f$ is differentiable everywhere and not merely almost everywhere, then no counterexample exists.
