Unit 10 · Topic 10.4 · BC

Integral test

Builds on improper integrals, Riemann sums of a decreasing function, and the tail of a series. 14 minutes.

  1. Example 1Check the integral-test conditions
  2. Example 2Set up the related improper integral
  3. Example 3Use the integral to decide convergence
  4. Example 4Bound a remaining tail

A series converges when its partial sums approach a number (topic 10.1), but most series have no formula for their partial sums. Often each term is the value of a function at a whole number,

\[\cy{a_n}=f(n)\]

so that a positive term is also the area of a rectangle of width 1 and height \(f(n)\). Such rectangles can be compared with the region under the graph of \(f\), whose area is an improper integral (topic 6.13). This topic shows when the series and the integral converge together and which integral to use. It also bounds the distance from a partial sum to the sum.

Rectangles above and below the curve

The curve y = 1 over x squared for x from 1 to 8, falling from height 1 toward the x-axis. Orange dots on the curve mark the points (n, 1 over n squared). Rectangles 1 wide stand on the intervals from 1 to 2, 2 to 3 and so on, up to n + 1, and at first each is as tall as the dot at its left end, so the rectangles stand above the curve, with red marking their parts above it. A button takes the heights at the right ends instead: the rectangles then lie under the curve, and teal marks the parts of the region above them. A slider sets the number of rectangles from 1 to 7. Another button adds bumps between the whole numbers: the curve still passes through every dot but rises and falls between them, and teal appears above the rectangles with left ends from x = 2 on.

Figure 1Each faintly shaded rectangle is 1 wide and as tall as an orange dot, a term \(\cy{a_n}=1/n^2\) on the curve \(y=1/x^2\). Red marks area of a rectangle above the curve, and teal marks area under the curve that the rectangles miss.

In Figure 1, \(f(x)=1/x^2\), so \(a_n=1/n^2\), and each orange dot marks a term as a point of the curve. The rectangles are 1 wide and stand on \([1,2]\), \([2,3]\), …, \([n,n+1]\). At first, each takes its height from the dot at its left end. The heights are then \(a_1\) through \(a_n\), so the total area is the partial sum \(S_n\).

Take the heights at the right ends with the button under Figure 1. The heights become \(a_2\) through \(a_{n+1}\), so the total is \(S_{n+1}-a_1\). The two totals are the left and right Riemann sums of \(f\) on \([1,n+1]\) with subintervals of width 1. For a continuous, decreasing \(f\), the right sum is at most the integral, and the left sum is at least it (topic 6.2):

\[S_{n+1}-a_1\le\int_1^{n+1}f(x)\,dx\le S_n\]

With the heights at the left ends, \(S_n\) exceeds the integral by the red area in Figure 1. With the heights at the right ends, \(S_{n+1}-a_1\) is less than the integral by the teal area.

If \(f\) is positive, so is every term, and the partial sums increase with \(n\). A sequence that never decreases converges if some number lies above all its terms, and otherwise it grows without bound. This is the Monotonic Sequence Theorem, which some books call the Monotone Convergence Theorem. It is a basic property of the real numbers, which this course uses without proof. Because \(f\) is positive, the area \(A(t)=\int_1^t f(x)\,dx\) also increases with \(t\), and the same holds for it as \(t\to\infty\).

Suppose that \(\int_1^{\infty}f(x)\,dx\) converges to a number \(I\). The areas \(A(t)\) increase toward \(I\), so none exceeds \(I\), and the inequality gives \(S_{n+1}\le a_1+I\) for every \(n\). The partial sums stay below \(a_1+I\), so the series converges. If instead the integral diverges, no number lies above all the areas \(A(t)\), because the theorem would make them converge. They grow without bound, and so does \(S_n\), which is at least \(A(n+1)\). The series diverges.

The series and the integral therefore converge together or diverge together. This result is the integral test. Continuity makes the integrals exist, and the decrease puts each set of rectangles on one side of the curve. Positivity makes the partial sums and the areas increase. For \(f(x)=1/x^2\), which is positive, continuous and decreasing for \(x\ge1\), the integral from 1 to \(\infty\) is \(I=1\) (topic 6.13). Every partial sum of \(\sum 1/n^2\) is therefore less than \(a_1+I=1+1=2\), so this series converges.

