The Integral Test

For a decreasing positive function the rectangles lock above and below the curve: ∫1N+1f≤∑1Nf(n)≤f(1)+∫1N+1f\int_1^{N+1} f \le \sum_1^N f(n) \le f(1) + \int_1^{N+1} f — series and improper integral share one fate. Move pp to see the p-series fork.

∫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. 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). Chaining gives ∑k=2N+1f(k)≤∫1N+1f≤∑n=1Nf(n)\sum_{k=2}^{N+1} f(k) \le \int_1^{N+1} f \le \sum_{n=1}^{N} f(n), and since ∑k=2N+1f(k)=∑n=1Nf(n)−f(1)\sum_{k=2}^{N+1} f(k) = \sum_{n=1}^{N} f(n) - f(1), we get ∫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. 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. Conversely, 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. 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. p<1p < 1: 1−p>01 - p > 0, so R1−p−11−p→∞\frac{R^{1-p}-1}{1-p} \to \infty — the integral diverges and so does the series.
  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.

6. Series