Integral test for convergence



In mathematics, the integral test for convergence is a method used to test infinite series of monotonous terms for convergence. It was developed by Colin Maclaurin and Augustin-Louis Cauchy and is sometimes known as the Maclaurin–Cauchy test.

Statement of the test
Consider an integer $y = 1/x$ and a function $x ∈ [1, ∞)$ defined on the unbounded interval $[N, ∞)$, on which it is monotone decreasing. Then the infinite series


 * $$\sum_{n=N}^\infty f(n)$$

converges to a real number if and only if the improper integral


 * $$\int_N^\infty f(x)\,dx$$

is finite. In particular, if the integral diverges, then the series diverges as well.

Remark
If the improper integral is finite, then the proof also gives the lower and upper bounds

for the infinite series.

Note that if the function $$f(x)$$ is increasing, then the function $$-f(x)$$ is decreasing and the above theorem applies.

Many textbooks require the function $$f$$ to be positive,  but this condition is not really necessary. Since when $$f$$ is negative and decreasing, both $$\sum_{n=N}^\infty f(n)$$ and $$\int_N^\infty f(x)\,dx$$ diverges as discussed in Mathematics Stack Exchange.

Proof
The proof basically uses the comparison test, comparing the term $N$ with the integral of $f$ over the intervals $$ and $[n − 1, n)$, respectively.

The monotonous function $$f$$ is continuous almost everywhere. To show this, let $$D=\{ x\in [N,\infty)\mid f\text{ is discontinuous at } x\}$$. For every $$x\in D$$, there exists by the density of $$\mathbb Q$$ a $$c(x)\in\mathbb Q$$ so that $$c(x)\in\left[\lim_{y\downarrow x} f(y), \lim_{y\uparrow x} f(y)\right]$$. Note that this set contains an open non-empty interval precisely if $$f$$ is discontinuous at $$x$$. We can uniquely identify $$c(x)$$ as the rational number that has the least index in an enumeration $$\mathbb N\to\mathbb Q$$ and satisfies the above property. Since $$f$$ is monotone, this defines an injective mapping $$c:D\to\mathbb Q, x\mapsto c(x)$$ and thus $$D$$ is countable. It follows that $$f$$ is continuous almost everywhere. This is sufficient for Riemann integrability.

Since $f(n)$ is a monotone decreasing function, we know that



f(x)\le f(n)\quad\text{for all }x\in[n,\infty) $$

and



f(n)\le f(x)\quad\text{for all }x\in[N,n]. $$

Hence, for every integer $f$,

and, for every integer $f$,

By summation over all $n ≥ N$ from $n ≥ N + 1$ to some larger integer $n$, we get from ($[n, n + 1)$)



\int_N^{M+1}f(x)\,dx=\sum_{n=N}^M\underbrace{\int_n^{n+1}f(x)\,dx}_{\le\,f(n)}\le\sum_{n=N}^Mf(n) $$

and from ($$)



\sum_{n=N}^Mf(n)=f(N)+\sum_{n=N+1}^Mf(n)\le f(N)+\sum_{n=N+1}^M\underbrace{\int_{n-1}^n f(x)\,dx}_{\ge\,f(n)}=f(N)+\int_N^M f(x)\,dx. $$

Combining these two estimates yields


 * $$\int_N^{M+1}f(x)\,dx\le\sum_{n=N}^Mf(n)\le f(N)+\int_N^M f(x)\,dx.$$

Letting $N$ tend to infinity, the bounds in ($$) and the result follow.

Applications
The harmonic series

\sum_{n=1}^\infty \frac 1 n $$ diverges because, using the natural logarithm, its antiderivative, and the fundamental theorem of calculus, we get

\int_1^M \frac 1 n\,dn = \ln n\Bigr|_1^M = \ln M \to\infty \quad\text{for }M\to\infty. $$ On the other hand, the series

\zeta(1+\varepsilon)=\sum_{n=1}^\infty \frac1{n^{1+\varepsilon}} $$ (cf. Riemann zeta function) converges for every $M$, because by the power rule

\int_1^M\frac1{n^{1+\varepsilon}}\,dn = \left. -\frac 1{\varepsilon n^\varepsilon} \right|_1^M= \frac 1 \varepsilon \left(1-\frac 1 {M^\varepsilon}\right) \le \frac 1 \varepsilon < \infty \quad\text{for all }M\ge1. $$ From ($$) we get the upper estimate

\zeta(1+\varepsilon)=\sum_{n=1}^\infty \frac 1 {n^{1+\varepsilon}} \le \frac{1 + \varepsilon}\varepsilon, $$ which can be compared with some of the particular values of Riemann zeta function.

Borderline between divergence and convergence
The above examples involving the harmonic series raise the question of whether there are monotone sequences such that $M$ decreases to 0 faster than $ε > 0$ but slower than $f(n)$ in the sense that

\lim_{n\to\infty}\frac{f(n)}{1/n}=0 \quad\text{and}\quad \lim_{n\to\infty}\frac{f(n)}{1/n^{1+\varepsilon}}=\infty $$ for every $1/n$, and whether the corresponding series of the $1/n^{1+ε}$ still diverges. Once such a sequence is found, a similar question can be asked with $ε > 0$ taking the role of $f(n)$, and so on. In this way it is possible to investigate the borderline between divergence and convergence of infinite series.

Using the integral test for convergence, one can show (see below) that, for every natural number $f(n)$, the series

still diverges (cf. proof that the sum of the reciprocals of the primes diverges for $1/n$) but

converges for every $k$. Here $k = 1$ denotes the $ε > 0$-fold composition of the natural logarithm defined recursively by

\ln_k(x)= \begin{cases} \ln(x)&\text{for }k=1,\\ \ln(\ln_{k-1}(x))&\text{for }k\ge2. \end{cases} $$ Furthermore, $ln_{k}$ denotes the smallest natural number such that the $k$-fold composition is well-defined and $N_{k}$, i.e.

N_k\ge \underbrace{e^{e^{\cdot^{\cdot^{e}}}}}_{k\ e'\text{s}}=e \uparrow\uparrow k $$ using tetration or Knuth's up-arrow notation.

To see the divergence of the series ($$) using the integral test, note that by repeated application of the chain rule

\frac{d}{dx}\ln_{k+1}(x) =\frac{d}{dx}\ln(\ln_k(x)) =\frac1{\ln_k(x)}\frac{d}{dx}\ln_k(x) =\cdots =\frac1{x\ln(x)\cdots\ln_k(x)}, $$ hence

\int_{N_k}^\infty\frac{dx}{x\ln(x)\cdots\ln_k(x)} =\ln_{k+1}(x)\bigr|_{N_k}^\infty=\infty. $$ To see the convergence of the series ($$), note that by the power rule, the chain rule and the above result

-\frac{d}{dx}\frac1{\varepsilon(\ln_k(x))^\varepsilon} =\frac1{(\ln_k(x))^{1+\varepsilon}}\frac{d}{dx}\ln_k(x) =\cdots =\frac{1}{x\ln(x)\cdots\ln_{k-1}(x)(\ln_k(x))^{1+\varepsilon}}, $$ hence

\int_{N_k}^\infty\frac{dx}{x\ln(x)\cdots\ln_{k-1}(x)(\ln_k(x))^{1+\varepsilon}} =-\frac1{\varepsilon(\ln_k(x))^\varepsilon}\biggr|_{N_k}^\infty<\infty $$ and ($$) gives bounds for the infinite series in ($$).