In mathematics, the comparison test, sometimes called the direct comparison test to distinguish it from similar related tests (especially the limit comparison test), provides a way of deducing the convergence or divergence of an infinite series or an improper integral. In both cases, the test works by comparing the given series or integral to one whose convergence properties are known.
In calculus, the comparison test for series typically consists of a pair of statements about infinite series with non-negative (real-valued) terms:
If the infinite series converges and for all sufficiently large n (that is, for all for some fixed value N), then the infinite series also converges.
If the infinite series diverges and for all sufficiently large n, then the infinite series also diverges.
Note that the series having larger terms is sometimes said to dominate (or eventually dominate) the series with smaller terms.
Since converges absolutely, for some real number T. For all n,
is a nondecreasing sequence and is nonincreasing.
Given then both belong to the interval , whose length decreases to zero as goes to infinity.
This shows that is a Cauchy sequence, and so must converge to a limit. Therefore, is absolutely convergent.
The comparison test for integrals may be stated as follows, assuming continuous real-valued functions f and g on with b either or a real number at which f and g each have a vertical asymptote:
If the improper integral converges and for , then the improper integral also converges with
If the improper integral diverges and for , then the improper integral also diverges.
Ratio comparison test
Another test for convergence of real-valued series, similar to both the direct comparison test above and the ratio test, is called the ratio comparison test:
If the infinite series converges and , , and for all sufficiently large n, then the infinite series also converges.
If the infinite series diverges and , , and for all sufficiently large n, then the infinite series also diverges.