TITLE: Existence of an improper integral without the existence of a limit
QUESTION [5 upvotes]: Can a continuous non-decreasing function exist for all $x \in [0, \infty)$ with $\int_0^\infty f \, dx$ existing, but the $\lim_{x \to \infty} f$  not existing? If it does, what does it look like? I feel that if the limit does not exist, how can the improper integral exist?

REPLY [2 votes]: The limit must exist, and it must be $0$. 
If $f$ is not bounded above, the integral clearly doesn't exist. If $f(x)$ is bounded above, then since $f$ is non-decreasing, $\lim_{x\to\infty} f(x)$ exists. One can show that if that limit is non-zero, then the integral doesn't converge. 
The assumption of continuity is not necessary. But we did use strongly the hypothesis that the function is non-decreasing.