Section 4: The Integral Test

Log In


The Integral Test: Let $f$ be continuous, positive, and decreasing on $[1, \infty)$. Let $a_n = f(n)$. Then $\sum_{n=1}^\infty a_n$ converges if and only if $\int_1^\infty f(x)\;dx$ converges (this is an improper integral).

Example: Let's test $\sum_{n=1}^\infty \dfrac{1}{n^2 + 1}$ for convergence. The relevant function is $f(x) = \frac{1}{x^2 + 1}$. $f$ is continuous and positive. It is also decreasing: $x^2 + 1$ is increasing, so $1/(x^2 + 1)$ is decreasing. We compute $\int_1^\infty \frac{1}{x^2 + 1}\;dx = \lim_{b \to \infty}\arctan{b} - \arctan{1} = \frac{\pi}{2} - \frac{\pi}{4} = \frac{\pi}{4}$. The integral converges, so the series $\sum_{n=1}^\infty \dfrac{1}{n^2 + 1}$ also converges.

To understand why the Integral Test works, switch between left and right endpoints in the Riemann sum below. In each case, the rectangles have width $1$. The height is the value of each term of the series. The explanation is simply that left the Riemann $L_n$ sums are an overestimate for the integral, and the right Riemann sums $R_n$ are an underestimate for the curve. This is because the curve represents a decreasing function. Therefore, we have an inequality of the form $R_n \leq \int_1^\infty f(x)\;dx \leq L_n$. The rest of the argument is similar to the Comparison Test.

Left Riemann Sum
Right Riemann Sum

Mini-Quiz: Is $\sum_{n=1}^\infty \dfrac{1}{n\ln{\left(n\right)}}$ convergent?

Yes
No


Technically, $f$ doesn't have to be decreasing on $[1, \infty)$. It could be decreasing, for example, on $[5, \infty)$. All that matters is that $f$ is ultimately decreasing. This is because the convergence of a series (or any sequence) only depends on the tail-end. Following our example, $\sum_{n=1}^\infty a_n$ converges if and only if $\sum_{n=5}^\infty a_n$ converges. It's not important what happens in the finite sum $\sum_{n=1}^4 a_n$.

Example: Let's look at $\sum_{n=1}^\infty \frac{n^5}{e^n}$. The relevant function is $f(x) = x^5/e^x$, which is positive and continuous on $[1, \infty)$. But is it decreasing? The derivative is $f'(x) = e^{-x}(5x^4 - x^5)$. The critical points occur at $x = 0$ and $x = 5$. To the left of 0, $f'(x) > 0$; between 0 and 5, $f'(x) > 0$; to the right of 5, $f'(x) < 0$. This means $f(x)$ is decreasing on $[5, \infty)$, not on $[1, \infty)$. The integral test says in this case that $\sum_{n=5}^\infty \frac{n^5}{e^n}$ converges as long as $\int_5^\infty \frac{x^5}{e^x}\;dx$ converges. It doesn't matter what happens to $\sum_{n=1}^4 \frac{n^5}{e^n}$.

Mini-Quiz: In the previous example, we only showed that $f$ is continuous, positive, and decreasing on $[5, \infty)$. Finish by calculating $\int_5^\infty \frac{x^5}{e^x}\;dx$. Since this converges, so does $\sum_{n=5}^\infty \frac{n^5}{e^n}$.

$-e^{-x}(x^5 + 5x^4 + 20x^3 + 60x^2 + 120x + 120) + C$
$-e^{-x}(x^5 + 5x^4 + 20x^3 + 60x^2 + 120x + 120)$
$e^{-5}(5^5 + 5^5 + 20\cdot5^3 + 60\cdot5^2 + 120\cdot5 + 120)$
$e^{-5}(5^5 + 5^4 + 20\cdot5^3 + 60\cdot5^2 + 120\cdot5 + 120)$


One of the most important series to be familiar with is the $p$-series. A $p$-series is a series of the form $\sum_{n=1}^\infty \frac{1}{n^p}$. This converges if $p > 1$ and diverges if $p \leq 1$. You can derive this fact using the integral test.

Example: $\sum_{n=5}^\infty \frac{1}{n^3}$ converges since this is a $p$-series with $p = 3 > 1$.

Mini-Quiz: Does $\sum_{n=1}^\infty \frac{1}{\sqrt{n}}$ converge?

Yes
No


Note that the integral test only says a series converges if and only if the relevant improper integral converges. It does not give us the value of the series. For example, $\sum_{n=1}^\infty \frac{1}{n^2} = \frac{\pi^2}{6}$, but $\int_1^\infty \frac{1}{x^2}\;dx = 1$.

But the improper integral can give us an approximation (see the figure above). Let $s = \sum_{n=1}^\infty a_n, s_N = \sum_{i=1}^N a_i$. Now let $R_N = s - s_N$ be the error term. If $\sum a_n$ converges, then $$\int_{N+1}^\infty f(x)\;dx \leq R_N \leq \int_N^\infty f(x)\;dx.$$

Example: How many terms do we have to go out in the series $\sum_{n=1}^\infty \frac{1}{n^4}$ to be within 0.001 of the actual value of the series?

We know $R_N \leq \int_N^\infty \frac{1}{x^4}\;dx$. We want this to be $\leq 0.001$. Now $\int_N^\infty \frac{1}{x^4}\;dx = \lim_{b \to \infty}\frac{-1}{3b^3} + \frac{1}{3N^3} = \frac{1}{3N^3}$. So we solve the inequality $1/(3N^3) \leq 0.001$. This is equivalent to $N^3 \geq 333.33\ldots$, or $N \geq 6.93\ldots$. So we need to go out $N = 7$ terms.

Mini-Quiz: How many terms do you have to go out in the series $\sum_{n=1}^\infty \frac{1}{n^2}$ to be within 0.05 of the actual value of the series?

$19$
$20$
$21$



Integral Test Quiz Infinite Series Main Page