I ran into this in the context of probability but it's really just a calculus question.
Let $\lim_{x \to \infty} F(x) = 1$, and $\lim_{x \to 0} F(x) = 0$ and $f(x) = F'(x)$, and let it be known that the integral $\int_0^{\infty} xf(x)dx$ has a finite value (this is true for lots of potential choices of $F$, e.g. the CDF of a Uniform(0,1) distribution). Then try to use integration by parts with $u=x, dv=f(x)dx$:
$$\int_0^{\infty} xf(x)dx = xF(x)\rvert_0^{\infty} - \int_0^{\infty} F(x)1dx$$
Now without knowing more about how $F(x)$ is defined I can't take its integral but I can deduce that:
$$xF(x)\rvert_0^{\infty} = \lim_{x \to \infty} xF(x) - 0 \cdot 0 = \lim_{x \to \infty} x \cdot \lim_{x \to \infty}F(x) = \lim_{x \to \infty} x \cdot 1 = \infty$$
Questions:
Do we have to assume that since the integration by parts formula is true that $\int_0^{\infty} F(x)$ will expand to something that makes the right hand side converge?
If doesn't have to expand to something that makes the right hand side converge, does that mean if you get an infinite term when doing integration by parts this is just an integral the technique doesn't work on? Or does it mean the premise was wrong that $\int_0^{\infty} xf(x)dx$ has a finite value?
If it does have to expand to something that makes the right hand side converge, does that mean it's possible to evaluate a limit "too early" by concluding it's infinity before combining it with other limits (e.g. since the integral from 0 to infinity will also expand out to a $\lim_{x \to \infty}$)?