[Math] A continuous function $f:[0,\infty)\to [0,\infty)$ such that the integral from zero to infinity exists and $f$ is unbounded.

real-analysis

Find an example of a continuous function $f:[0,\infty)\to [0,\infty)$ such that the integral between zero and infinity exists and f is unbounded.

I have been thinking about this question for quite a while. The function can't have any asymptotes at 0 or any other value otherwise it won't be defined over the interval required, so the function must increase to infinity as x goes to infinity? But I can't find such a function for which the integral is defined.

Best Answer

Hint Can you find a function $f: [n,n+1) \to [0,\infty)$ such that $\int_n^{n+1} f(x) dx \leq \frac{1}{n^2}$, $f(n)=f(n+1)=0$, but $f(n+\frac{1}{2}) > n$?

Try to draw the graph of such a function....