The Integral Test

A series and an integral get stacked together and share one fate. The bars wrap the curve from above and below.

Stand bars under a decreasing curve, and the sum traps the integral from both sides. So the series and the integral converge or diverge together. An exponent above 1 gives convergence; anything else diverges. That fork decides the fate of every p-series.

For example, stack πŸ“š books like steps against a ramp. The steps dip below the ramp's curve and poke above it. Still, the steps' area and the area under the curve are finite together or endless together.

∫1N+1fβ‰€βˆ‘n=1Nf(n)≀f(1)+∫1N+1f\int_1^{N+1} f \le \sum_{n=1}^{N} f(n) \le f(1) + \int_1^{N+1} f
βˆ‘1npΒ convergesβ€…β€ŠβŸΊβ€…β€Šp>1\sum \frac{1}{n^p} \text{ converges} \iff p > 1

Examples & Exercises

Prove the integral test completely: if ff is positive and decreasing on [1,∞)[1,\infty), then on each [n,n+1][n,n+1] we have f(n+1)β‰€βˆ«nn+1f≀f(n)f(n+1) \le \int_n^{n+1} f \le f(n); summing gives ∫1N+1fβ‰€βˆ‘n=1Nf(n)≀f(1)+∫1N+1f\int_1^{N+1} f \le \sum_{n=1}^{N} f(n) \le f(1) + \int_1^{N+1} f, so βˆ‘f(n)\sum f(n) converges iff ∫1∞f\int_1^{\infty} f converges.

f(n+1)β‰€βˆ«nn+1f≀f(n)(fΒ decreasing)f(n+1) \le \int_n^{n+1} f \le f(n) \qquad (f \text{ decreasing})
∫1N+1fβ‰€βˆ‘n=1Nf(n)≀f(1)+∫1N+1f\int_1^{N+1} f \le \sum_{n=1}^{N} f(n) \le f(1) + \int_1^{N+1} f
p=2,N=12p = 2, N = 12: ∫113xβˆ’2 dx=12/13β‰ˆ0.9231β‰€βˆ‘k=112kβˆ’2β‰ˆ1.5650≀1+0.9231\int_1^{13} x^{-2}\,dx = 12/13 \approx 0.9231 \le \sum_{k=1}^{12} k^{-2} \approx 1.5650 \le 1 + 0.9231 β€” the sandwich, numerically.
Show proof
  1. First, the integrals exist: a monotone function on [a,b][a, b] is Riemann integrable (standard theorem), so the decreasing ff is integrable on every [n,n+1][n, n+1] and every ∫nn+1f\int_n^{n+1} f exists.

    Since ff is decreasing, f(n+1)≀f(x)≀f(n)f(n+1) \le f(x) \le f(n) for x∈[n,n+1]x \in [n, n+1].

    Integrating over [n,n+1][n,n+1] (length 11) gives f(n+1)β‰€βˆ«nn+1f≀f(n)f(n+1) \le \int_n^{n+1} f \le f(n) by monotonicity of the integral.

  2. Sum over n=1,…,Nn = 1, \ldots, N.

    The left inequalities sum to βˆ‘n=1Nf(n+1)=βˆ‘k=2N+1f(k)β‰€βˆ«1N+1f\sum_{n=1}^{N} f(n+1) = \sum_{k=2}^{N+1} f(k) \le \int_1^{N+1} f; the right ones to ∫1N+1fβ‰€βˆ‘n=1Nf(n)\int_1^{N+1} f \le \sum_{n=1}^{N} f(n).

    With SN=βˆ‘n=1Nf(n)S_N = \sum_{n=1}^{N} f(n), the correct identity is βˆ‘k=2N+1f(k)=SN+1βˆ’f(1)=SNβˆ’f(1)+f(N+1)\sum_{k=2}^{N+1} f(k) = S_{N+1} - f(1) = S_N - f(1) + f(N+1).

    Hence the left side gives SN+1βˆ’f(1)β‰€βˆ«1N+1fS_{N+1} - f(1) \le \int_1^{N+1} f, i.e. SN+1≀f(1)+∫1N+1fS_{N+1} \le f(1) + \int_1^{N+1} f, and since f>0f > 0, SN≀SN+1S_N \le S_{N+1}, so SN≀f(1)+∫1N+1fS_N \le f(1) + \int_1^{N+1} f as well.

    Chaining with the right side gives ∫1N+1fβ‰€βˆ‘n=1Nf(n)≀f(1)+∫1N+1f\int_1^{N+1} f \le \sum_{n=1}^{N} f(n) \le f(1) + \int_1^{N+1} f.

  3. (⇐)(\Leftarrow) If ∫1∞f\int_1^{\infty} f converges (i.e. ∫1Rf\int_1^{R} f has a finite limit as Rβ†’βˆžR \to \infty), then the partial sums βˆ‘n=1Nf(n)\sum_{n=1}^{N} f(n) are bounded above by f(1)+∫1∞ff(1) + \int_1^{\infty} f and, the terms being nonnegative, converge by the monotone convergence theorem.

  4. (β‡’)(\Rightarrow) By contraposition: if ∫1∞f\int_1^{\infty} f diverges (to +∞+\infty, the integrand being positive), then βˆ‘n=1Nf(n)β‰₯∫1N+1fβ†’βˆž\sum_{n=1}^{N} f(n) \ge \int_1^{N+1} f \to \infty, so the series diverges too.

    Hence βˆ‘f(n)\sum f(n) converges β€…β€ŠβŸΊβ€…β€Š\iff ∫1∞f\int_1^{\infty} f converges.

    QED.

