Today, my teacher asked about a real function that was integrable, but such that $\displaystyle\lim_{t\to \infty}f(t)\neq 0$ ($f$ need not have a limit).
It's easy to forge an example: a function that has tightening spikes each with areas $1/n^2$ does the trick.
He then asked for a real $C^\infty$ function that was integrable, but such that $\displaystyle\lim_{t\to \infty}f(t)\neq 0$ ($f$ need not have a limit).
One heuristic argument is to take the previous function and "smoothen" the spikes. However, he referred to a nicer function that can be defined explicitely.
Do you have an idea ? I've looked for something involving $\sin,\cos,\tan$