Tutorials › AP Statistics › Comparison Tests for Improper Integrals

Numerical and BC Integration Methods · Tutorial 535 of 999

Comparison Tests for Improper Integrals

Use direct and limit comparison to classify improper integrals by relating their positive integrands to known benchmarks.

Advanced 10 min read

What You'll Learn

  • State the direct comparison test and use the correct inequality for convergence or divergence.
  • Apply comparison near an infinite endpoint or a finite singular endpoint.
  • Use limit comparison when two positive integrands have a finite, positive ratio limit.
  • Check positivity and local integrability before applying either test.
  • Identify why a zero or infinite ratio limit does not, by itself, settle convergence.
  • Avoid reversing the implications of the direct comparison test.

Why Compare Improper Integrals?

Some improper integrals are difficult to evaluate directly, but their convergence can still be determined. The key is to compare the integrand with a positive function whose integral is already known. The P-integral convergence benchmarks provide especially useful comparisons: for example, \(\int_1^\infty \frac{1}{x^p}\,dx\) converges when \(p>1\) and diverges when \(p\leq 1\). Comparison tests let us use such facts without finding an antiderivative for the integrand under study.

The inequalities and positivity conditions matter. A comparison test does not say that any two functions with roughly similar-looking formulas have the same behavior. It gives a conclusion only when a particular inequality, or a suitable positive ratio limit, has been established near the improper endpoint.

Set Up the Comparison Carefully

Suppose an integral is improper at an endpoint. First identify which endpoint causes the issue, then compare the integrands near that endpoint. The functions should be continuous on every compact part of the interval away from the improper endpoint, and the comparison functions should be positive there. If an integral has more than one improper endpoint, or an interior singularity, treat the relevant one-sided integrals separately.

Definition: A positive comparison function is a function \(g\) satisfying \(g(x)>0\) on the part of the interval being compared. In a comparison test, both integrands must be nonnegative there, and the required inequality must hold sufficiently near the improper endpoint.

For an infinite interval, “near the improper endpoint” means for all sufficiently large \(x\). For an endpoint at \(a\), it means for all \(x\) sufficiently close to \(a\) from within the interval. Behavior on an initial compact segment does not affect convergence, provided the functions are integrable there.

The Direct Comparison Test

Theorem: Suppose \(f\) and \(g\) are nonnegative and continuous on the relevant part of an interval, and \(0\leq f(x)\leq g(x)\) sufficiently near the improper endpoint.
  • If \(\int g(x)\,dx\) converges at that endpoint, then \(\int f(x)\,dx\) also converges there.
  • If \(\int f(x)\,dx\) diverges at that endpoint, then \(\int g(x)\,dx\) also diverges there.
Equivalently, if \(0\leq g(x)\leq f(x)\) and \(\int g(x)\,dx\) diverges, then \(\int f(x)\,dx\) diverges.

The first conclusion follows from the fact that a nonnegative integrand bounded above by one with finite accumulated area cannot accumulate infinite area. The second follows by contraposition: if \(\int g\) converged, the first conclusion would force \(\int f\) to converge too. Thus divergence passes upward from a smaller nonnegative function to a larger one, not downward.

Worked Example: Convergence at a Finite Singular Endpoint

Determine whether \(\int_0^1 \frac{1}{\sqrt{x(1+x)}}\,dx\) converges.

For \(0<x\leq 1\), both \(x\) and \(1+x\) are positive. Also, \(1+x\geq 1\), so \(\sqrt{x(1+x)}\geq\sqrt{x}\). Taking reciprocals of positive quantities reverses the inequality:

$$ 0<\frac{1}{\sqrt{x(1+x)}}\leq\frac{1}{\sqrt{x}}=x^{-1/2}. $$

The comparison integral is a P-integral at \(0\). Its truncated value is

$$ \int_\varepsilon^1 x^{-1/2}\,dx =\left[2\sqrt{x}\right]_\varepsilon^1 =2-2\sqrt{\varepsilon} \longrightarrow 2 \qquad(\varepsilon\to0^+). $$

It converges, so the direct comparison test proves that the original integral converges. The positivity and inequality were checked throughout \(0<x\leq1\), including arbitrarily close to the singular endpoint.

Worked Example: Divergence by a Lower Bound

Determine whether \(\int_1^\infty \frac{2x+1}{x^2+x}\,dx\) converges.

For \(x\geq1\), the numerator and denominator are positive. Compare the integrand with \(1/x\). Since \(x>0\), cross-multiplication preserves the inequality:

$$ \frac{2x+1}{x^2+x}\geq\frac1x \quad\Longleftrightarrow\quad x(2x+1)\geq x^2+x \quad\Longleftrightarrow\quad 2x^2+x\geq x^2+x \quad\Longleftrightarrow\quad x^2\geq0. $$

The benchmark diverges, since for \(R>1\),

$$ \int_1^R\frac1x\,dx=\ln R \longrightarrow\infty \qquad(R\to\infty). $$

The original integrand is at least this divergent positive benchmark, so its improper integral diverges. The direction of the comparison is essential: a larger nonnegative function cannot have finite total area if a smaller one already has infinite total area.

Why the Direct Test Works

The comparison theorem follows from the ordinary order property of definite integrals. On a truncated interval, if \(0\leq f\leq g\), then integrating preserves the inequality. For an infinite endpoint, take the truncation at \(R\) and then let \(R\) increase. For a finite singular endpoint \(a\), truncate at \(a+\varepsilon\) or \(a-\varepsilon\), as appropriate, and take the corresponding one-sided limit.

