Calculus · Grade 12 and undergraduate

The Integral Test and p-Series

Quick answer

When f is positive, continuous and decreasing, the series of values f(n) and the integral of f from 1 to ∞ either both converge or both diverge: the terms of the series are the areas of rectangles hugging the curve. This settles the p-series: the sum of 1/nᵖ converges exactly when p > 1. The harmonic series, the sum of 1/n, diverges, though its terms shrink to 0. The integral also bounds the error of stopping after n terms.

What you'll learn

  • Apply the integral test and check its conditions
  • Show that the harmonic series diverges
  • Classify p-series as convergent or divergent
  • Bound the error of a partial sum with an integral

A series next to an integral

A series with positive terms converges exactly when its partial sums stay bounded: they only go up, so they either level off or climb forever. To decide which, compare the series with an area you can compute. If an=f(n)a_n = f(n) for a positive, decreasing function ff, each term is the area of a rectangle of width 11 standing at the curve.

The integral test

Suppose ff is positive, continuous and decreasing for x≥1x \ge 1, and an=f(n)a_n = f(n). Then ∑n=1∞an\sum_{n=1}^{\infty} a_n and ∫1∞f(x) dx\int_1^{\infty} f(x)\,dx either both converge or both diverge.

Why the rectangles decide

Stand each rectangle of height ana_n on the interval [n,n+1][n, n + 1]. Since ff is decreasing, its left edge is the tallest point of the curve over that interval, so the rectangles cover the region under the curve:

a1+a2+⋯+an≥∫1n+1f(x) dxa_1 + a_2 + \cdots + a_n \ge \int_1^{n+1} f(x)\,dx
The harmonic series as rectangles over y = 1/x Seven rectangles of width 1, standing on the x-axis from 1 to 8, with heights 1, 1/2, 1/3 and so on down to 1/7. Each rectangle's top left corner touches the curve y = 1/x, so the rectangles cover all the area under the curve from 1 to 8, and a little more. 24681xy
  • y = 1/x
The harmonic series as rectangles over y = 1/x

Shift the rectangles one unit left, onto [n−1,n][n - 1, n], and they fit under the curve instead:

a2+a3+⋯+an≤∫1nf(x) dxa_2 + a_3 + \cdots + a_n \le \int_1^{n} f(x)\,dx
The series of 1/n² as rectangles under y = 1/x² Seven rectangles of width 1, standing on the x-axis from 1 to 8, with heights 1/4, 1/9, 1/16 and so on down to 1/64. Each rectangle's top right corner touches the curve y = 1/x², so all the rectangles lie under the curve. 24681xy
  • y = 1/x²
The series of 1/n² as rectangles under y = 1/x²

If the integral is infinite, the first inequality drags the partial sums up without bound. If it is finite, the second keeps them below a1+∫1∞f(x) dxa_1 + \int_1^{\infty} f(x)\,dx. The series and the integral measure nearly the same area, so they are finite together or infinite together.

p-series

The integral test settles a whole family at once, because the pp-integrals are already known.

p-series

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

For p≤0p \le 0 the terms do not even approach 00. For p>0p > 0, 1xp\tfrac{1}{x^p} is positive and decreasing, and ∫1∞dxxp\int_1^{\infty} \tfrac{dx}{x^p} converges exactly when p>1p > 1.

Estimating the remainder

The same rectangles bound the error of stopping early. If the series passes the integral test, the part left out after nn terms satisfies

S−Sn=an+1+an+2+⋯≤∫n∞f(x) dxS - S_n = a_{n+1} + a_{n+2} + \cdots \le \int_n^{\infty} f(x)\,dx

Worked examples

Common mistakes