The decrease cannot be left out. Add bumps between the whole numbers with the button under Figure 1. The curve still passes through every dot, so the terms and the series do not change. Between the dots it now rises, so it is not decreasing. Teal appears above the rectangles with left ends from \(x=2\) on, so \(S_n\) can be less than the area under the curve. Each bump adds the same area, so the area under the curve grows without bound, and the integral diverges although the series converges.

The integral for a series

The conditions need to hold only from some index on. If \(f\) is positive, continuous and decreasing for \(x\ge N\), the same argument, started at \(N\), compares the tail \(\sum_{n=N}^{\infty}a_n\) with \(\int_N^{\infty}f(x)\,dx\). The terms before \(a_N\) add a fixed amount, and a series converges exactly when its tail does (topic 10.1). The test therefore decides the whole series.

To set up the integral, replace \(n\) by \(x\) in the formula for \(a_n\). Check each condition for large \(x\). The sign of \(f'(x)\) shows where \(f\) decreases (topic 5.3), and the first terms may rise. The integral starts at a whole number \(N\) such that all three conditions hold for \(x\ge N\), often the first index of the series. Do not start it where \(f\) is undefined, because the integral can then diverge there even if the series converges.

The test does not give the sum. If the conditions hold from 1 on, \(S_n\) exceeds the area from 1 to \(n+1\) by the red area, which grows with \(n\). The sum of a convergent series is therefore larger than \(\int_1^{\infty}f(x)\,dx\). For \(\sum 1/n^2\), the first two terms already add to \(\frac54\), more than the integral 1.

How close a partial sum is to the sum

A positive curve that falls toward the x-axis, with the places n, n + 1 and n + 2 marked under the axis. Orange dots mark the heights of the curve at n + 1, n + 2 and so on, the terms after the first n. Rectangles 1 wide stand left of their dots, from x = n on, and lie under the curve, with teal marking the parts of the region above them. A faint bracket with an arrow at its right end marks the region from n to infinity. A button slides every rectangle one unit to the right: the rectangles then stand right of their dots, from x = n + 1 on, and rise above the curve, with red marking their parts above it, and the bracket starts at n + 1.

Figure 2Each faintly shaded rectangle is 1 wide and as tall as an orange dot, one of the terms \(\cy{a_{n+1}}\), \(\cy{a_{n+2}}\), … after the first \(n\). The faint bracket marks a region under the curve. Red marks area of a rectangle above the curve, and teal marks area under the curve that the rectangles miss.

If the series converges to \(S\), the tail after \(n\) terms is \(R_n=S-S_n\), the sum of \(a_{n+1}+a_{n+2}+\cdots\) (topic 10.1). It is the error made when \(S_n\) is used in place of \(S\). Suppose that \(f\) is positive, continuous and decreasing for \(x\ge n\).

In Figure 2, the rectangles have the heights \(\cy{a_{n+1}}\), \(\cy{a_{n+2}}\), …, so their total area is \(R_n\). At first each stands left of its orange dot, so it takes its height at its right end and lies under the curve. The faint bracket marks the region from \(n\) to \(\infty\). Slide the rectangles one unit to the right with the button under Figure 2. Each then stands right of its dot, above the curve, and the rectangles cover the region from \(n+1\) to \(\infty\). For the first \(m-n\) terms of the tail, these are the comparisons of topic 6.2:

\[\begin{aligned}\int_{n+1}^{m+1}f(x)\,dx&\le a_{n+1}+\cdots+a_m\\&\le\int_n^m f(x)\,dx\end{aligned}\]

The series converges, so both integrals to \(\infty\) converge by the integral test. As \(m\to\infty\), the middle approaches \(R_n\), and the inequalities hold in the limit. The tail therefore lies between the integrals of \(f\) from \(n+1\) to \(\infty\) and from \(n\) to \(\infty\). Many books call this the remainder estimate. The upper bound starts at \(n\), one unit before the first index of the tail, and the lower bound starts at that index. Adding \(S_n\) to each bound gives an interval that contains \(S\).

Example 1

Check the integral-test conditions

Verify that the integral test can be applied to the series \(\displaystyle\sum_{n=1}^{\infty}\frac{n}{n^2+3}\).

Solution

The terms are \(a_n=f(n)\) for \(f(x)=\dfrac{x}{x^2+3}\). For \(x\ge1\), the top and the bottom are positive, so \(f\) is positive. The bottom is never 0, so \(f\) is continuous. By the quotient rule,

\[\begin{aligned}f'(x)&=\frac{\left(x^2+3\right)-x\cdot2x}{\left(x^2+3\right)^2}\\&=\frac{3-x^2}{\left(x^2+3\right)^2}\end{aligned}\]

The bottom is positive, so \(f'(x)<0\) exactly when \(x^2>3\), that is, for \(x>\sqrt3\). Because \(\sqrt3<2\), \(f\) is decreasing for \(x\ge2\) (topic 5.3). It increases on \([1,\sqrt3]\), and the terms \(a_1=\frac14\) and \(a_2=\frac27\) rise.

All three conditions hold for \(x\ge2\), so the integral test applies to the tail \(\sum_{n=2}^{\infty}a_n\), with the integral \(\int_2^{\infty}f(x)\,dx\). The tail converges exactly when the whole series does.

Example 3

Use the integral to decide convergence

Use the integral test to determine whether \(\displaystyle\sum_{n=1}^{\infty}n\,e^{-n^2}\) converges or diverges.

Solution

The terms are \(a_n=f(n)\) for \(f(x)=x\,e^{-x^2}\), which is positive and continuous for \(x\ge1\). By the product rule and the chain rule,

\[f'(x)=\left(1-2x^2\right)e^{-x^2}\]

For \(x\ge1\), \(1-2x^2\le-1\), so \(f'(x)<0\), and \(f\) is decreasing. The substitution \(u=x^2\), \(du=2x\,dx\) gives the antiderivative \(-\frac12e^{-x^2}\):

\[\begin{aligned}&\int_1^{\infty}x\,e^{-x^2}\,dx\\&=\lim_{t\to\infty}\left(\frac{1}{2e}-\frac{e^{-t^2}}{2}\right)=\frac{1}{2e}\end{aligned}\]

The limit holds because \(e^{-t^2}\) approaches 0. The integral converges, so the series converges by the integral test.

Example 4

Bound a remaining tail

The series \(\displaystyle\sum_{n=1}^{\infty}\frac{2n}{\left(n^2+1\right)^2}\) converges to a sum \(S\). Use the integral test to find a lower bound and an upper bound for the tail \(R_3=S-S_3\). Then find an interval that contains \(S\).

Solution

The function \(f(x)=\dfrac{2x}{\left(x^2+1\right)^2}\) is positive and continuous for \(x\ge1\). By the quotient rule,

\[f'(x)=\frac{2\left(1-3x^2\right)}{\left(x^2+1\right)^3}\]

which is negative for \(x\ge1\), where \(1-3x^2<0\), so \(f\) is decreasing there. The substitution \(u=x^2+1\), \(du=2x\,dx\) gives the antiderivative \(-\frac{1}{x^2+1}\), so for every \(c\ge1\)

\[\begin{aligned}&\int_c^{\infty}\frac{2x\,dx}{\left(x^2+1\right)^2}\\&=\lim_{t\to\infty}\left(\frac{1}{c^2+1}-\frac{1}{t^2+1}\right)=\frac{1}{c^2+1}\end{aligned}\]

The tail \(R_3\) starts with \(a_4\). Its upper bound is the integral from 3, and its lower bound is the integral from 4:

\[\frac{1}{17}\le R_3\le\frac{1}{10}\]

The first three terms are \(\frac12\), \(\frac{4}{25}\) and \(\frac{3}{50}\), so \(S_3=\frac{18}{25}\). Adding \(S_3\) to each bound gives

\[\frac{331}{425}\le S\le\frac{41}{50}\]

Each example is one of the four skills of topic 10.4 in Which & Why: AP Calculus.