Comparison Test for Improper Integrals for Master Mathematics

Lesson

Understanding the Comparison Test for Improper Integrals

Sometimes you need to know if an improper integral converges or diverges, but actually computing it is difficult or impossible. For example, $\int_1^{\infty} e^{-x^2} \, dx$ has no elementary antiderivative!

The comparison test lets you determine convergence without computing the integral. The idea: compare your integral to one you already know converges or diverges.

The Direct Comparison Test

Suppose $f(x) \geq 0$ and $g(x) \geq 0$ on the interval.

For convergence: If $0 \leq f(x) \leq g(x)$ and $\int g(x) \, dx$ converges, then $\int f(x) \, dx$ also converges.

For divergence: If $f(x) \geq g(x) \geq 0$ and $\int g(x) \, dx$ diverges, then $\int f(x) \, dx$ also diverges.

In plain English:

  • Smaller than a convergent integral → converges
  • Bigger than a divergent integral → diverges

Common Comparison Functions

⚠️ Important: The p-test works opposite ways for $[1, \infty)$ vs $[0, 1]$!

For integrals from 1 to $\infty$ (infinite limit)

Integral Behavior
$\int_1^{\infty} \frac{1}{x^p} \, dx$ Converges if $p > 1$, diverges if $p \leq 1$
$\int_1^{\infty} \frac{1}{x^2} \, dx$ Converges
$\int_1^{\infty} \frac{1}{x} \, dx$ Diverges
$\int_1^{\infty} \frac{1}{\sqrt{x}} \, dx$ Diverges
$\int_1^{\infty} e^{-x} \, dx$ Converges

For integrals from 0 to 1 (discontinuity at 0)

Integral Behavior
$\int_0^{1} \frac{1}{x^p} \, dx$ Converges if $p < 1$, diverges if $p \geq 1$
$\int_0^{1} \frac{1}{\sqrt{x}} \, dx$ Converges ($p = \frac{1}{2} < 1$)
$\int_0^{1} \frac{1}{x} \, dx$ Diverges ($p = 1$)
$\int_0^{1} \frac{1}{x^2} \, dx$ Diverges ($p = 2 > 1$)

Why the difference?

  • At $\infty$: larger powers shrink faster → converge
  • At $0$: larger powers blow up faster → diverge

Example 1: Convergence (Infinite Limit)

Problem: Does $\int_1^{\infty} \frac{1}{x^2 + 1} \, dx$ converge or diverge?

Step 1: Find a comparison function

For large $x$: $x^2 + 1 > x^2$

So: $\frac{1}{x^2 + 1} < \frac{1}{x^2}$

Step 2: Check the comparison integral

We know $\int_1^{\infty} \frac{1}{x^2} \, dx$ converges (p-test, $p = 2 > 1$).

Step 3: Apply comparison test

Since $0 < \frac{1}{x^2+1} < \frac{1}{x^2}$ and the bigger one converges...

$$\boxed{\text{Converges by comparison with } \frac{1}{x^2}}$$


Example 2: Divergence (Infinite Limit)

Problem: Does $\int_1^{\infty} \frac{1}{\sqrt{x} + 1} \, dx$ converge or diverge?

Step 1: Find a comparison function

For $x \geq 1$: $\sqrt{x} + 1 \leq \sqrt{x} + \sqrt{x} = 2\sqrt{x}$

So: $\frac{1}{\sqrt{x} + 1} \geq \frac{1}{2\sqrt{x}}$

Step 2: Check the comparison integral

We know $\int_1^{\infty} \frac{1}{2\sqrt{x}} \, dx$ diverges.

