Problem
Show that there exists a function $f$ integrable on $[0,\infty)$, continuous and such that there is a sequence $(x_n)_{n \in \mathbb N}$ for which $$\lim_{n \to \infty}x_n=\infty \space \space \text{and} \space \lim_{n \to \infty} f(x_n)=\infty$$
I thought of picking the ordinary divergent sequence $x_n=n$ so as to construct a continuous lebesgue integrable function $f$ for which $f(x_n)=n$. I don't know if this is possible but my idea was to make the function take the value $0$ except on a very small neighborhood around each natural number $n$, I've attached a horrible drawing of the function.
I'm awfully sorry about my drawing skills, I hope the idea of the function I have in mind is clear. I would like to know if there is a way of making the slopes tend to infinity so that the integral is finite. If this is not possible, I would appreciate suggestions to construct a function that satisfies the conditions of the problem. Thanks in advance.
Hint.
Your idea is good.
The integral of $f$ is the sum of the areas of the triangles. Find the slope in order to have the area of triangle $n$ equal to $\frac{1}{n^2}$. As $\sum \frac{1}{n^2}$ converges you're done.
For more details, you can hve a look here.