Tutorials › Measure Theory › Comparison Tests for Improper Integrals

Comparing Riemann and Lebesgue Integrals · Tutorial 329 of 798

Comparison Tests for Improper Integrals

Use direct inequalities and endpoint-local ratio limits to compare nonnegative improper integrals without confusing behavior at different endpoints.

Advanced 11 min read

What You'll Learn

  • State direct comparison tests with the correct inequality direction.
  • Prove the limit comparison test for a finite positive ratio.
  • Use zero or infinite ratio limits only for the one-sided conclusions they support.
  • Apply comparisons to singular endpoints and infinite tails.
  • Distinguish convergence near one endpoint from convergence of a full improper integral.
  • Identify why sign changes and endpoint assumptions matter.

Comparing Integrals Near an Improper Endpoint

When an integrand is nonnegative, its integral over a growing interval cannot decrease. This makes inequalities between integrands especially useful: a simpler function can bound the truncated integrals and settle whether they remain finite or grow without bound. The comparison must be made near the endpoint in question. It does not, by itself, determine what happens at another improper endpoint.

We work with Lebesgue measure \(m\) on an interval \(I\subseteq\mathbb R\). Its Lebesgue sigma-algebra is denoted by \(\mathcal L\); on a finite interval this measure is finite, and on an unbounded interval it is sigma-finite. The functions in the comparison tests are real-valued, nonnegative, and continuous in the interior of \(I\). Thus they are measurable and integrable on every compact subinterval of \(I\). On those compact subintervals their Lebesgue integrals agree with their Riemann integrals. All improper integrals below are interpreted as limits of these truncated integrals, and may equal \(+\infty\).

Definition: Let \(f\ge0\) be continuous on \((c,b)\), where \(b\) may be finite or \(+\infty\). Its integral near the right endpoint \(b\) is \(\displaystyle\lim_{t\uparrow b}\int_c^t f\,dm\), with \(t\to+\infty\) when \(b=+\infty\). The limit exists in \([0,\infty]\), since the truncated integrals are nondecreasing. The integral converges near \(b\) if this limit is finite and diverges near \(b\) if it is \(+\infty\). The definition near a left endpoint uses \(\displaystyle\lim_{t\downarrow a}\int_t^c f\,dm\).

Changing the interior point \(c\) does not affect convergence near the endpoint: the difference between two truncation choices is an integral over a compact interval, which is finite by continuity. A full integral with two improper endpoints converges only if the integral near each endpoint is finite. Indeed, splitting at any interior point expresses the nonnegative full integral as the sum of its two endpoint integrals. This local viewpoint is essential in applying comparison tests.

The Direct Comparison Test

Theorem (Direct Comparison): Let \(f,g\ge0\) be continuous near the right endpoint \(b\), and suppose \(0\le f(x)\le Cg(x)\) for all \(x\) sufficiently close to \(b\), where \(C\) is a finite positive constant. If \(\int g\,dm\) converges near \(b\), then \(\int f\,dm\) converges near \(b\). If instead \(f(x)\ge c g(x)\) near \(b\) for some \(c>0\), and \(\int g\,dm\) diverges near \(b\), then \(\int f\,dm\) diverges near \(b\). The same statements hold near a left endpoint.

Proof. Choose \(d\) close enough to \(b\) that the stated inequality holds on \((d,b)\). In the upper-bound case, for every \(t\in(d,b)\), monotonicity of the integral gives \(\int_d^t f\,dm\le C\int_d^t g\,dm\). If the integral of \(g\) near \(b\) is finite, the right side is bounded above independently of \(t\). Therefore the nondecreasing truncated integrals of \(f\) have a finite limit. In the lower-bound case, \(\int_d^t f\,dm\ge c\int_d^t g\,dm\). If the truncated integrals of \(g\) tend to \(+\infty\), then those of \(f\) do too. The portions between \(c\) and \(d\), when included, are finite by continuity, so they do not change either conclusion. For a left endpoint, the same argument applies to truncations \((t,d)\) as \(t\) decreases to that endpoint. \(\square\)