1
Truncate before taking the limit.
For example, for an endpoint at infinity, choose \(R\) large enough that \(0\leq f(x)\leq g(x)\) on \([A,R]\).
2
Integrate the pointwise inequality.
For every such \(R\), \(\int_A^R f(x)\,dx\leq\int_A^R g(x)\,dx\).
3
Take the improper limit.
If the right-hand integrals approach a finite value, the nondecreasing left-hand integrals are bounded above and therefore approach a finite limit too.

This argument also explains why nonnegativity is important: the truncated integrals of a nonnegative function increase as the interval expands toward the improper endpoint. For finite endpoints the same argument uses truncated intervals approaching the endpoint. The comparison is applied only where the inequality holds; any remaining compact segment contributes a finite amount under the stated regularity conditions.

Limit Comparison

Sometimes neither integrand is obviously bounded by the other with a convenient constant. If their ratio approaches a finite positive number, then near the endpoint they are bounded above and below by constant multiples of one another.

Theorem: Let \(f\) and \(g\) be positive near the same improper endpoint. If \(\lim \frac{f(x)}{g(x)}=L\), where \(0<L<\infty\), then \(\int f(x)\,dx\) and \(\int g(x)\,dx\) either both converge or both diverge at that endpoint.

Here the limit is taken toward the improper endpoint: \(x\to\infty\), \(x\to a^+\), or \(x\to a^-\), as applicable. Positivity ensures the ratio is defined near the endpoint and allows multiplication of the resulting inequalities without changing their directions.

Worked Example: Limit Comparison for Convergence

Determine whether \(\int_1^\infty \frac{2x+7}{x^3+4}\,dx\) converges.

Both the integrand and \(g(x)=1/x^2\) are positive for \(x\geq1\). Compute the ratio and divide its numerator and denominator by \(x^3\):

$$ \frac{\dfrac{2x+7}{x^3+4}}{\dfrac1{x^2}} =\frac{x^2(2x+7)}{x^3+4} =\frac{2+7/x}{1+4/x^3} \longrightarrow\frac{2+0}{1+0}=2. $$

The limit is finite and positive, so limit comparison applies. The benchmark converges because

$$ \int_1^R\frac1{x^2}\,dx =\left[-\frac1x\right]_1^R =1-\frac1R \longrightarrow1 \qquad(R\to\infty). $$

Therefore the original integral converges. As a check on the hypotheses, for \(x\geq1\), its numerator and denominator are positive, and the ratio calculation has a nonzero finite limit, exactly the condition required by this test.

Justification of Limit Comparison

Let \(L=\lim f(x)/g(x)\), with \(0<L<\infty\). By the definition of a limit, choose a positive tolerance smaller than \(L\), such as \(L/2\). Sufficiently near the improper endpoint, the ratio then lies between \(L/2\) and \(3L/2\). Since \(g(x)>0\), multiplying through by \(g(x)\) gives

$$ \frac{L}{2}g(x)\leq f(x)\leq\frac{3L}{2}g(x). $$

The constants \(L/2\) and \(3L/2\) are positive and finite. Multiplying a nonnegative function by such a constant does not change whether its improper integral is finite or infinite. The direct comparison test applied to both inequalities therefore gives the same convergence behavior for \(f\) and \(g\). This proves the limit comparison result.

Choosing a Benchmark and Avoiding Pitfalls

Use a benchmark whose behavior is known and whose formula matches the dominant behavior of the integrand near the endpoint. Near infinity, powers of \(x\) often make useful comparisons. Near a finite singularity, powers of the distance to the endpoint are common benchmarks. The comparison need only be valid sufficiently near the endpoint, but it must be proved there.

Common mistake: If \(0\leq f\leq g\) and \(\int g\) diverges, it does not follow that \(\int f\) diverges. The smaller function may still have a convergent integral. A divergence conclusion from direct comparison requires a divergent lower bound.

For a concrete counterexample to the incorrect inference, on \(x\geq1\) we have \(0<1/x^2\leq1/x\), while

$$ \int_1^\infty\frac1x\,dx=\infty, \qquad \int_1^\infty\frac1{x^2}\,dx =\lim_{R\to\infty}\left(1-\frac1R\right)=1. $$

The larger function has a divergent integral, but the smaller one converges. The correction is to use the test in its stated direction: an integrable upper bound proves convergence; a divergent lower bound proves divergence.

Limit comparison also has a specific condition. A ratio limit of zero or infinity does not meet the theorem’s requirement \(0<L<\infty\); it cannot, by itself, establish that both integrals have the same behavior. In such cases, use a direct inequality if one can be proved, or find another valid benchmark.

Check Your Understanding

For each question, identify the endpoint and verify that the comparison conditions hold before stating a conclusion.

  1. If \(0\leq f(x)\leq g(x)\) near infinity and \(\int g\) converges, what can you conclude about \(\int f\)?
  2. If \(0\leq g(x)\leq f(x)\) near a finite singular endpoint and \(\int g\) diverges, what can you conclude about \(\int f\)?
  3. For which values of \(p\) does \(\int_1^\infty x^{-p}\,dx\) converge, and how could this benchmark help classify another positive integrand?
  4. Why does a finite, positive limit of \(f(x)/g(x)\) imply that \(f\) and \(g\) have the same convergence behavior?
  5. Give a reason that \(f\leq g\) and divergence of \(\int g\) are not enough to prove divergence of \(\int f\).

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon