[Math] Give an example of a continuous function $f : [0, ∞) \to [0, ∞)$ such that $\int_{0}^{\infty}f(x)dx$ exists but $f$ is unbounded.

analysisreal-analysis

Give an example of a continuous function $f : [0, ∞) \to [0, ∞)$ such that $\int_{0}^{\infty}f(x)dx$ exists but $f$ is unbounded.

I have been thinking about this. And I have come to the conclusion that I will need to construct a function, $f$, such that $f$ is a sequence of triangles of increasing height, but decreasing base.
I obviously need $f$ such that both the height of the triangles and the sum of the bases tend to infinity.
But I also need that the $\sum (\text{height} \times \text{base}) \leq \infty $

Best Answer

Building off your idea, but allowing most of the triangles to have zero height (otherwise it will not converge): Choose some divergent series. I'll assume we're dealing with the harmonic series $\sum \frac{1}{n}$. The nth triangle will have base $\frac{1}{n}$.

Now in general, start with $f \equiv 0$, i.e. suppose the general triangle we have is degenerate. But let the $2^n$th slot have a triangle of height $2^{n/2}$.

Or more generically: have some shape that has area $1$ from $0$ to $1$, then some shape that has area $\frac{1}{2}$ from $1$ to $2$, $\frac{1}{4}$ from $2$ to $3$, smoothing as necessary. You can make your function $0$ as much as you want, but you need to make your shapes get taller. You can think of fitting a triangle of height $k$ in the $k$th slot, making the base the necessary width to give area $\frac{1}{2^k}$ in that slot.

You can do many more along these lines.