Direct comparison test
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. 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: 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: Note that in this last statement, the series formula_4 could still be conditionally convergent; for real-valued series, this could happen if the "a" are not all nonnegative. The second pair of statements are equivalent to the first in the case of real-valued series because formula_15 converges absolutely if and only if formula_16, 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 formula_4 and formula_1 be infinite series such that formula_1 converges absolutely (thus formula_20 converges), and without loss of generality assume that formula_9 for all positive integers "n". Consider the partial sums Since formula_1 converges absolutely, formula_24 for some real number "T". For all "n", formula_26 is a nondecreasing sequence and formula_27 is nonincreasing. Given formula_28 then both formula_29 belong to the interval formula_30, whose length formula_31 decreases to zero as formula_32 goes to infinity. This shows that formula_33 is a Cauchy sequence, and so must converge to a limit. Therefore , formula_4 is absolutely convergent. For integrals. The comparison test for integrals may be stated as follows, assuming continuous real-valued functions "f" and "g" on formula_35 with "b" either formula_36 or a real number at which "f" and "g" each have a vertical asymptote: 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: