Math Core

Lesson 6.4 · Infinite Sequences and Series

The integral test

Most series don't telescope and aren't geometric, so you can't find a formula for their partial sums. The integral test gets around this by comparing a series to an improper integral, which you can evaluate. It is also the tool that finally settles the harmonic series.

Series as areas

Picture the terms an=f(n)a_n = f(n) as rectangles of width 11: the rectangle over [n,n+1][n, n+1] has height f(n)f(n), so its area is ana_n. The sum of the series is the total area of all the rectangles. If ff is decreasing, those rectangles either sit just above or just below the curve y=f(x)y = f(x), depending on which endpoint you use for the height.

  • Using left endpoints, the rectangles lie above the curve, so ∑n=1∞an≥∫1∞f(x) dx\displaystyle\sum_{n=1}^{\infty} a_n \ge \int_1^{\infty} f(x)\,dx.
  • Using right endpoints (starting the rectangles one step later), they lie below the curve, so ∑n=2∞an≤∫1∞f(x) dx\displaystyle\sum_{n=2}^{\infty} a_n \le \int_1^{\infty} f(x)\,dx.

So if the integral is infinite, the bigger series is infinite too. If the integral is finite, the smaller series is finite, and adding back the single term a1a_1 keeps it finite. The series and the integral are tied together.

The terms 1/n² are the heights of the curve y = 1/x² at the integers. The series behaves like the area under the curve.Open in grapher →

The integral test

Suppose an=f(n)a_n = f(n), where ff is positive, continuous, and decreasing for x≥kx \ge k. Then

∑n=k∞anand∫k∞f(x) dx\sum_{n=k}^{\infty} a_n \quad\text{and}\quad \int_k^{\infty} f(x)\,dx

either both converge or both diverge.

Common mistake

When the integral converges, its value is not the sum of the series. For example, ∫1∞1x2 dx=1\displaystyle\int_1^{\infty} \frac{1}{x^2}\,dx = 1, but ∑n=1∞1n2=π26≈1.645\displaystyle\sum_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6} \approx 1.645. The test only tells you whether the series converges.

Checking the conditions

On a free-response question you must say why the test applies. Here is what to check.

  1. Positive: usually clear from the formula.
  2. Continuous: no division by zero or undefined logs on [k,∞)[k, \infty).
  3. Decreasing: either it is obvious (the denominator grows while the numerator stays fixed), or show f′(x)<0f'(x) < 0 for x≥kx \ge k.

The conditions only need to hold eventually. If ff increases for a while and then decreases from x=3x = 3 on, start the test at k=3k = 3; the first few terms don't affect convergence.

The harmonic series diverges

Take f(x)=1xf(x) = \dfrac{1}{x}, which is positive, continuous and decreasing for x≥1x \ge 1. Then

∫1∞1x dx=lim⁡b→∞ln⁡b=∞.\int_1^{\infty} \frac{1}{x}\,dx = \lim_{b\to\infty} \ln b = \infty.

The integral diverges, so the harmonic series ∑n=1∞1n\displaystyle\sum_{n=1}^{\infty} \frac{1}{n} diverges, even though its terms go to 00. The partial sums grow like ln⁡n\ln n: very slowly, but without bound. It takes more than 12,000 terms for the partial sum to pass 1010.

The same picture gives a useful estimate. The rectangles for 12+13+⋯+1n\frac12 + \frac13 + \cdots + \frac1n fit under the curve y=1xy = \frac1x from 11 to nn, and the rectangles for 1+12+⋯+1n−11 + \frac12 + \cdots + \frac{1}{n-1} sit on top of it, so

ln⁡n  ≤  1+12+13+⋯+1n  ≤  1+ln⁡n.\ln n \;\le\; 1 + \frac12 + \frac13 + \cdots + \frac1n \;\le\; 1 + \ln n.

For example, the sum of the first million terms of the harmonic series is between ln⁡(106)≈13.8\ln(10^6) \approx 13.8 and 14.814.8. That is a striking amount of growth for a million terms, which shows how slowly this series diverges, but it does diverge: ln⁡n\ln n has no upper bound.

When not to use the integral test

The integral test needs a function you can actually integrate, and it needs the terms to be positive and decreasing. Series with alternating signs like ∑(−1)nn\sum \frac{(-1)^n}{n}, series with factorials like ∑1n!\sum \frac{1}{n!} (there is no continuous "x!x!" that is easy to integrate), and series with oscillating terms like ∑2+sin⁡nn2\sum \frac{2 + \sin n}{n^2} (not decreasing) all call for other tests.

