Suppose $f(x)$ is continuous, positive, and decreasing on $[1, \infty)$. Define $a_n = f(n)$ for $n = 1, 2, 3, ...$ Then $\int_1^\infty f(x)\,dx$ converges if and only if $\displaystyle\sum_{n=1}^\infty a_n$ converges.

In other words:

an example

<aside>

Is $\displaystyle\sum_{n=1}^\infty \frac{1}{n^2}$ convergent or divergent?

</aside>

We can use the integral test here. First, we need to check the conditions for using the integral test.

$f(x) = \frac{1}{x^2}$ is continuous, positive, and decreasing on $[1, \infty)$, so the conditions are met.

We know that $\int_1^\infty f(x)\,dx = \int_1^\infty \frac{1}{x^2}\,dx = 1$ converges, so the sum $\displaystyle\sum_{n=1}^\infty \frac{1}{n^2}$ also converges.

another example

<aside>

Is $\displaystyle\sum_{n=2}^\infty \frac{n^2}{n^3-1}$ convergent or divergent?

</aside>

Consider $f(x) = \frac{x^2}{x^3-1}$. Checking conditions for the integral test:

Now let’s actually apply the integral test:

$$ \int_2^\infty\frac{x^2}{x^3-1}\,dx = \lim_{b\to\infty}\int_2^\infty \frac{x^2}{x^3-1}\,dx = \lim_{b\to\infty}\left[\frac{1}{3}\ln|x^3-1|\right]\bigg|2^b = \lim{b\to\infty}\left[\frac{1}{3}\ln|b^3-1| - \frac{1}{3}\ln|2^3-1|\right] = \infty $$

Therefore, $\displaystyle\sum_{n=2}^\infty \frac{n^2}{n^3-1}$ diverges.

yet another example

<aside>

Is $\displaystyle\sum_{n=1}^\infty \frac{e^{1/n}}{n^2}$ convergent or divergent?

</aside>