The inequality direction matters. An upper bound by a function with a finite integral proves finiteness; a lower bound by a function with an infinite integral proves divergence. The other two combinations do not settle the question.

Worked Example: Bounding a Tail from Above and Below

Determine whether \(\displaystyle\int_1^\infty\frac{1}{x^2+1}\,dx\) converges, and compute its value.

For \(x\ge1\), we have \(x^2\le x^2+1\le2x^2\). Taking reciprocals of positive quantities reverses the inequalities, giving \(\frac{1}{2x^2}\le\frac{1}{x^2+1}\le\frac{1}{x^2}\). Since \(\int_1^\infty x^{-2}\,dx=1\), direct comparison proves convergence. The integral can also be evaluated exactly using the antiderivative \(\arctan x\): \(\int_1^R\frac{1}{x^2+1}\,dx=\arctan R-\frac{\pi}{4}\). As \(R\to\infty\), this tends to \(\frac{\pi}{2}-\frac{\pi}{4}=\frac{\pi}{4}\).

Check: the comparison bounds give a lower integral \(\int_1^\infty(2x^2)^{-1}\,dx=\frac12\) and an upper integral \(\int_1^\infty x^{-2}\,dx=1\). The exact value \(\frac{\pi}{4}\) lies between them, since \(\frac12<\frac{\pi}{4}<1\).

The Limit Comparison Test

Theorem (Limit Comparison): Let \(f,g\ge0\) be continuous near an improper endpoint \(b\), and suppose \(g(x)>0\) sufficiently close to \(b\). If \(\displaystyle\lim_{x\to b}\frac{f(x)}{g(x)}=L\) for a finite number \(L\) with \(0<L<\infty\), then the integrals of \(f\) and \(g\) either both converge near \(b\) or both diverge near \(b\). This conclusion concerns only that endpoint. To infer the convergence status of full integrals, the integrals away from \(b\) must also be finite, or the other improper endpoints must be checked separately.

Proof. Choose any \(\varepsilon\) with \(0<\varepsilon<L\). By the definition of the limit, there is a neighborhood of \(b\) on which \(L-\varepsilon< f(x)/g(x)<L+\varepsilon\). Since \(g(x)>0\) there, multiplication by \(g(x)\) gives \((L-\varepsilon)g(x)<f(x)<(L+\varepsilon)g(x)\). If the integral of \(g\) converges near \(b\), the upper inequality and the direct comparison test imply that the integral of \(f\) converges there. If the integral of \(g\) diverges near \(b\), the lower inequality and direct comparison imply that the integral of \(f\) diverges there. These two implications establish the claimed equivalence. The argument takes place only in a neighborhood of \(b\); it gives no bound on an integral near a different endpoint. \(\square\)

When the ratio limit is zero or \(+\infty\), the two-sided conclusion is unavailable. The same inequalities give useful one-sided conclusions: if \(f/g\to0\), then \(f\le g\) sufficiently near the endpoint, so convergence of \(g\) implies convergence of \(f\). If \(f/g\to+\infty\), then \(f\ge g\) sufficiently near the endpoint, so divergence of \(g\) implies divergence of \(f\). In the other cases these bounds alone do not decide convergence.

Worked Example: Limit Comparison at a Singular Endpoint

Evaluate \(\displaystyle\int_0^1\frac{1+x}{\sqrt{x}}\,dx\), treating \(0\) as the improper endpoint.

Take \(g(x)=x^{-1/2}\), which is positive for \(x>0\). The ratio is \(f(x)/g(x)=1+x\), and its limit as \(x\downarrow0\) is \(1\). Since \(0<1<\infty\), limit comparison says that the two integrals have the same convergence status near \(0\). Direct evaluation of the comparison integral gives \(\int_t^1x^{-1/2}\,dx=2-2\sqrt{t}\), which tends to \(2\) as \(t\downarrow0\). Thus the target integral converges. Its exact value follows by integrating the two terms: \(\int_t^1(x^{-1/2}+x^{1/2})\,dx=2-2\sqrt t+\frac23(1-t^{3/2})\). Taking \(t\downarrow0\) gives \(2+\frac23=\frac83\).