Worked examples

Worked example: A logarithmic series

Determine whether ∑n=2∞1nln⁡n\displaystyle\sum_{n=2}^{\infty} \frac{1}{n \ln n} converges or diverges.

Solution. Let f(x)=1xln⁡xf(x) = \dfrac{1}{x\ln x}. For x≥2x \ge 2 it is positive and continuous, and it is decreasing because the denominator xln⁡xx \ln x is increasing. Substitute u=ln⁡xu = \ln x, du=dxxdu = \dfrac{dx}{x}:

∫2∞dxxln⁡x=lim⁡b→∞[ln⁡(ln⁡x)]2b=lim⁡b→∞(ln⁡(ln⁡b)−ln⁡(ln⁡2))=∞.\int_2^{\infty} \frac{dx}{x\ln x} = \lim_{b\to\infty} \Big[\ln(\ln x)\Big]_2^b = \lim_{b\to\infty} \big(\ln(\ln b) - \ln(\ln 2)\big) = \infty.

The integral diverges, so the series diverges.

Worked example: An exponential series

Determine whether ∑n=1∞ne−n2\displaystyle\sum_{n=1}^{\infty} n e^{-n^2} converges.

Solution. Let f(x)=xe−x2f(x) = x e^{-x^2}. It is positive and continuous. Its derivative f′(x)=e−x2(1−2x2)f'(x) = e^{-x^2}(1 - 2x^2) is negative for x≥1x \ge 1, so ff is decreasing there. With u=−x2u = -x^2:

∫1∞xe−x2 dx=lim⁡b→∞[−12e−x2]1b=0+12e−1=12e.\int_1^{\infty} x e^{-x^2}\,dx = \lim_{b\to\infty} \left[-\frac{1}{2}e^{-x^2}\right]_1^b = 0 + \frac{1}{2}e^{-1} = \frac{1}{2e}.

The integral converges, so the series converges. (Its sum is not 12e\frac{1}{2e}.)

Worked example: An arctangent integral

Determine whether ∑n=1∞11+n2\displaystyle\sum_{n=1}^{\infty} \frac{1}{1 + n^2} converges.

Solution. f(x)=11+x2f(x) = \dfrac{1}{1+x^2} is positive, continuous and decreasing for x≥1x \ge 1.

∫1∞dx1+x2=lim⁡b→∞(arctan⁡b−arctan⁡1)=π2−π4=π4.\int_1^{\infty} \frac{dx}{1+x^2} = \lim_{b\to\infty} \big(\arctan b - \arctan 1\big) = \frac{\pi}{2} - \frac{\pi}{4} = \frac{\pi}{4}.

The integral is finite, so the series converges.

Tip

The integral test is the right choice when f(x)f(x) has an easy antiderivative, typically because a uu-substitution jumps out (1xln⁡x\frac{1}{x \ln x}, xe−x2x e^{-x^2}, xx2+1\frac{x}{x^2 + 1}). If the antiderivative is hard, try a comparison test instead.

Practice

Practice 1

Which condition must ff satisfy on [1,∞)[1, \infty) in order to apply the integral test to ∑n=1∞f(n)\displaystyle\sum_{n=1}^{\infty} f(n)?

Practice 2

Evaluate ∫1∞11+x2 dx\displaystyle\int_1^{\infty} \frac{1}{1 + x^2}\,dx, which is used to test ∑n=1∞11+n2\displaystyle\sum_{n=1}^{\infty}\frac{1}{1 + n^2}. Give an exact value.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

Evaluate ∫2∞1x(ln⁡x)2 dx\displaystyle\int_2^{\infty} \frac{1}{x(\ln x)^2}\,dx. Give an exact value.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

Based on the previous problem, what can you conclude about ∑n=2∞1n(ln⁡n)2\displaystyle\sum_{n=2}^{\infty} \frac{1}{n(\ln n)^2}?

Practice 5

Use the integral test to determine the behavior of ∑n=1∞nn2+1\displaystyle\sum_{n=1}^{\infty} \frac{n}{n^2 + 1}.

Practice 6

Evaluate ∫1∞xe−x2 dx\displaystyle\int_1^{\infty} x e^{-x^2}\,dx. Give an exact value.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

Which series can be shown to converge using the integral test with f(x)=ln⁡xx2f(x) = \dfrac{\ln x}{x^2}?