information:extraction
Integral test

It is possible to prove that the harmonic series diverges by comparing its sum with an improper integral. Specifically, consider the arrangement of rectangles shown in the figure to the right. Each rectangle is 1 unit wide and 1 n {\displaystyle {\tfrac {1}{n}}} units high, so if the harmonic series converged then the total area of the rectangles would be the sum of the harmonic series. The curve y = 1 x {\displaystyle y={\tfrac {1}{x}}} stays entirely below the upper boundary of the rectangles, so the area under the curve (in the range of x {\displaystyle x} from one to infinity that is covered by rectangles) would be less than the area of the union of the rectangles. However, the area under the curve is given by a divergent improper integral, ∫ 1 ∞ 1 x d x = ∞. {\displaystyle \int _{1}^{\infty }{\frac {1}{x}}\,dx=\infty.} Because this integral does not converge, the sum cannot converge either.

In the figure to the right, shifting each rectangle to the left by 1 unit, would produce a sequence of rectangles whose boundary lies below the curve rather than above it.This shows that the partial sums of the harmonic series differ from the integral by an amount that is bounded above and below by the unit area of the first rectangle: ∫ 1 N + 1 1 x d x < ∑ i = 1 N 1 i < ∫ 1 N 1 x d x + 1. {\displaystyle \int _{1}^{N+1}{\frac {1}{x}}\,dx<\sum _{i=1}^{N}{\frac {1}{i}}<\int _{1}^{N}{\frac {1}{x}}\,dx+1.} Generalizing this argument, any infinite sum of values of a monotone decreasing positive function of n {\displaystyle n} (like the harmonic series) has partial sums that are within a bounded distance of the values of the corresponding integrals. Therefore, the sum converges if and only if the integral over the same range of the same function converges. When this equivalence is used to check the convergence of a sum by replacing it with an easier integral, it is known as the integral test for convergence.