Improper Integrals
Learning Objectives
- Define an improper integral over an unbounded interval, and over an interval where the integrand blows up, as a limit of ordinary integrals, and say when it converges or diverges.
- Classify and for every real (the -test) and compute their values when they converge.
- Apply the comparison theorem with all of its hypotheses to decide convergence without finding an antiderivative.
- Recognize the two classic traps: using the Fundamental Theorem of Calculus across a singularity, and letting a symmetric limit hide a divergence.
- Explain why "a density has total area 1" is an improper integral over the whole line, and why a density can integrate to 1 while its mean does not exist.
Context & Motivation
The definite integral you built from Riemann sums (the-definite-integral-and-riemann-sums) and evaluated with antiderivatives (the-fundamental-theorem-of-calculus) was defined for a function on a closed, bounded interval , and the Fundamental Theorem needs the function to be continuous on all of it. Two situations break those assumptions and both are everywhere in practice: an interval that never ends, such as the tail of a distribution, and an integrand that shoots off to infinity at an endpoint. The area in question may still be a perfectly good finite number, so the work is to say precisely when, and how to compute it.
The lesson continuous-random-variables-and-pdfs introduced a probability density as a non-negative curve with total area 1, and checked that condition with rectangles and triangles over a bounded interval. Densities that matter in practice, the exponential and the normal among them, have curved shapes and tails that stay positive forever, so the "total area" is the area under an infinite tail. That area is a limit, and it is exactly what this lesson makes precise. The same machinery decides whether a mean or a variance exists, which is a real question for heavy-tailed quantities.
Core Theory
Type I: an unbounded interval
If is continuous on , define
The integral converges if this limit exists and is a finite number, and diverges otherwise (the limit is , or does not exist). The case is the mirror image. For the whole line, pick any and require both halves to converge on their own:
If either half diverges, the whole integral diverges. The choice of does not change the answer.
Type II: an integrand that blows up
If is continuous on but unbounded near , define
and treat a blow-up at the right end the same way. If the bad point lies strictly inside , split at and require both pieces to converge separately. A function that merely has a removable gap, such as at , does not make the integral improper, because the function extends to a continuous one.
The -test
For the antiderivative of is , so . As the power tends to when and to when . For the integral is . On the other end, is handled the same way with . The results:
- converges exactly when , and then equals .
- converges exactly when , and then equals .
The borderline diverges in both cases. The tail wants a fast decay (large ), the singularity wants a mild blow-up (small ).
The comparison theorem
Suppose and are continuous on and for every . Then:
- if converges, so does , and ;
- if diverges, so does .
The reason is short. Because , the function never decreases, and because it is capped by . A non-decreasing quantity with an upper bound has a limit (the sequence version of this fact is the subject of sequences-and-convergence). The theorem says nothing when the smaller integral converges or the larger one diverges. It also fails without the hypothesis : with and we have and , yet .
Densities, normalization, and moments
A density on the line must satisfy and , now read as a pair of improper integrals. The normal density from the-normal-distribution is stated there without derivation, and its constant is exactly what this integral requires: , so dividing by (and rescaling by ) gives total area 1. There is no elementary antiderivative of , so this value comes from a different argument, while convergence alone follows from comparison: for , , so , and is finite (Example 3 does the same for ).
The mean of a continuous random variable is , another improper integral. Normalization does not guarantee that it converges, and Example 4 shows densities where it fails.
Worked Examples
Example 1: the -integrals with numbers
Compute and for growing :
textb int_1^b x^-2 int_1^b x^-1 int_1^b x^(-1/2) 10 0.9 2.3026 4.3246 100 0.99 4.6052 18.0 1000 0.999 6.9078 61.2456 1000000 0.999999 13.8155 1998.0
The first column settles at , so . The other two keep growing without bound, so and diverge. Note how slow is: it needs to reach about . A table of values can suggest divergence but the formula is what proves it.
Near zero the roles reverse. , which tends to as , so even though the integrand is unbounded. But grows without bound, so diverges.
Example 2: two traps
Across a singularity. Consider . The antiderivative gives , a negative answer for a positive integrand, which already signals a mistake. The function is not continuous at , so the Fundamental Theorem does not apply on . Splitting at gives , which is for and tends to . The integral diverges to .
A symmetric limit. For , the symmetric limit is . But , so diverges. Cutting the line at and instead gives , a different "answer". When the two halves are not each convergent, the value depends on how the cuts are taken, so no value is assigned.
Example 3: comparison in both directions
Convergence. For we have , hence . Since converges, converges and is at most . Numerical integration gives , consistent with the bound. Together with the part over , which is an ordinary integral, and symmetry, this gives convergence on the whole line.
Divergence. For , . Because diverges, so does . The partial integrals confirm it:
textb int_1^b (2+sin x)/x lower bound ln b 100 9.83 4.61 10000 19.05 9.21 1000000 28.26 13.82
The oscillation of does not rescue convergence: the bound keeps the integrand above a divergent integral.
Example 4: densities, tails, and missing means
Exponential. For rate , on has , so the total area is , and . With and this is .
Pareto. For , on integrates to by the -test with . The mean is , which converges only for , with value . For the mean is and for it is . For the density is valid but for is and never levels off: the mean does not exist.
Cauchy. The density has , but takes the values at and diverges. By symmetry the left half diverges to , so the mean does not exist, even though the symmetric limit would suggest (the trap from Example 2).
Unbounded height. The density on has total area as a Type II integral at both ends, yet and is unbounded. The remark in continuous-random-variables-and-pdfs that a density's height can exceed is therefore not a small effect: there is no upper bound at all.
Common Misconceptions & Pitfalls
- "If then converges." The function tends to and its integral diverges. The rate matters, which is why the -test has a threshold at .
- "If converges then ." True when is non-negative and non-increasing, but false in general, even for non-negative continuous . Place a triangular spike of height and base width around each integer . Its area is , and the total area is the series (series are the topic of
infinite-series-and-partial-sums). The integral converges while keeps returning to height . - "Apply the antiderivative anyway, the answer is a number." Across a discontinuity inside the interval the Fundamental Theorem does not apply, and the formal answer can even have the wrong sign (Example 2).
- "A symmetric interval means the answer is for an odd function." Only when each half converges. Otherwise is not a number.
- "Comparison works with any inequality." It needs on the whole tail, continuity, and the correct direction: a convergent upper bound forces convergence, a divergent lower bound forces divergence, and the other two combinations prove nothing.
- "A density that integrates to has a mean." Example 4 gives the Pareto density with and the Cauchy density, where the mean integral diverges.
Summary
An improper integral replaces an endpoint at infinity, or a point where the integrand blows up, by a limit of ordinary integrals, and it converges only when that limit is finite. For a doubly infinite interval or an interior singularity, each piece must converge separately. The -test is the benchmark: converges exactly when (value ), while converges exactly when (value ). The comparison theorem decides convergence for non-negative continuous integrands by trapping them against a -integral. These tools turn "the total area under a density is 1" into a checkable statement about a limit, and they show that moments such as the mean can fail to exist even for a valid density. The next lesson, sequences-and-convergence, applies the same limit idea to lists of numbers instead of areas.