# Integral test for convergence The integral test applied to the harmonic series. Since the area under the curve y = 1/x for x ∈ [1, ∞) is infinite, the total area of the rectangles must be infinite as well.

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 N and a function f 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

$\int _{N}^{\infty }f(x)\,dx\leq \sum _{n=N}^{\infty }f(n)\leq f(N)+\int _{N}^{\infty }f(x)\,dx$ (1)

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.

## Proof

The proof basically uses the comparison test, comparing the term f(n) with the integral of f over the intervals [n − 1, n) and [n, n + 1), 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 is a monotone decreasing function, we know that

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

$f(n)\leq f(x)\quad {\text{for all }}x\in [N,n].$ Hence, for every integer nN,

$\int _{n}^{n+1}f(x)\,dx\leq \int _{n}^{n+1}f(n)\,dx=f(n)$ (2)

and, for every integer nN + 1,

$f(n)=\int _{n-1}^{n}f(n)\,dx\leq \int _{n-1}^{n}f(x)\,dx.$ (3)

By summation over all n from N to some larger integer M, we get from (2)

$\int _{N}^{M+1}f(x)\,dx=\sum _{n=N}^{M}\underbrace {\int _{n}^{n+1}f(x)\,dx} _{\leq \,f(n)}\leq \sum _{n=N}^{M}f(n)$ and from (3)

$\sum _{n=N}^{M}f(n)=f(N)+\sum _{n=N+1}^{M}f(n)\leq f(N)+\sum _{n=N+1}^{M}\underbrace {\int _{n-1}^{n}f(x)\,dx} _{\geq \,f(n)}=f(N)+\int _{N}^{M}f(x)\,dx.$ Combining these two estimates yields

$\int _{N}^{M+1}f(x)\,dx\leq \sum _{n=N}^{M}f(n)\leq f(N)+\int _{N}^{M}f(x)\,dx.$ Letting M tend to infinity, the bounds in (1) and the result follow.

## Applications

$\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 }{\frac {1}{n^{1+\varepsilon }}}$ (cf. Riemann zeta function) converges for every ε > 0, because by the power rule

$\int _{1}^{M}{\frac {1}{n^{1+\varepsilon }}}\,dn=\left.-{\frac {1}{\varepsilon n^{\varepsilon }}}\right|_{1}^{M}={\frac {1}{\varepsilon }}\left(1-{\frac {1}{M^{\varepsilon }}}\right)\leq {\frac {1}{\varepsilon }}<\infty \quad {\text{for all }}M\geq 1.$ From (1) we get the upper estimate

$\zeta (1+\varepsilon )=\sum _{x=1}^{\infty }{\frac {1}{n^{1+\varepsilon }}}\leq {\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 f(n) decreases to 0 faster than 1/n but slower than 1/n1+ε 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 ε > 0, and whether the corresponding series of the f(n) still diverges. Once such a sequence is found, a similar question can be asked with f(n) taking the role of 1/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 k, the series

$\sum _{n=N_{k}}^{\infty }{\frac {1}{n\ln(n)\ln _{2}(n)\cdots \ln _{k-1}(n)\ln _{k}(n)}}$ (4)

still diverges (cf. proof that the sum of the reciprocals of the primes diverges for k = 1) but

$\sum _{n=N_{k}}^{\infty }{\frac {1}{n\ln(n)\ln _{2}(n)\cdots \ln _{k-1}(n)(\ln _{k}(n))^{1+\varepsilon }}}$ (5)

converges for every ε > 0. Here lnk denotes the k-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\geq 2.\end{cases}}$ Furthermore, Nk denotes the smallest natural number such that the k-fold composition is well-defined and lnk(Nk) ≥ 1, i.e.

$N_{k}\geq \underbrace {e^{e^{\cdot ^{\cdot ^{e}}}}} _{k\ e'{\text{s}}}=e\uparrow \uparrow k$ To see the divergence of the series (4) 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))={\frac {1}{\ln _{k}(x)}}{\frac {d}{dx}}\ln _{k}(x)=\cdots ={\frac {1}{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 (5), note that by the power rule, the chain rule and the above result

$-{\frac {d}{dx}}{\frac {1}{\varepsilon (\ln _{k}(x))^{\varepsilon }}}={\frac {1}{(\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 }}}=-{\frac {1}{\varepsilon (\ln _{k}(x))^{\varepsilon }}}{\biggr |}_{N_{k}}^{\infty }<\infty$ and (1) gives bounds for the infinite series in (5).