Prove the pp-series βˆ‘n=1∞nβˆ’p\sum_{n=1}^{\infty} n^{-p} converges for p>1p > 1 and diverges for p≀1p \le 1, completely: compute ∫1Rxβˆ’p dx\int_1^{R} x^{-p}\,dx directly (p=1p = 1 gives ln⁑R\ln R) and apply the integral test.

∫1Rxβˆ’p dx={ln⁑Rp=1R1βˆ’pβˆ’11βˆ’ppβ‰ 1\int_1^{R} x^{-p}\,dx = \begin{cases} \ln R & p = 1 \\ \dfrac{R^{1-p} - 1}{1-p} & p \ne 1 \end{cases}
βˆ‘n=1∞nβˆ’pΒ convergesΒ β€…β€ŠβŸΊβ€…β€Šp>1\sum_{n=1}^{\infty} n^{-p} \text{ converges } \iff p > 1
p=1,N=12p = 1, N = 12: the harmonic partial sum H12β‰ˆ3.1032H_{12} \approx 3.1032 keeps growing like ln⁑\ln, and ∫113dxx=ln⁑13β‰ˆ2.5649\int_1^{13} \frac{dx}{x} = \ln 13 \approx 2.5649 β€” both diverge.
Show proof
  1. First, p≀0p \le 0: nβˆ’pβ‰₯1n^{-p} \ge 1, so the general term does not tend to 00 and the series diverges by the term test (on this range f(x)=xβˆ’pf(x) = x^{-p} is increasing, so the integral test does not apply).

    Now assume p>0p > 0; then f(x)=xβˆ’pf(x) = x^{-p} is positive and decreasing on [1,∞)[1,\infty), so the integral test applies.

    Compute: for p=1p = 1, ∫1Rxβˆ’1 dx=ln⁑R\int_1^{R} x^{-1}\,dx = \ln R; for pβ‰ 1p \ne 1, ∫1Rxβˆ’p dx=[x1βˆ’p1βˆ’p]1R=R1βˆ’pβˆ’11βˆ’p\int_1^{R} x^{-p}\,dx = \left[\frac{x^{1-p}}{1-p}\right]_1^{R} = \frac{R^{1-p} - 1}{1-p}.

  2. p>1p > 1: 1βˆ’p<01 - p < 0, so R1βˆ’pβ†’0R^{1-p} \to 0 as Rβ†’βˆžR \to \infty. Hence ∫1∞xβˆ’p dx=1pβˆ’1<∞\int_1^{\infty} x^{-p}\,dx = \frac{1}{p-1} < \infty β€” the integral converges, so by the integral test βˆ‘nβˆ’p\sum n^{-p} converges.

  3. p=1p = 1: ln⁑Rβ†’βˆž\ln R \to \infty, so the integral diverges, and hence the harmonic series βˆ‘1/n\sum 1/n diverges. 0<p<10 < p < 1: 1βˆ’p>01 - p > 0, so R1βˆ’pβˆ’11βˆ’pβ†’βˆž\frac{R^{1-p}-1}{1-p} \to \infty β€” the integral diverges and, by the integral test, so does the series (the case p≀0p \le 0 was handled by the term test in step 1).

  4. In summary: βˆ‘nβˆ’p\sum n^{-p} converges β€…β€ŠβŸΊβ€…β€Š\iff ∫1∞xβˆ’p dx<∞\int_1^{\infty} x^{-p}\,dx < \infty β€…β€ŠβŸΊβ€…β€Š\iff p>1p > 1. QED.

Prove the remainder estimate completely: if ff is positive, decreasing, and βˆ‘f(n)\sum f(n) converges, the tail RN=βˆ‘n>Nf(n)R_N = \sum_{n>N} f(n) satisfies ∫N+1∞f≀RNβ‰€βˆ«N∞f\int_{N+1}^{\infty} f \le R_N \le \int_{N}^{\infty} f.

Numerically: trap the N=10N = 10 tail of βˆ‘1/n2\sum 1/n^2 between 1/11β‰ˆ0.09091/11 \approx 0.0909 and 1/10=0.11/10 = 0.1.

∫N+1∞f≀RN=βˆ‘n>Nf(n)β‰€βˆ«N∞f\int_{N+1}^{\infty} f \le R_N = \sum_{n>N} f(n) \le \int_{N}^{\infty} f
111β‰ˆ0.0909≀R10 ⁣(βˆ‘1n2)≀0.1=110\frac{1}{11} \approx 0.0909 \le R_{10}\!\left(\sum \tfrac{1}{n^2}\right) \le 0.1 = \frac{1}{10}
p=2,N=10p = 2, N = 10: the tail R10R_{10} lies between ∫11∞xβˆ’2 dx=1/11β‰ˆ0.0909\int_{11}^{\infty} x^{-2}\,dx = 1/11 \approx 0.0909 and ∫10∞xβˆ’2 dx=1/10=0.1\int_{10}^{\infty} x^{-2}\,dx = 1/10 = 0.1 (true value β‰ˆ0.09517\approx 0.09517).
Show proof
  1. Sum the basic inequality f(n+1)β‰€βˆ«nn+1f≀f(n)f(n+1) \le \int_n^{n+1} f \le f(n) (first problem) over n=N+1,…,Mn = N+1, \ldots, M.

    Left: βˆ‘n=N+1Mf(n+1)=βˆ‘k=N+2M+1f(k)β‰€βˆ«N+1M+1f\sum_{n=N+1}^{M} f(n+1) = \sum_{k=N+2}^{M+1} f(k) \le \int_{N+1}^{M+1} f.

    Right: ∫N+1M+1fβ‰€βˆ‘n=N+1Mf(n)\int_{N+1}^{M+1} f \le \sum_{n=N+1}^{M} f(n).

  2. A shifted version of the right inequality: the basic inequality on [nβˆ’1,n][n-1,n] reads f(n)β‰€βˆ«nβˆ’1nff(n) \le \int_{n-1}^{n} f, so summing over n=N+1,…,Mn = N+1,\ldots,M gives βˆ‘n=N+1Mf(n)β‰€βˆ«NMf\sum_{n=N+1}^{M} f(n) \le \int_{N}^{M} f.

  3. Let Mβ†’βˆžM \to \infty.

    Since the series converges, βˆ‘n=N+1Mf(n)β†’RN\sum_{n=N+1}^{M} f(n) \to R_N (finite), and by the integral test the improper integrals converge too, so ∫N+1M+1fβ†’βˆ«N+1∞f\int_{N+1}^{M+1} f \to \int_{N+1}^{\infty} f and ∫NMfβ†’βˆ«N∞f\int_{N}^{M} f \to \int_{N}^{\infty} f.

    Passing to the limit preserves the inequalities: ∫N+1∞f≀RNβ‰€βˆ«N∞f\int_{N+1}^{\infty} f \le R_N \le \int_{N}^{\infty} f.

    QED.

  4. Numerical application: f(x)=xβˆ’2f(x) = x^{-2}, N=10N = 10.

    ∫11∞xβˆ’2 dx=[βˆ’xβˆ’1]11∞=111β‰ˆ0.0909\int_{11}^{\infty} x^{-2}\,dx = \left[-x^{-1}\right]_{11}^{\infty} = \frac{1}{11} \approx 0.0909 and ∫10∞xβˆ’2 dx=110=0.1\int_{10}^{\infty} x^{-2}\,dx = \frac{1}{10} = 0.1, so 111≀R10≀110\frac{1}{11} \le R_{10} \le \frac{1}{10}.

    Indeed R10=Ο€26βˆ’βˆ‘k=1101k2β‰ˆ0.09517R_{10} = \frac{\pi^2}{6} - \sum_{k=1}^{10}\frac{1}{k^2} \approx 0.09517 lands inside the interval.

7. Series