Check: differentiating \(2\sqrt{x}+\frac23x^{3/2}\) gives \(x^{-1/2}+x^{1/2}=(1+x)/\sqrt{x}\) for \(x>0\). Its value at \(1\) is \(2+\frac23=\frac83\), and its limit at \(0\) is \(0\), confirming the computed integral.

Worked Example: A Zero Ratio Does Not Give Two-Way Comparison

Compare \(f(x)=x^{-2}\) and \(g(x)=x^{-1}\) near \(+\infty\), and determine each tail integral.

For \(x\ge1\), both functions are nonnegative and \(f(x)/g(x)=1/x\to0\). The integral of \(g\) diverges because \(\int_1^R x^{-1}\,dx=\ln R\to+\infty\). The integral of \(f\), however, converges: \(\int_1^R x^{-2}\,dx=1-\frac1R\to1\). Thus a zero ratio limit does not mean the two integrals have the same behavior. It only supplies the upper comparison \(f\le g\) near infinity, which would transfer convergence from \(g\) to \(f\), not divergence from \(g\) to \(f\).

Check: the antiderivatives \(-1/x\) and \(\ln x\) differentiate to \(x^{-2}\) and \(x^{-1}\), respectively. Substituting the bounds \(1\) and \(R\) gives the displayed truncated integrals and their limits.

Endpoint Locality and Common Pitfalls

A ratio limit near one endpoint does not automatically compare full improper integrals. For instance, define \(g(x)=1\) on \((0,\infty)\), and define \(f(x)=1\) for \(0<x\le1\) and \(f(x)=e^{-(x-1)}\) for \(x>1\). Both functions are nonnegative and continuous on \((0,\infty)\). As \(x\downarrow0\), \(f(x)/g(x)=1\), so their integrals agree in convergence status near \(0\). But their full integrals differ: \(\int_0^\infty g(x)\,dx=+\infty\), whereas \(\int_0^\infty f(x)\,dx=\int_0^1 1\,dx+\int_1^\infty e^{-(x-1)}\,dx=1+1=2\). The exponential tail equals \(1\), as is seen by setting \(u=x-1\) and evaluating \(\int_0^\infty e^{-u}\,du=1\). The ratio test near zero says nothing about the distinct behavior near infinity.

Common mistake. A mistaken argument might say, “\(f/g\to1\) at zero, so the full integrals of \(f\) and \(g\) both converge or both diverge.” The example above disproves that conclusion: the full integral of \(f\) is \(2\), while that of \(g\) is infinite. The correction is to state the conclusion locally—both converge or both diverge near zero—and then check the other endpoint separately. Similarly, a principal value or cancellation in a signed integral cannot be established by these tests: they rely on nonnegative integrands and ordinary improper limits, not on cancellation between positive and negative parts.

For an integral with several improper endpoints, apply a comparison near each one. On any compact interior portion, continuity ensures a finite integral. The full nonnegative integral is finite exactly when the contributions from all its improper endpoints are finite. This procedure keeps endpoint behavior separate and prevents a valid local comparison from being used beyond its scope.

Check Your Understanding

For each question, state which endpoint is being tested and verify that the comparison inequality has the required direction.

  1. If \(0\le f\le 3g\) near \(+\infty\) and \(\int g\,dm\) converges there, what can be concluded about \(\int f\,dm\) near \(+\infty\)?
  2. If \(f\ge \frac12g\) near \(0\) and \(\int_0^1g\,dm\) diverges at \(0\), what follows about the integral of \(f\) there?
  3. Suppose \(f/g\to4\) near an endpoint and \(g>0\) there. Which convergence conclusions follow in each case: the integral of \(g\) converges, or the integral of \(g\) diverges?
  4. For \(f(x)=x^{-3}\) and \(g(x)=x^{-2}\) on \([1,\infty)\), compute the ratio limit and both integrals. What does that example show about a zero ratio limit?
  5. Why does a limit comparison near \(0\) not settle convergence of an integral over \((0,\infty)\)? State what additional checks are needed.