Prove that the integral $\int_1^\infty f(x)\, dx$ and series $\sum f(n)$ both converge or both diverge? If f is monotonic decreasing for all $x \ge 1$ and if $\lim \limits_{x \to +\infty}f(x) =0 $,
Prove that the integral $\int_1^\infty f(x)\,dx$ and series $\sum f(n)$ both converge or both diverge?
I try this exercise at 10.24 of book tom apostol's calculus like this:
Let $S_n=\sum f(n)$ and $T_n=\int_1^nf(x)\,dx$, since f is monotonic decreasing we can get
$$
S_n-S_1\le T_n \le \int_1^a f(t)\,dt \le T_{n+1} \le S_n \\
Where\, a \in [n,n+1]
$$
As $a \to +\infty$, $n \to +\infty$, so $\int_1^{\infty} f(x)\,dx$ same convergence or divergence as $T_n$ which also has same as $S_n$. So we have proved.
I am not sure what I have try is correct or not. Any help will be appreciated.
 A: Let $$F(x)=\int_{1}^{x}f(t)dt,\forall\ x\geq\ 1.$$When $n\leq x\leq n+1$ we have $$a_{n+1}=f(n+1)\leq f(x)\leq f(n)=a_{n}$$ since $f$ is monotonic decreasing.
Thus we have $$a_{n+1}\leq\int_{n}^{n+1}f(t)dt\leq a_{n}$$which means$$S_{n}\leq a_{1}+F(n),F(n)\leq S_{n-1},$$where $S_{n}=\sum\limits_{k=1}^{n}a_{k}.$
So we can conclude that the integral $\int_{1}^{\infty}f(x)dx$ and series $\sum\limits_{n=1}^{\infty}a_{n}$ both converge or both diverge since $S_{n}$ and $F_{n}$ are both monotonic increasing.
A: Since $f(x)$ is monotonically decreasing and tends to $0$, you can prove that $f(x)$ is not negative. To prove it by contradiction, we can assume the function is negative at a point $N$. Then we would have:
$f(N) = -c < 0 \implies -f(N) = c$
Where $c > 0$. Because $f$ is monotonically decreasing, we know that $\forall n > N. f(n) \le f(N) = -c < 0 \implies -f(n) \ge -f(N) = c$
From that:
$\forall \epsilon < c. \forall n > N. |f(n)| = -f(n) > \epsilon$
Which would contradict the assumption that $f$ tends to $0$, so $f$ has to be non-negative.
Then we can use the proof mentioned below, or a similar one to the integral test theorem ($10.11$), because $\int_n^x f(x) dx \to 0$, as $n, x \to \infty$.
