Confusion about convergence of series and improper integral As it is known that $a_n\to 0$ is a necessary condition for a series $\sum_1^\infty a_n$ to converge, so does there exist a somewhat similar requirement of the integrand for convergent improper integral?
It clear doesn't hold that $\int f(x)dx$ need $f(x)\to 0$ to converge. For example, $\int_r^1\frac{1}{\sqrt x}\to 2$ and $\frac{1}{\sqrt x}\to \infty$ when $r\to 0$. But it is kind of like that $F(x)=\int^1_r \frac{1}{\sqrt x}$, $F(x)$ is constantly increasing and should goes to $\infty$ when $r\to 0$, since $F'(x)=\frac{1}{\sqrt{x}}$ monotonically goes to $\infty$, but why $F(x)$ is actually convergent beside the calculation showing it does?
And as for $\int^r_0 f(x), r\to\infty$, a integral is defined on $[1, \infty)$. Does such integrals require that $f(x)\to 0$ when $ r\to\infty$ to converge?
 A: A recent exercise came up by myself. I am not yet very mathematically matured, so please check.
Proposition
If $f: \mathbb{R} \to \mathbb{R}$ is nonnegative and uniformly continuous on $(1, \infty)$ and $\int_1^\infty f(x) dx$ converges, then $\lim_{x \to \infty} f(x) = 0$.
Proof
Assume for contradiction that $\lim_{x \to \infty} f(x) \neq 0$. Then by definition there exists $\epsilon \gt 0$ such that: for every $m \gt 0$ we have some $x \gt 0$ satisfying $x \gt m$ and $f(x) \ge \epsilon$. Thus we can construct a strictly increasing sequence $1 \lt x_1 \lt x_2 \lt x_3 \lt ...$ with $x_n \to \infty$ as $n \to \infty$ and $f(x_n) \ge \epsilon$ for $n = 1, 2, 3,...$. Moreover, we can construct the sequence such that $x_n + 1 \lt x_{n + 1}$ for $n = 1, 2, 3,...$. Now by uniform continuity there is some $\delta \gt 0$ with $\delta \lt \frac{1}{2}$ such that $\lvert f(t) - f(x_n) \rvert \le \frac{1}{3}\epsilon$ for every $t \in (x_n - \delta, x_n + \delta)$ and for $n = 1, 2, 3,...$. Thus $f(t) \ge f(x_n) - \lvert f(t) - f(x_n) \rvert \ge \epsilon - \frac{1}{3}\epsilon = \frac{2}{3}\epsilon$ for every $t \in (x_n - \delta, x_n + \delta)$ and for $n = 1, 2, 3,...$. Hence $\int_{x_n - \delta}^{x_n + \delta} f(t) dt \ge \int_{x_n - \delta}^{x_n + \delta} \frac{2}{3}\epsilon dt =\frac{4}{3}\epsilon\delta$ for $n = 1, 2, 3,...$. Hence $\int_1^\infty f(x) dx \ge \sum_{n = 1}^{\infty} \int_{x_n - \delta}^{x_n + \delta} f(t) dt \ge \sum_{n = 1}^{\infty} (\frac{4}{3}\epsilon\delta)$ which clearly do diverge, a contradiction. Hence $\lim_{x \to \infty} f(x) = 0$ as desired. QED.
Note
Without uniform continuity a counterexample can be constructed like the following drawing.

Just making the n-th triangle having area ${(\frac{1}{2})}^n$.