Practice problems

  1. Does ∑n=1∞1n3\displaystyle\sum_{n=1}^{\infty} \frac{1}{n^3} converge?

    Answer

    Yes

    Full solution

    It is a pp-series with p=3>1p = 3 > 1.

  2. Does ∑n=1∞1n0.9\displaystyle\sum_{n=1}^{\infty} \frac{1}{n^{0.9}} converge?

    Answer

    No

    Full solution

    It is a pp-series with p=0.9≤1p = 0.9 \le 1.

  3. Does ∑n=1∞1n3\displaystyle\sum_{n=1}^{\infty} \frac{1}{\sqrt{n^3}} converge?

    Answer

    Yes

    Full solution

    n3=n3/2\sqrt{n^3} = n^{3/2}, so p=32>1p = \tfrac{3}{2} > 1.

  4. Does ∑n=1∞1n+1\displaystyle\sum_{n=1}^{\infty} \frac{1}{n + 1} converge?

    Answer

    No

    Full solution

    It is the harmonic series without its first term: 12+13+⋯\tfrac{1}{2} + \tfrac{1}{3} + \cdots. Dropping one term does not change divergence. The integral test gives ∫1∞dxx+1=∞\int_1^{\infty} \tfrac{dx}{x + 1} = \infty as well.

  5. Use the integral test on ∑n=1∞1n2+1\displaystyle\sum_{n=1}^{\infty} \frac{1}{n^2 + 1}.

    Answer

    It converges.

    Full solution

    1x2+1\tfrac{1}{x^2 + 1} is positive and decreasing for x≥1x \ge 1, and ∫1∞dxx2+1=π2−π4=π4\int_1^{\infty} \tfrac{dx}{x^2 + 1} = \tfrac{\pi}{2} - \tfrac{\pi}{4} = \tfrac{\pi}{4} is finite.

  6. Use the integral test on ∑n=1∞ln⁡nn\displaystyle\sum_{n=1}^{\infty} \frac{\ln n}{n}.

    Answer

    It diverges.

    Full solution

    ln⁡xx\tfrac{\ln x}{x} is positive and decreasing for x≥3x \ge 3, and ∫3bln⁡xx dx=(ln⁡b)22−(ln⁡3)22\int_3^{b} \tfrac{\ln x}{x}\,dx = \tfrac{(\ln b)^2}{2} - \tfrac{(\ln 3)^2}{2} grows without bound. The first two terms do not affect convergence.

  7. Use the integral test on ∑n=2∞1n(ln⁡n)2\displaystyle\sum_{n=2}^{\infty} \frac{1}{n(\ln n)^2}.

    Answer

    It converges.

    Full solution

    With u=ln⁡xu = \ln x, ∫2∞dxx(ln⁡x)2=[−1ln⁡x]2∞=1ln⁡2\int_2^{\infty} \tfrac{dx}{x(\ln x)^2} = \left[-\tfrac{1}{\ln x}\right]_2^{\infty} = \tfrac{1}{\ln 2}, which is finite.

  8. Bound the error in S5S_5 for ∑1n3\sum \tfrac{1}{n^3}.

    Answer

    At most 0.020.02

    Full solution

    ∫5∞dxx3=12⋅52=0.02\int_5^{\infty} \tfrac{dx}{x^3} = \tfrac{1}{2 \cdot 5^2} = 0.02.

  9. For which pp does ∑n=1∞1n2p\displaystyle\sum_{n=1}^{\infty} \frac{1}{n^{2p}} converge?

    Answer

    For p>12p > \tfrac{1}{2}

    Full solution

    It is a pp-series with exponent 2p2p, which must exceed 11.

  10. A student concludes that ∑n=1∞1n2=∫1∞dxx2=1\displaystyle\sum_{n=1}^{\infty} \frac{1}{n^2} = \int_1^{\infty} \frac{dx}{x^2} = 1. What went wrong?

    Hint

    The first term of the series alone is 11.

    Answer

    The integral test compares convergence, not values. The sum is π26≈1.645\tfrac{\pi^2}{6} \approx 1.645.

    Full solution

    All the terms are positive and the first is 11, so the sum is more than 11. The integral is the area under the curve; the series is the area of rectangles that stick out above it, as in the first graph.

Frequently asked questions

What does the integral test say?

If f is positive, continuous and decreasing and aₙ = f(n), then the series of aₙ and the integral of f from 1 to ∞ both converge or both diverge.

When does a p-series converge?

The sum of 1/nᵖ converges when p > 1 and diverges when p ≤ 1.

Does the harmonic series converge?

No. Its partial sums grow like ln n: slowly, but without bound.

Is the sum of the series equal to the integral?

No. The test compares whether they are finite, not their values. The sum of 1/n² is π²/6 ≈ 1.645, while the integral of 1/x² from 1 to ∞ is 1.

How accurate is a partial sum?

For a series that passes the integral test, the error after n terms is at most the integral of f from n to ∞.

What to learn next