If $f\in L^1(\mathbb R)$ and $f'\in L^1(\mathbb R)$, then $\lim_{x\to \infty }f(x)=0$. Let $f,f'\in L^1(\mathbb R)$. Prove that $$\lim_{x\to \infty }f(x)=0.$$
First of all, is $f'$ defined a.e. ? Because there are no assumption on the fact that $f$ is derivable. So, is $$f'(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$$
for almost every $x$ ?
My attempt for the statement : Suppose WLOG $f'>0$. I'm not sure if it's true, but I would say that : Let $\varepsilon >0$. Since $f'$ is $L^1$, there is a ball $[a,b]$ s.t. $$\int_{]-\infty ,a[\cup]b,+\infty [}f'(x)dx<\varepsilon .$$
In particular, if $x>y>b$, then $$f(x)-f(y)=\int_y^x f'(t)dt<\varepsilon,$$
but I just can conclude that $\lim_{x\to \infty }f(x)-f(y)<\varepsilon .$ 
 A: I think the question is not properly posed. Normally the statement is interpreted as follows: if $f$ is integrable and differentiable almost everywhere with $f'$ also integrable then $f(x) \to 0$ as $ x \to \infty$. This statement is false. $f(x)=1$ when $x$ is an integer and $0$ otherwise gives a counterexample. Some additional assumptions on $f$ are necessary to prove that $f(x) \to 0$ as $ x \to \infty$.
A: The idea is to show that $f(x)-f(0)=\int_0^x f'$ hence $f$ has a limit in $\infty$, which must be $0$ because $f\in L^1$.
A: On the one hand, observe that exists $l = \lim_{x \to \infty} f(x)$. It is because for each $x \in \mathbb{R}$
$$
f(x) - f(a) = \int_{(a , x)} f' \quad \Longrightarrow \quad \lim_{x \to \infty} f(x) = f(a) + \int_{(a , \infty)} f' \in \mathbb{R}\mbox{,}
$$
as $f' \in L^1(\mathbb{R})$. On the other hand, if $l \neq 0$, then there exist $\varepsilon , x_0 \in (0 , \infty)$ such that $|f(x)| \geq \varepsilon$ for all $x \in \mathbb{R}$ with $x \geq x_0$. Therefore
$$
\int_{\mathbb{R}} |f| \geq \int_{[x_0 , \infty)} |f| \geq \varepsilon \int_{[x_0 , \infty)} 1 = \infty\mbox{,}
$$
which is a contradiction, as $f \in L^1(\mathbb{R})$.
