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 AugustinLouis Cauchy and is sometimes known as the Maclaurin–Cauchy 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
converges to a real number if and only if the improper integral
is finite. In particular, if the integral diverges, then the series diverges as well.
If the improper integral is finite, then the proof also gives the lower and upper bounds

(1) 
for the infinite series.
Note that if the function is increasing, then the function is decreasing and the above theorem applies.
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 is continuous almost everywhere. To show this, let . For every , there exists by the density of a so that . Note that this set contains an open nonempty interval precisely if is discontinuous at . We can uniquely identify as the rational number that has the least index in an enumeration and satisfies the above property. Since is monotone, this defines an injective mapping and thus is countable. It follows that is continuous almost everywhere. This is sufficient for Riemann integrability.^{[1]}
Since f is a monotone decreasing function, we know that
and
Hence, for every integer n ≥ N,

(2) 
and, for every integer n ≥ N + 1,

(3) 
By summation over all n from N to some larger integer M, we get from (2)
and from (3)
Combining these two estimates yields
Letting M tend to infinity, the bounds in (1) and the result follow.
The harmonic series
diverges because, using the natural logarithm, its antiderivative, and the fundamental theorem of calculus, we get
On the other hand, the series
(cf. Riemann zeta function) converges for every ε > 0, because by the power rule
From (1) we get the upper estimate
which can be compared with some of the particular values of Riemann zeta function.
The above examples involving the harmonic series raise the question, whether there are monotone sequences such that f(n) decreases to 0 faster than 1/n but slower than 1/n^{1+ε} in the sense that
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

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

(5) 
converges for every ε > 0. Here ln_{k} denotes the kfold composition of the natural logarithm defined recursively by
Furthermore, N_{k} denotes the smallest natural number such that the kfold composition is welldefined and ln_{k}(N_{k}) ≥ 1, i.e.
using tetration or Knuth's uparrow notation.
To see the divergence of the series (4) using the integral test, note that by repeated application of the chain rule
hence
To see the convergence of the series (5), note that by the power rule, the chain rule and the above result
hence