I need to give an example of function that is in $C^\infty([0,\infty))\cap L^1((0,\infty))$ but not in $W^{1,1}(0,\infty)$.
We know that if a function $u$ belongs to $W^{1,1}(0,\infty)$, then $u(x) \to 0$ for $x \to \infty$.
I though like this: we forget a moment that must be in $C^\infty([0,\infty))$, take $\varphi _n$ as the function that is defined only in $[n,n+1)$ and make a triangle of height $1$ over the segment $[n,n+\frac{1}{n^2}]$.Then we define $$\varphi(x) := \sum_{n=1}^\infty \varphi_n(x).$$
For definition we have $\varphi \in L^1(0,\infty)$ and it's quite clear that $\limsup_{x\to \infty} \varphi(x) = +1$ and $\liminf_{x\to \infty} \varphi(x) = 0$ so the limit $\lim_{x\to \infty} \varphi(x)$ does not exists (in particular it's not equal to $0$).
To complete the answer, instead of taking $\varphi_n$ that forms a tringle, we can take $\varphi_n \in C^\infty([n,n+1))$ for example that makes a "stretched Gaussian".
What do you think about this approach?