Are there examples of functions $f$ such that $\int_0^\infty f\text{d}x$ exists, but $\lim_{x\to\infty}f(x)\neq 0$?
I curious because I know for infinite series, if $a_n\not\to 0$, then $\sum a_n$ diverges. I'm wondering if there is something similar for improper integrals.