What is the sufficient condition for the value of integrable function $f\in L^1(\mathbb{R})$ to go to $0$ when $|x|\rightarrow \infty$? What is the sufficient condition for the value of integrable function $f\in L^1(\mathbb{R})$ to go to $0$ when $|x|\rightarrow \infty$?
Case 1: $f $ is differentiable on $\mathbb{R}$.
Case 2: $f$ is ddifferentiable on $\mathbb{R}$ and $\int_{\mathbb{R}} |f'|<\infty$.
I think the  case 1 is enough to prove $\lim_{|x|\rightarrow \infty} f(x)=0$, because $f$ is differentiable everywhere, so f is at least continuous on $\mathbb{R}$. By the integral of $f$ we can get $\lim\sup_{|x|\rightarrow \infty}|f(x)|=0$, otherwise we can find a counterexample. Is that correct?
Then I am thinking that if we change the condition ''$f$ is differentiable'' to be ''$f$ is differentiable almost everywhere'', then what hanppens? 
 A: A] Consider a smooth function, null outside $[0,1]$. Now consider 
$$
g(x) = \sum f(n^2(x-n))
$$
Then $\limsup g = \sup f$ and as $\sum n^{-2}<\infty$, $\int|g|<\infty$.
B] Consider a sequence $x_n$ increasing to $\infty$.
Then the sequence $f(x_n)$ is a Cauchy sequence:
$$|f(x_{n+p}) - f(x_n)| =\left| \int_{x_{n}}^{x_{n+p}}f'\right|
\le \int_{x_{n}}^{\infty}|f'|  = \epsilon_n \to 0
$$hence the sequence converge. The only possible limit is $0$.
edit: added B.
A: Let $f\in L^{1}(\mathbb R).$ Also assume that, its Fourier transform, $\hat{f}\in L^{1}(\mathbb R).$ Then $f$ is continuous and vanishing at infinity.(By inversion formula, and Reimann Lebesgue lemma)
A: The condition you want is uniform continuity. With merely continuity, you can imagine a continuous function which consists of countably many triangles centered at $2,3,\dots$ of height $1$ and width $1/4,1/9,\dots,1/n^2,\dots$. You can even imagine them being height $n$ and width $1/8,1/27,\dots,1/n^3,\dots$, if you want the function to be unbounded. It's also not a big deal to smooth out this example if you want to assume a certain amount of differentiability. 
With uniform continuity, if there is any $\varepsilon$ so that arbitrarily large $x$ satisfy $|f(x)| \geq \varepsilon$, then each such $x$ supplies an interval of a fixed width $\delta$ in which $|f(z)| \geq \varepsilon/2$, and so you wind up with countably many intervals which each contribute $\varepsilon \delta/2$ to the integral, which makes $f \notin L^1$.
