I've been wondering if an improper integral (e.g. upper bound is $\infty$) over a function that is unbounded on the integration interval can converge.
Specifically, I know the integral $\int_1^\infty \frac{1}{x}~dx$ does not converge, whereas $\int_1^\infty\frac{1}{x^2}~dx$ converges. I also know that $\int_0^\infty\frac{1}{x^2}~dx$ does not converge, so i guess in its simplest form I'm wondering if there exists an $n$ (real?) such that $$\int_0^\infty\frac{1}{x^n}~dx$$ converges.
If that form is too simple but there exists something similar I'd be interested to hear how that works.
Thanks in advance!
It's not hard to modify your example to get a positive function $f(x)$ which is continuous and unbounded on $(0, \infty)$ such that $\int_0^\infty f(x) dx$ converges. One such example would be $$f(x) = \frac{e^{-x}}{\sqrt{x}};$$ we can check that \begin{align*} \int_0^\infty \frac{e^{-x}}{\sqrt{x}} dx &= \int_0^1 \frac{e^{-x}}{\sqrt{x}} dx + \int_1^\infty \frac{e^{-x}}{\sqrt{x}} dx \\ & \leq \int_0^1 \frac{dx}{\sqrt{x}} + \int_1^\infty e^{-x}dx \\ &= 2 + \frac{1}{e} \\ &< \infty. \\ \end{align*}
More generally, any function of the form $f(x) = \frac{a^{-x}}{x^p}$ with $a > 1$ and $0 < p < 1$ will furnish a suitable example of a positive unbounded function on $(0, \infty)$ with convergent improper integral over that open ray.