A typical exercise is to exhib a function that is integrable but which doesn’t tend to $0$ as $x \to \infty$. An example we always see is the function that has bigger and bigger picks but of smaller width.
Now one question we could ask is : is all the integrable functions that doesn’t tend to $0$ have the same shape as the one described above.
That’s why I was wondering if the following is true. Let $f: \mathbb{R^+} \to \mathbb{R}$ be an integrable function (ie. $\int_{R^+} \mid f \mid \in \mathbb{R}$) and such that :
$$\lim_{x \to \infty} f(x) \ne 0$$
Then does it mean there exist a stricly increasing sequence $(x_n)_{n \in \mathbb{N}} \in \mathbb{R}^{\mathbb{N}}$ such that the sequence :
$$(f(x_n))_{n \in \mathbb{N}} \text{ is unbounded}$$ ?
Edit : There are plenty of trivial example when $f$ is not continuous (see the comments and Richard’s answer). That’s why I just want to restate the question and ask if this is true when $f$ is continuous ?
Best Answer
Function $\mathbf1_{\mathbb N}$ is integrable and takes care of a counterexample if no continuity is demanded.
If continuity is demanded then for every $n\in\mathbb N$ a nonnegative continuous function $f_n$ can be constructed that takes maximum $1$ in $n$, is $0$ outside $(n-\frac12,n+\frac12)$ and satisfies $\int f_n(x)dx\leq n^{-2}$.
Then evidently the $\sum_nf_n$ is a counterexample.