This means, since the integral \(\displaystyle \int_1^{\infty} \frac{1}{x} \ dx\) diverges, the sum is also diverges.

My question is what about the reverse? If the sum is converges, for example, does it mean the integral is also converges?

I am talking about a positive continuously decreasing function such as

\(\displaystyle f(x) = \frac{\tan^{-1} x}{1 + e^x}, x \geq 1\)

Does this integral converge?

\(\displaystyle \int_0^{\infty} \frac{\tan^{-1} x}{1 + e^x} \ dx\)

Can I say since \(\displaystyle \sum_{k=0}^{\infty} \frac{\tan^{-1} k}{1 + e^k}\) converges, then the integral is also converges?