Integral Test
We’ve already proved that the harmonic series diverges using partial sums. Now we’ll use a different approach that’s powerful enough to handle many other series: the integral test. The integral test compares an infinite sum to an improper integral. This comparison works because both represent ways of “adding up” infinitely many values.
The integral test only applies to series with all positive terms.
Let’s see how this works with the harmonic series [latex]\displaystyle\sum_{n=1}^{\infty} \frac{1}{n}[/latex].
In Figure 1, we represent each term of the series as a rectangle with area [latex]1, \frac{1}{2}, \frac{1}{3}, \frac{1}{4}, \ldots[/latex] These rectangles sit above the curve [latex]f(x) = \frac{1}{x}[/latex].
![This is a graph in quadrant 1 of a decreasing concave up curve approaching the x-axis – f(x) = 1/x. Five rectangles are drawn with base 1 over the interval [1, 6]. The height of each rectangle is determined by the value of the function at the left endpoint of the rectangle’s base. The areas for each are marked: 1, 1/2, 1/3, 1/4, and 1/5.](https://s3-us-west-2.amazonaws.com/courses-images/wp-content/uploads/sites/4175/2019/04/11234342/CNX_Calc_Figure_09_03_001.jpg)
From the graph, we can see that the total area of the rectangles is greater than the area under the curve:
Let’s evaluate that integral:
Since [latex]\underset{k\to \infty}{\text{lim}} \ln(k+1) = \infty[/latex], the partial sums [latex]{S_k}[/latex] are unbounded.
Therefore, [latex]{S_k}[/latex] diverges, which means the harmonic series [latex]\displaystyle\sum_{n=1}^{\infty} \frac{1}{n}[/latex] also diverges.
Now let’s see how the integral test can prove convergence. Consider the series [latex]\displaystyle\sum_{n=1}^{\infty} \frac{1}{n^2}[/latex].
In Figure 2, we sketch rectangles with areas [latex]1, \frac{1}{2^2}, \frac{1}{3^2}, \ldots[/latex] along with the function [latex]f(x) = \frac{1}{x^2}[/latex].
![This is a graph in quadrant 1 of the decreasing concave up curve f(x) = 1/(x^2), which approaches the x axis. Rectangles of base 1 are drawn over the interval [0, 5]. The height of each rectangle is determined by the value of the function at the right endpoint of its base. The areas of each are marked: 1, 1/(2^2), 1/(3^2), 1/(4^2) and 1/(5^2).](https://s3-us-west-2.amazonaws.com/courses-images/wp-content/uploads/sites/4175/2019/04/11234344/CNX_Calc_Figure_09_03_004.jpg)
Notice that the rectangles sit below the curve, so the total area of the rectangles is less than the area under the curve:
Let’s evaluate this integral:
This shows that the partial sums [latex]{S_k}[/latex] are bounded above by [latex]2[/latex].
Since [latex]S_k = S_{k-1} + \frac{1}{k^2}[/latex] for [latex]k \geq 2[/latex], the sequence [latex]{S_k}[/latex] is also increasing. A sequence that is both increasing and bounded must converge. Since [latex]{S_k}[/latex] is increasing and bounded, it converges. Therefore, the series [latex]\displaystyle\sum_{n=1}^{\infty} \frac{1}{n^2}[/latex] converges.
General Integral Test
We can extend this approach to test many different series. The key is finding the right function to compare with your series. For a series [latex]\displaystyle\sum_{n=1}^{\infty} a_n[/latex] with positive terms, we need a continuous, positive, decreasing function [latex]f[/latex] where [latex]f(n) = a_n[/latex] for all positive integers, then:
For convergence (Figure 3a), the [latex]k[/latex]th partial sum [latex]S_k[/latex] satisfies:
[latex]S_k = a_1 + a_2 + a_3 + \cdots + a_k < a_1 + \int_1^k f(x)dx < 1 + \int_1^{\infty} f(x)dx[/latex]
If [latex]\int_1^{\infty} f(x)dx[/latex] converges, then [latex]{S_k}[/latex] is bounded and increasing, so the series converges.
For divergence (Figure 3b), the [latex]k[/latex]th partial sum satisfies:
[latex]S_k = a_1 + a_2 + a_3 + \cdots + a_k > \int_1^{k+1} f(x)dx[/latex]
If [latex]\int_1^{\infty} f(x)dx[/latex] diverges, then [latex]\underset{k\to \infty}{\text{lim}} \int_1^{k+1} f(x)dx = \infty[/latex], making [latex]{S_k}[/latex] unbounded. Therefore the series diverges.
![This shows two graphs side by side of the same function y = f(x), a decreasing concave up curve approaching the x axis. Rectangles are drawn with base 1 over the intervals [0, 6] and [1, 6]. For the graph on the left, the height of each rectangle is determined by the value of the function at the right endpoint of its base. For the graph on the right, the height of each rectangle is determined by the value of the function at the left endpoint of its base. Areas a_1 through a_6 are marked in the graph on the left, and the same for a_1 to a_5 on the right.](https://s3-us-west-2.amazonaws.com/courses-images/wp-content/uploads/sites/4175/2019/04/11234347/CNX_Calc_Figure_09_03_002.jpg)
integral test
Suppose [latex]\displaystyle\sum _{n=1}^{\infty }{a}_{n}[/latex] is a series with positive terms [latex]{a}_{n}[/latex]. Suppose there exists a function [latex]f[/latex] and a positive integer [latex]N[/latex] such that the following three conditions are satisfied:
- [latex]f[/latex] is continuous,
- [latex]f[/latex] is decreasing, and
- [latex]f\left(n\right)={a}_{n}[/latex] for all integers [latex]n\ge N[/latex].
Then [latex]\displaystyle\sum _{n=1}^{\infty }{a}_{n}\text{ and }{\displaystyle\int }_{N}^{\infty }f\left(x\right)dx[/latex]both converge or both diverge (see Figure 3).
Although convergence of [latex]\int_N^{\infty} f(x)dx[/latex] implies convergence of the related series [latex]\displaystyle\sum_{n=1}^{\infty} a_n[/latex], it does not imply that the value of the integral and the series are the same.
Consider this example: The series [latex]\displaystyle\sum _{n=1}^{\infty }{\left(\frac{1}{e}\right)}^{n}=\frac{1}{e}+{\left(\frac{1}{e}\right)}^{2}+{\left(\frac{1}{e}\right)}^{3}+\cdots[/latex] is a geometric series with initial term [latex]a=\frac{1}{e}[/latex] and ratio [latex]r=\frac{1}{e}[/latex].
The series converges to:
However, the related integral [latex]{\displaystyle\int }_{1}^{\infty }{\left(\frac{1}{e}\right)}^{x}dx[/latex] gives us:
In the following examples, we explore how to use the integral test. Before doing so, we should note that since one of the conditions of the test is that the function is decreasing, we can use calculus to verify that this condition is met.
For each of the following series, use the integral test to determine whether the series converges or diverges.
- [latex]\displaystyle\sum _{n=1}^{\infty }\frac{1}{{n}^{3}}[/latex]
- [latex]\displaystyle\sum _{n=1}^{\infty }\frac{1}{\sqrt{2n - 1}}[/latex]