(It's $\frac{1}{2} \int_1^{\infty} \frac{1}{x^{1/2}} \, dx$, and $p = \frac{1}{2} < 1$.)

Step 3: Apply comparison test

Since $\frac{1}{\sqrt{x}+1} \geq \frac{1}{2\sqrt{x}} > 0$ and the smaller one diverges...

$$\boxed{\text{Diverges by comparison with } \frac{1}{\sqrt{x}}}$$


The Limit Comparison Test

Sometimes direct comparison is tricky. The limit comparison test is often easier:

If $f(x) > 0$ and $g(x) > 0$ for $x \geq a$, and

$$\lim_{x \to \infty} \frac{f(x)}{g(x)} = L$$

where $0 < L < \infty$ (a finite positive number), then:

$$\int_a^{\infty} f(x) \, dx \text{ and } \int_a^{\infty} g(x) \, dx \text{ both converge or both diverge}$$

In plain English: If two functions have the same "growth rate" at infinity, their integrals behave the same way.


Example 3: Limit Comparison Test

Problem: Does $\int_1^{\infty} \frac{x}{x^3 + 5} \, dx$ converge or diverge?

Step 1: Identify dominant behavior

For large $x$: $\frac{x}{x^3 + 5} \approx \frac{x}{x^3} = \frac{1}{x^2}$

Let's compare to $g(x) = \frac{1}{x^2}$.

Step 2: Compute the limit

$$\lim_{x \to \infty} \frac{f(x)}{g(x)} = \lim_{x \to \infty} \frac{\frac{x}{x^3+5}}{\frac{1}{x^2}}$$

$$= \lim_{x \to \infty} \frac{x \cdot x^2}{x^3 + 5}$$

$$= \lim_{x \to \infty} \frac{x^3}{x^3 + 5}$$

$$= \lim_{x \to \infty} \frac{1}{1 + \frac{5}{x^3}} = 1$$

Step 3: Conclude

Since the limit is $1$ (finite and positive) and $\int_1^{\infty} \frac{1}{x^2} \, dx$ converges...

$$\boxed{\text{Converges by limit comparison with } \frac{1}{x^2}}$$


Example 4: Another Limit Comparison

Problem: Does $\int_2^{\infty} \frac{1}{\sqrt{x^2 - 1}} \, dx$ converge or diverge?

Step 1: Identify dominant behavior

For large $x$: $\sqrt{x^2 - 1} \approx \sqrt{x^2} = x$

So $\frac{1}{\sqrt{x^2-1}} \approx \frac{1}{x}$.

Compare to $g(x) = \frac{1}{x}$.

Step 2: Compute the limit

$$\lim_{x \to \infty} \frac{\frac{1}{\sqrt{x^2-1}}}{\frac{1}{x}} = \lim_{x \to \infty} \frac{x}{\sqrt{x^2-1}}$$

$$= \lim_{x \to \infty} \frac{x}{x\sqrt{1 - \frac{1}{x^2}}}$$

$$= \lim_{x \to \infty} \frac{1}{\sqrt{1 - \frac{1}{x^2}}} = 1$$

Step 3: Conclude

Since the limit is $1$ and $\int_2^{\infty} \frac{1}{x} \, dx$ diverges...

$$\boxed{\text{Diverges by limit comparison with } \frac{1}{x}}$$


Example 5: Exponential Decay

Problem: Does $\int_1^{\infty} e^{-x^2} \, dx$ converge or diverge?

Step 1: Find a comparison

For $x \geq 1$: $x^2 \geq x$, so $-x^2 \leq -x$

Therefore: $e^{-x^2} \leq e^{-x}$

Step 2: Check the comparison integral

$$\int_1^{\infty} e^{-x} \, dx = \lim_{t \to \infty} [-e^{-x}]_1^t$$

$$= \lim_{t \to \infty} (-e^{-t} + e^{-1}) = e^{-1}$$

This converges!

Step 3: Conclude

Since $0 < e^{-x^2} \leq e^{-x}$ and $\int_1^{\infty} e^{-x} \, dx$ converges...

$$\boxed{\text{Converges by comparison with } e^{-x}}$$


Example 6: Convergence (Discontinuity at 0)

Problem: Does $\int_0^{1} \frac{1}{\sqrt{x + x^2}} \, dx$ converge or diverge?

Step 1: Identify the problem

As $x \to 0^+$: $\sqrt{x + x^2} \to 0$, so the integrand blows up.

Step 2: Find dominant behavior near 0

For small $x$: $x + x^2 \approx x$ (the $x^2$ term is tiny)

So: $\frac{1}{\sqrt{x + x^2}} \approx \frac{1}{\sqrt{x}}$

Step 3: Check the comparison integral

$\int_0^{1} \frac{1}{\sqrt{x}} \, dx$ converges (p-test at 0: $p = \frac{1}{2} < 1$).

Step 4: Make it rigorous

For $0 < x \leq 1$: $x + x^2 \geq x$

So: $\frac{1}{\sqrt{x + x^2}} \leq \frac{1}{\sqrt{x}}$

Since our function is smaller than a convergent integral...

$$\boxed{\text{Converges by comparison with } \frac{1}{\sqrt{x}}}$$


Example 7: Divergence (Discontinuity at 0)

Problem: Does $\int_0^{1} \frac{1}{x\sqrt{x+1}} \, dx$ converge or diverge?

Step 1: Identify the problem

As $x \to 0^+$: we have $\frac{1}{x \cdot 1} = \frac{1}{x} \to \infty$.

Step 2: Find a comparison

For $0 < x \leq 1$: $\sqrt{x+1} \leq \sqrt{2}$

So: $\frac{1}{x\sqrt{x+1}} \geq \frac{1}{x\sqrt{2}} = \frac{1}{\sqrt{2}} \cdot \frac{1}{x}$

Step 3: Check the comparison integral

$\int_0^{1} \frac{1}{x} \, dx$ diverges (p-test at 0: $p = 1$).

Step 4: Conclude

Since our function is larger than a divergent integral...

$$\boxed{\text{Diverges by comparison with } \frac{1}{x}}$$


Example 8: Limit Comparison Near 0

Problem: Does $\int_0^{1} \frac{1}{\sqrt{x}(1 + x)} \, dx$ converge or diverge?

Step 1: Identify dominant behavior near 0

As $x \to 0$: $\frac{1}{\sqrt{x}(1+x)} \approx \frac{1}{\sqrt{x}}$

Step 2: Compute the limit

$$\lim_{x \to 0^+} \frac{\frac{1}{\sqrt{x}(1+x)}}{\frac{1}{\sqrt{x}}} = \lim_{x \to 0^+} \frac{1}{1+x} = 1$$

Step 3: Conclude

The limit is 1 (finite and positive).

Since $\int_0^{1} \frac{1}{\sqrt{x}} \, dx$ converges ($p = \frac{1}{2} < 1$)...

$$\boxed{\text{Converges by limit comparison with } \frac{1}{\sqrt{x}}}$$


Quick Strategy Guide

For $\int_1^{\infty}$ (infinite limit):

  1. Look at dominant terms for large $x$
  2. Simplify: $\frac{x^2 + 3x}{x^4 + 1} \approx \frac{x^2}{x^4} = \frac{1}{x^2}$
  3. Remember: $p > 1$ converges, $p \leq 1$ diverges

For $\int_0^{1}$ (discontinuity at 0):

  1. Look at dominant terms for small $x$
  2. Simplify: $\frac{1}{\sqrt{x + x^2}} \approx \frac{1}{\sqrt{x}}$
  3. Remember: $p < 1$ converges, $p \geq 1$ diverges (opposite!)

General tips:

  • Use limit comparison when direct comparison is awkward
  • For exponentials: $e^{-x}$ and faster decay always converge

Common Mistakes and Misunderstandings

❌ Mistake: Comparing in the wrong direction

Wrong: "$\frac{1}{x^2+1} > \frac{1}{x^3}$ and $\int \frac{1}{x^3}$ converges, so our integral converges."

Why it's wrong: Being bigger than something convergent tells you nothing! You need to be smaller than a convergent integral.

Correct: Compare to something larger that still converges, like $\frac{1}{x^2}$.


❌ Mistake: Forgetting positivity requirement

Wrong: Using comparison test on functions that can be negative.

Why it's wrong: The comparison test requires $f(x) \geq 0$ and $g(x) \geq 0$.

Correct: Make sure both functions are non-negative on the interval.


❌ Mistake: Getting a limit of 0 or $\infty$ in limit comparison

What happens:

  • If $\lim \frac{f}{g} = 0$: only know $f$ converges if $g$ converges
  • If $\lim \frac{f}{g} = \infty$: only know $f$ diverges if $g$ diverges

Better approach: Choose a different comparison function so the limit is finite and positive.

Formulas & Reference

Direct Comparison Test (Convergence)

$$0 \leq f(x) \leq g(x) \text{ and } \int g \text{ converges} \Rightarrow \int f \text{ converges}$$

If your function is smaller than a convergent integral, it also converges. Think: 'squeezed under something finite.'

Variables:
$f(x)$:
the function you're testing
$g(x)$:
a larger function with known convergent integral

Direct Comparison Test (Divergence)

$$f(x) \geq g(x) \geq 0 \text{ and } \int g \text{ diverges} \Rightarrow \int f \text{ diverges}$$

If your function is bigger than a divergent integral, it also diverges. Think: 'at least as big as infinity.'

Variables:
$f(x)$:
the function you're testing
$g(x)$:
a smaller function with known divergent integral

Limit Comparison Test

$$\lim_{x \to a} \frac{f(x)}{g(x)} = L \text{ where } 0 < L < \infty$$

If the limit is a finite positive number, then both integrals converge or both diverge. Works for limits at infinity OR at a discontinuity.

Variables:
$f(x)$:
the function you're testing
$g(x)$:
a function with known behavior
$L$:
the limit (must be finite and positive)
$a$:
infinity or the point of discontinuity

p-Test (1 to ∞)

$$\int_1^{\infty} \frac{1}{x^p} \, dx$$

Converges if p > 1, diverges if p ≤ 1. Use for integrals with infinite upper limit.

Variables:
$p$:
the exponent (p > 1 converges, p ≤ 1 diverges)

p-Test (0 to 1)

$$\int_0^{1} \frac{1}{x^p} \, dx$$

Converges if p < 1, diverges if p ≥ 1. OPPOSITE of the infinity case! Use for integrals with discontinuity at 0.

Variables:
$p$:
the exponent (p < 1 converges, p ≥ 1 diverges)
Courses Using This Skill

This skill is taught in the following courses. Create an account to access practice exercises and full course materials.