# question about improper integrals and limits

Let be $$f:[0,\infty[ \rightarrow \mathbb{R}$$ continuous. If $$\displaystyle \int_0^{\infty} f(x) dx$$ converges so $$\displaystyle \lim_{r\rightarrow \infty} \int_r^{\infty} f(x) dx=0$$

My Attempt:

Call $$G(r) = \displaystyle \int_0^{r} f(x)dx, \hspace{0.2cm}$$ then $$\hspace{0.2cm}\displaystyle \lim_{r\rightarrow \infty} G(r) = L$$

and we have $$L = \displaystyle \lim_{r\rightarrow \infty} G(r) = \displaystyle \lim_{r\rightarrow \infty} \displaystyle \int_0^{\infty} f(x) dx = \lim_{r\rightarrow \infty} \displaystyle \int_0^{r} f(x) dx$$ + $$\displaystyle \int_r^{\infty} f(x) dx = \lim_{r\rightarrow \infty} \displaystyle \int_0^{r} f(x) dx + \lim_{r\rightarrow \infty} \displaystyle \int_r^{\infty} f(x) dx = L + \lim_{r\rightarrow \infty} \displaystyle \int_r^{\infty} f(x) dx$$

Then $$\displaystyle \lim_{r\rightarrow \infty} \displaystyle \int_r^{\infty} f(x) dx= L-L = 0$$

But I think that this isn't correct because this expression $$\displaystyle\lim_{r\rightarrow \infty} \displaystyle \int_0^{r} f(x) dx + \lim_{r\rightarrow \infty} \displaystyle \int_r^{\infty} f(x) dx$$,

Is there a way to change this expression or another way to solve this exercise?

I think it is safer this way: You know that $$\lim_{r\to\infty}\int_0^rf\,dx=L$$. Choose $$R$$ large enough such that for any $$R, $$|\int_0^{r_1}f\,dx-L|<\epsilon/2$$ and $$|\int_0^{r_2}f\,dx-L|<\epsilon/2$$. Then $$|\int_{r_1}^{r_2}f\,dx|<\epsilon$$ and, a fortiori, $$|\int_{r_1}^{\infty}f\,dx|<\epsilon$$ (it is easy to see that the integral $$\int_{r_1}^{\infty}f\,dx$$ is convergent). By definition this means that $$\lim_{r\to\infty}\int_{r}^{\infty}f\,dx=0$$.