# Direct comparison test

Part of a series of articles about :
Calculus :
$\int _{a}^{b}f'(t)\,dt=f(b)-f(a)$ :
Fundamental theorem
Limits
Continuity
Rolle's theorem
Mean value theorem
Inverse function theorem :
Differential
Definitions
Derivative (generalizations)
Differential
infinitesimal
of a function
total
Concepts
Differentiation notation
Second derivative
Implicit differentiation
Logarithmic differentiation
Related rates
Taylor's theorem
Rules and identities
Sum
Product
Chain
Power
Quotient
L'Hôpital's rule
Inverse
General Leibniz
Faà di Bruno's formula
Reynolds :
Integral
Lists of integrals
Integral transform
Leibniz integral rule
Definitions
Antiderivative
Integral (improper)
Riemann integral
Lebesgue integration
Contour integration
Integral of inverse functions
Integration by
Parts
Discs
Cylindrical shells
Substitution (trigonometric, tangent half-angle, Euler)
Euler's formula
Partial fractions (Heaviside's method)
Changing order
Reduction formulae
Differentiating under the integral sign
Risch algorithm :
Series
Geometric (arithmetico-geometric)
Harmonic
Alternating
Power
Binomial
Taylor
Convergence tests
Summand limit (term test)
Ratio
Root
Integral
Direct comparison
Limit comparison
Alternating series
Cauchy condensation
Dirichlet
Abel :
Vector
Gradient
Divergence
Curl
Laplacian
Directional derivative
Identities
Theorems
Gradient
Green's
Stokes'
Divergence
generalized Stokes
Helmholtz decomposition :
Multivariable
Formalisms
Matrix
Tensor
Exterior
Geometric
Definitions
Partial derivative
Multiple integral
Line integral
Surface integral
Volume integral
Jacobian
Hessian :
Advanced
Calculus on Euclidean space
Generalized functions
Limit of distributions :
Specialized
Fractional
Malliavin
Stochastic
Variations :
Miscellanea
Precalculus
History
Glossary
List of topics
Integration Bee
Mathematical analysis
Nonstandard analysis :
vte :
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 whether an infinite series or an improper integral converges or diverges by comparing the series or integral to one whose convergence properties are known.

## For series

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 $\sum b_{n}$ converges and $0\leq a_{n}\leq b_{n}$ for all sufficiently large n (that is, for all $n>N$ for some fixed value N), then the infinite series $\sum a_{n}$ also converges.
* If the infinite series $\sum b_{n}$ diverges and $0\leq b_{n}\leq a_{n}$ for all sufficiently large n, then the infinite series $\sum a_{n}$ also diverges.
Note that the series having larger terms is sometimes said to dominate (or eventually dominate) the series with smaller terms.
Alternatively, the test may be stated in terms of absolute convergence, in which case it also applies to series with complex terms:
* If the infinite series $\sum b_{n}$ is absolutely convergent and $|a_{n}|\leq |b_{n}|$ for all sufficiently large n, then the infinite series $\sum a_{n}$ is also absolutely convergent.
* If the infinite series $\sum b_{n}$ is not absolutely convergent and $|b_{n}|\leq |a_{n}|$ for all sufficiently large n, then the infinite series $\sum a_{n}$ is also not absolutely convergent.
Note that in this last statement, the series $\sum a_{n}$ could still be conditionally convergent; for real-valued series, this could happen if the a$_n$ are not all nonnegative.
The second pair of statements are equivalent to the first in the case of real-valued series because $\sum c_{n}$ converges absolutely if and only if $\sum |c_{n}|$, a series with nonnegative terms, converges.

### Proof

The proofs of all the statements given above are similar. Here is a proof of the third statement.
Let $\sum a_{n}$ and $\sum b_{n}$ be infinite series such that $\sum b_{n}$ converges absolutely (thus $\sum |b_{n}|$ converges), and without loss of generality assume that $|a_{n}|\leq |b_{n}|$ for all positive integers n. Consider the partial sums
    $S_{n}=|a_{1}|+|a_{2}|+\ldots +|a_{n}|,\ T_{n}=|b_{1}|+|b_{2}|+\ldots +|b_{n}|.$
Since $\sum b_{n}$ converges absolutely, $\lim _{n\to \infty }T_{n}=T$ for some real number T. For all n,
    $0\leq S_{n}=|a_{1}|+|a_{2}|+\ldots +|a_{n}|\leq |a_{1}|+\ldots +|a_{n}|+|b_{n+1}|+\ldots =S_{n}+(T-T_{n})\leq T.$
$S_{n}$ is a nondecreasing sequence and $S_{n}+(T-T_{n})$ is nonincreasing. Given $m,n>N$ then both $S_{n},S_{m}$ belong to the interval $[S_{N},S_{N}+(T-T_{N})]$, whose length $T-T_{N}$ decreases to zero as $N$ goes to infinity. This shows that $(S_{n})_{n=1,2,\ldots }$ is a Cauchy sequence, and so must converge to a limit. Therefore, $\sum a_{n}$ is absolutely convergent.

## For integrals

The comparison test for integrals may be stated as follows, assuming continuous real-valued functions f and g on $[a,b)$ with b either $+\infty$ or a real number at which f and g each have a vertical asymptote:
* If the improper integral $\int _{a}^{b}g(x)\,dx$ converges and $0\leq f(x)\leq g(x)$ for $a\leq x<b$, then the improper integral $\int _{a}^{b}f(x)\,dx$ also converges with $\int _{a}^{b}f(x)\,dx\leq \int _{a}^{b}g(x)\,dx.$
* If the improper integral $\int _{a}^{b}g(x)\,dx$ diverges and $0\leq g(x)\leq f(x)$ for $a\leq x<b$, then the improper integral $\int _{a}^{b}f(x)\,dx$ 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 $\sum b_{n}$ converges and $a_{n}>0$, $b_{n}>0$, and ${\frac {a_{n+1}}{a_{n}}}\leq {\frac {b_{n+1}}{b_{n}}}$ for all sufficiently large n, then the infinite series $\sum a_{n}$ also converges.
* If the infinite series $\sum b_{n}$ diverges and $a_{n}>0$, $b_{n}>0$, and ${\frac {a_{n+1}}{a_{n}}}\geq {\frac {b_{n+1}}{b_{n}}}$ for all sufficiently large n, then the infinite series $\sum a_{n}$ also diverges.