Unit 7, lesson 97

The Integral Test

How to decide convergence of a series of positive decreasing terms by comparing it with an improper integral, which p-series converge, and how the integral bounds the error of a partial sum.

  • Theory part 193
  • Practice part 194
  • Convergence and Convergence Tests

Draw the terms of a series as rectangles of width one standing on the xx axis. If the heights come from a decreasing curve, the rectangles hug the area under that curve from above and from below. So the series and the improper integral of the curve either both have finite size or both have infinite size. That picture is the whole idea of the integral test.

Key terms

Positive, continuous, eventually decreasing

Definition The integral test uses a function ff and an integer N≥1N \ge 1 such that, on the interval [N,∞)[N, \infty),

  1. the function ff is continuous,
  2. its values are positive, f(x)>0f(x) > 0,
  3. the function ff is decreasing, that is f(x2)≤f(x1)f(x_2) \le f(x_1) whenever N≤x1<x2N \le x_1 < x_2,

and the terms of the series are an=f(n)a_n = f(n) for n≥Nn \ge N. When ff is differentiable on (N,∞)(N, \infty), a convenient way to check the third condition is to show f′(x)≤0f'(x) \le 0 for x>Nx > N.

In plain words You need an unbroken positive curve through the terms that goes downhill from some point on. What happens before that point does not matter.

Example Take f(x)=ln⁡xxf(x) = \frac{\ln x}{x}. It is continuous and positive for x>1x > 1, and

f′(x)=1−ln⁡xx2<0for x>e.f'(x) = \frac{1 - \ln x}{x^2} < 0 \quad \text{for } x > e.

So ff is decreasing on [3,∞)[3, \infty) and the hypotheses hold with N=3N = 3, even though ff increases between 11 and ee.

The integral test

Definition Suppose ff is continuous, positive and decreasing on [N,∞)[N, \infty) and an=f(n)a_n = f(n) for n≥Nn \ge N. Then

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

either both converge or both diverge. By the rule on finite changes, the same then holds for ∑n=1∞an\sum_{n=1}^{\infty} a_n.

In plain words If the area under the curve is finite, the sum is finite, and if the area is infinite, so is the sum. The test does not say the two numbers are equal.

Example For ∑n=2∞1nln⁡n\sum_{n=2}^{\infty} \frac{1}{n \ln n} use f(x)=1xln⁡xf(x) = \frac{1}{x \ln x}, which is continuous, positive and decreasing on [2,∞)[2, \infty) because xln⁡xx \ln x is positive and increasing there. With u=ln⁡xu = \ln x,

∫2tdxxln⁡x=ln⁡(ln⁡t)−ln⁡(ln⁡2)→∞as t→∞.\int_2^{t} \frac{dx}{x \ln x} = \ln(\ln t) - \ln(\ln 2) \to \infty \quad \text{as } t \to \infty.

The integral diverges, so the series diverges.

p-series

Definition The p-series ∑n=1∞1np\sum_{n=1}^{\infty} \frac{1}{n^p} converges if p>1p > 1 and diverges if p≤1p \le 1.

For p>0p > 0 the function f(x)=x−pf(x) = x^{-p} is continuous, positive and decreasing on [1,∞)[1, \infty), and

∫1∞x−p dx=1p−1when p>1,\int_1^{\infty} x^{-p}\,dx = \frac{1}{p - 1} \quad \text{when } p > 1,

while the integral diverges when 0<p≤10 < p \le 1. For p≤0p \le 0 the terms do not tend to 00, so the series diverges by the nth term test.

In plain words The power pp has to be strictly bigger than 11. At p=1p = 1 you get the harmonic series, which diverges.

Example For ∑1n3/2\sum \frac{1}{n^{3/2}} the integral is

∫1∞x−3/2 dx=lim⁡t→∞(2−2t)=2,\int_1^{\infty} x^{-3/2}\,dx = \lim_{t \to \infty} \left(2 - \frac{2}{\sqrt{t}}\right) = 2,

so the series converges. The rectangles to the right of n=1n = 1 lie under the curve, which also gives the bound

∑n=1∞1n3/2≤1+∫1∞x−3/2 dx=3.\sum_{n=1}^{\infty} \frac{1}{n^{3/2}} \le 1 + \int_1^{\infty} x^{-3/2}\,dx = 3.

The true sum is about 2.6122.612.

Remainder bounds from the integral

Definition Suppose ff is continuous, positive and decreasing on [n,∞)[n, \infty), ak=f(k)a_k = f(k) for k≥nk \ge n, and ∑ak\sum a_k converges with sum SS. Then the remainder Rn=S−snR_n = S - s_n satisfies

∫n+1∞f(x) dx≤Rn≤∫n∞f(x) dx,\int_{n+1}^{\infty} f(x)\,dx \le R_n \le \int_n^{\infty} f(x)\,dx,

and so

sn+∫n+1∞f(x) dx≤S≤sn+∫n∞f(x) dx.s_n + \int_{n+1}^{\infty} f(x)\,dx \le S \le s_n + \int_n^{\infty} f(x)\,dx.

In plain words The part of the sum you left out is trapped between two areas you can compute. That turns a partial sum into an estimate with a guaranteed error.

Example For ∑1n2\sum \frac{1}{n^2} with n=10n = 10, the partial sum is s10≈1.549768s_{10} \approx 1.549768. The two integrals are

∫11∞x−2 dx=111,∫10∞x−2 dx=110,\int_{11}^{\infty} x^{-2}\,dx = \frac{1}{11}, \qquad \int_{10}^{\infty} x^{-2}\,dx = \frac{1}{10},

so

1.640677≤S≤1.649768.1.640677 \le S \le 1.649768.

The exact sum π26≈1.644934\frac{\pi^2}{6} \approx 1.644934 lies in this interval.

Hypotheses versus the visual trend

Definition The conclusion of the integral test can fail if ff is not decreasing on [N,∞)[N, \infty), even when ff is positive and continuous and the terms f(n)f(n) look well behaved. Decreasing must be checked for the function on the whole interval, not guessed from a plot or from a few terms.

In plain words A picture or a table of the first terms can look perfectly downhill and still hide wiggles. The test rests on the rectangles hugging the curve, and that needs the curve itself to go down.

Example Let f(x)=sin⁡2(πx)+1x2f(x) = \sin^2(\pi x) + \frac{1}{x^2}, which is positive and continuous on [1,∞)[1, \infty). At integers sin⁡(πn)=0\sin(\pi n) = 0, so f(n)=1n2f(n) = \frac{1}{n^2} and ∑f(n)\sum f(n) converges. But for every integer kk

∫kk+1sin⁡2(πx) dx=12,\int_k^{k+1} \sin^2(\pi x)\,dx = \frac{1}{2},

so ∫1∞f(x) dx\int_1^{\infty} f(x)\,dx diverges. Here ff is not decreasing, so the test does not apply, and indeed the series and the integral disagree.

Check yourself

  1. Use the integral test to decide whether ∑n=1∞ne−n2\sum_{n=1}^{\infty} n e^{-n^2} converges.
Show the answer

Take f(x)=xe−x2f(x) = x e^{-x^2}, which is continuous and positive on [1,∞)[1, \infty). It is decreasing there because

f′(x)=(1−2x2)e−x2<0for x≥1.f'(x) = (1 - 2x^2)e^{-x^2} < 0 \quad \text{for } x \ge 1.

With u=x2u = x^2 the integral is

∫1∞xe−x2 dx=lim⁡t→∞e−1−e−t22=12e,\int_1^{\infty} x e^{-x^2}\,dx = \lim_{t \to \infty} \frac{e^{-1} - e^{-t^2}}{2} = \frac{1}{2e},

which is finite, so the series converges.

  1. Does ∑n=2∞1n(ln⁡n)2\sum_{n=2}^{\infty} \frac{1}{n (\ln n)^2} converge?
Show the answer

Yes. The function 1x(ln⁡x)2\frac{1}{x(\ln x)^2} is continuous, positive and decreasing on [2,∞)[2, \infty), because x(ln⁡x)2x(\ln x)^2 is positive and increasing there. With u=ln⁡xu = \ln x the integral is

∫2∞dxx(ln⁡x)2=∫ln⁡2∞u−2 du=1ln⁡2,\int_2^{\infty} \frac{dx}{x(\ln x)^2} = \int_{\ln 2}^{\infty} u^{-2}\,du = \frac{1}{\ln 2},

which is finite, so the series converges.

  1. Give an upper bound for the error when ∑1n3\sum \frac{1}{n^3} is approximated by s5s_5.
Show the answer

The function x−3x^{-3} is continuous, positive and decreasing on [5,∞)[5, \infty), so the integral bound gives

R5≤∫5∞x−3 dx=12⋅52=0.02.R_5 \le \int_5^{\infty} x^{-3}\,dx = \frac{1}{2 \cdot 5^2} = 0.02.

How this lesson connects

It also uses monotone positive terms.