30 min read

Every definite integral you have met since Chapter 13 lived inside two comfortable assumptions. The interval $[a, b]$ was closed and bounded, and the integrand was bounded on it. Under those conditions a Riemann sum has a fighting chance: finitely...

Prerequisites

  • chapter-14-fundamental-theorem-of-calculus
  • chapter-15-integration-techniques-i
  • chapter-16-integration-techniques-ii

Learning Objectives

  • Define an improper integral as a limit of proper integrals
  • Evaluate Type 1 improper integrals (infinite limits) using the FTC-plus-limits approach
  • Handle Type 2 improper integrals (infinite integrands) at boundary or interior points
  • Apply the p-integral rules to determine convergence at a glance
  • Use the comparison test and the limit comparison test to decide convergence without evaluating
  • Compute integrals involving the Gamma function and connect them to the factorial
  • Recognize the Gaussian integral as the normalization behind the normal distribution

Improper Integrals: When the Limits Stretch to Infinity

Every definite integral you have met since Chapter 13 lived inside two comfortable assumptions. The interval $[a, b]$ was closed and bounded, and the integrand was bounded on it. Under those conditions a Riemann sum has a fighting chance: finitely many rectangles of finite height cover a finite stretch of the axis, and the Fundamental Theorem of Calculus (Chapter 14) cashes the whole thing out as a single subtraction $F(b) - F(a)$.

But the integrals that matter most in physics, probability, and statistics routinely break one of those assumptions. Consider four that we cannot yet handle:

  • $\displaystyle\int_0^\infty e^{-x}\,dx$ — the upper limit runs off to infinity.
  • $\displaystyle\int_{-\infty}^\infty e^{-x^2/2}\,dx$ — both limits are infinite; this is the area under the bell curve.
  • $\displaystyle\int_0^1 \frac{1}{\sqrt{x}}\,dx$ — the integrand blows up at the left endpoint $x = 0$.
  • $\displaystyle\int_{-1}^1 \frac{1}{x^2}\,dx$ — the integrand blows up at the interior point $x = 0$.

These are improper integrals: definite integrals where the interval is unbounded, the integrand is unbounded, or both. The strategy is the same in every case and it is the only honest thing to do — retreat to a proper integral we can compute, then take a limit and watch what happens.

The Key Insight. An improper integral is not a new kind of integral. It is an ordinary definite integral with a limit wrapped around it. The single question that organizes this entire chapter is: does that limit exist as a finite number? If yes, the integral converges; if no, it diverges. Everything else — the p-rules, the comparison tests, the Gamma function — is machinery for answering that one question.

Improper integrals turn up wherever a quantity is spread over an unbounded domain or concentrated near a singularity: total drug exposure over all future time, the potential energy of a point charge, the normalization of a probability density, the Laplace and Fourier transforms of signal processing. Knowing how to evaluate them — or, when no formula exists, at least to decide whether they converge — is essential equipment. This chapter is also a quiet rehearsal for Chapter 22, where the integral test will use exactly this machinery to settle the convergence of infinite series.


17.1 Type 1: Infinite Limits of Integration

Begin with the cleaner case: a bounded integrand on an unbounded interval.

Definition (Type 1). If $f$ is continuous on $[a, \infty)$, define

$$\int_a^\infty f(x)\,dx := \lim_{t \to \infty} \int_a^t f(x)\,dx.$$

If the limit exists and is finite, the integral converges to that value. Otherwise it diverges. Symmetrically, for a function continuous on $(-\infty, b]$,

$$\int_{-\infty}^b f(x)\,dx := \lim_{s \to -\infty} \int_s^b f(x)\,dx.$$

For a doubly infinite interval, split at any convenient point $c$:

$$\int_{-\infty}^\infty f(x)\,dx := \int_{-\infty}^c f(x)\,dx + \int_c^\infty f(x)\,dx.$$

Both halves must converge separately. You are not allowed to let a positive infinity on the right cancel a negative infinity on the left; the choice of splitting point $c$ must not change the answer, and that only works if each piece is finite on its own.

Geometric Intuition. Picture the region under $y = f(x)$ stretching forever to the right. The proper integral $\int_a^t f$ is the area of the part you have shaded so far, out to a movable wall at $x = t$. As you slide the wall toward infinity, you keep sweeping in more area. The integral converges exactly when that accumulated area approaches a finite ceiling — the region has an infinite base but, remarkably, a finite area, because the curve hugs the axis fast enough that the new slivers shrink to nothing. Divergence means the area keeps climbing without bound.

Warning. Do not confuse the genuine integral $\int_{-\infty}^\infty f$ with the Cauchy principal value $\displaystyle\operatorname{PV}\!\int_{-\infty}^\infty f := \lim_{T \to \infty} \int_{-T}^T f$, which forces the two limits to march outward in lockstep. The principal value can be finite even when the true integral diverges. For example, each half of $\int_{-\infty}^\infty x\,dx$ diverges, so the integral does not exist — yet its principal value is $0$ by symmetry, because $\int_{-T}^T x\,dx = 0$ for every $T$. The principal value is a useful regularization (it appears in complex analysis and signal processing), but it is a different object. We return to it in §17.7.

Worked Example 17.1.1 — A convergent integral

Evaluate $\displaystyle\int_1^\infty \frac{1}{x^2}\,dx$.

Compute the proper integral first, then take the limit:

$$\int_1^t \frac{1}{x^2}\,dx = \left[-\frac{1}{x}\right]_1^t = -\frac{1}{t} + 1.$$

As $t \to \infty$, $-1/t \to 0$, so the expression tends to $1$. The integral converges to $1$. The region under $y = 1/x^2$ from $1$ to infinity is infinitely long yet has total area exactly $1$.

Worked Example 17.1.2 — A divergent integral

Evaluate $\displaystyle\int_1^\infty \frac{1}{x}\,dx$.

$$\int_1^t \frac{1}{x}\,dx = \big[\ln x\big]_1^t = \ln t.$$

As $t \to \infty$, $\ln t \to \infty$. The integral diverges.

Look at how slim the margin is. The two integrands differ only in the exponent — $1/x^2$ versus $1/x^1$ — yet one encloses a finite area and the other does not. The function $1/x$ decays to zero, but it decays too slowly: the logarithm grows without bound, just very lazily. This razor's edge between $p = 1$ and $p > 1$ is the single most important boundary in the theory of convergence, and we are about to name it.

Worked Example 17.1.3 — Exponential decay

Evaluate $\displaystyle\int_0^\infty e^{-x}\,dx$.

$$\int_0^t e^{-x}\,dx = \big[-e^{-x}\big]_0^t = -e^{-t} + 1.$$

As $t \to \infty$, $e^{-t} \to 0$, so the integral converges to $1$. Exponential decay dies off so much faster than any power of $x$ that the area is tame. This basic integral underlies radioactive decay, pharmacokinetics, and the exponential probability distribution; we will see all three before the chapter ends.

The p-Integral at Infinity

Examples 17.1.1 and 17.1.2 are the two faces of a single rule. For $a > 0$ and a real exponent $p$,

$$\int_a^\infty \frac{1}{x^p}\,dx = \begin{cases} \dfrac{a^{1-p}}{p - 1}, & p > 1 \quad (\text{converges}),\\[2mm] \text{diverges}, & p \le 1. \end{cases}$$

Derivation. For $p \neq 1$,

$$\int_a^t x^{-p}\,dx = \frac{x^{1-p}}{1-p}\bigg|_a^t = \frac{t^{1-p} - a^{1-p}}{1-p}.$$

As $t \to \infty$, the term $t^{1-p}$ tends to $0$ when the exponent $1 - p < 0$ (that is, $p > 1$) and blows up when $1 - p > 0$ (that is, $p < 1$). In the convergent case the limit is $\dfrac{-a^{1-p}}{1-p} = \dfrac{a^{1-p}}{p-1}$. For the boundary case $p = 1$, Example 17.1.2 already showed divergence via the logarithm. $\blacksquare$

This p-integral rule is the most-used convergence test in all of practice. Commit it to memory in one sentence: at infinity, you need $p$ strictly greater than $1$ to converge. Faster-than-$1/x$ decay wins; $1/x$ itself loses.

Check Your Understanding. Without computing, which of these converge? (a) $\int_1^\infty x^{-3/2}\,dx$, (b) $\int_1^\infty x^{-1/2}\,dx$, (c) $\int_2^\infty \frac{1}{x\sqrt{x}}\,dx$.

AnswerRead off the exponent $p$ and compare to $1$. (a) $p = 3/2 > 1$: converges. (b) $p = 1/2 \le 1$: diverges (decay too slow). (c) Rewrite $\frac{1}{x\sqrt{x}} = x^{-3/2}$, so $p = 3/2 > 1$: converges. Only the decay rate matters, not the starting point $a$.

Worked Example 17.1.4 — A doubly infinite integral

Evaluate $\displaystyle\int_{-\infty}^\infty \frac{1}{1+x^2}\,dx$.

Split at $0$ and handle each half. The antiderivative of $1/(1+x^2)$ is $\arctan x$, so

$$\int_0^\infty \frac{1}{1+x^2}\,dx = \lim_{t\to\infty}\big[\arctan x\big]_0^t = \frac{\pi}{2} - 0 = \frac{\pi}{2}.$$

The integrand is even, so the left half contributes another $\pi/2$. Both halves are finite, so the integral converges and the total is

$$\int_{-\infty}^\infty \frac{1}{1+x^2}\,dx = \frac{\pi}{2} + \frac{\pi}{2} = \pi.$$

This is the (unnormalized) Cauchy distribution. What makes it striking is that the integrand decays only like $1/x^2$ at the tails — barely fast enough for $p > 1$ to apply — yet the bounded curve encloses a finite area $\pi$ over the entire real line. A purely algebraic integrand has handed us $\pi$ again, just as it did in Chapter 14. The Cauchy distribution is also famous for having no finite mean: $\int_{-\infty}^\infty x \cdot \frac{1}{\pi(1+x^2)}\,dx$ diverges (its integrand decays like $1/x$), a vivid reminder that convergence depends entirely on the tail's decay rate.


17.2 Type 2: Infinite Integrands

The second failure mode keeps the interval finite but lets the integrand explode at a point.

Definition (Type 2, endpoint singularity). If $f$ is continuous on $[a, b)$ but unbounded as $x \to b^-$, define

$$\int_a^b f(x)\,dx := \lim_{t \to b^-} \int_a^t f(x)\,dx,$$

and symmetrically with $\lim_{t \to a^+}$ if the blow-up is at the left endpoint.

Definition (interior singularity). If $f$ blows up at an interior point $c \in (a, b)$, split there:

$$\int_a^b f(x)\,dx := \lim_{t \to c^-} \int_a^t f(x)\,dx + \lim_{s \to c^+} \int_s^b f(x)\,dx.$$

Again, both one-sided pieces must converge separately. This is where the most expensive mistake in the whole chapter lives.

Common Pitfall. Many students evaluate $\int_{-1}^1 \frac{1}{x^2}\,dx$ by blindly applying the FTC bar: $\big[-\tfrac{1}{x}\big]_{-1}^1 = -1 - (1) = -2$. But this answer is not merely wrong, it is absurd — the integrand $1/x^2$ is positive everywhere, so any honest area must be positive, not $-2$. The error is fatal: $1/x^2$ blows up at the interior point $x = 0$, so the integrand is not continuous on $[-1,1]$ and FTC Part 2 (Chapter 14, §14.4) simply does not apply. Splitting at $0$ reveals the truth: each half, $\int_0^1 1/x^2\,dx$, diverges (it is a p-integral at zero with $p = 2 \ge 1$), so the whole integral diverges. Always scan the integrand for singularities inside the interval before reaching for an antiderivative.

Worked Example 17.2.1 — An integrable singularity

Evaluate $\displaystyle\int_0^1 \frac{1}{\sqrt{x}}\,dx$.

The integrand $x^{-1/2}$ blows up at $x = 0$, so this is improper at the left endpoint. Pull the lower limit back to $t > 0$ and take a limit:

$$\int_t^1 \frac{1}{\sqrt{x}}\,dx = \big[2\sqrt{x}\big]_t^1 = 2 - 2\sqrt{t}.$$

As $t \to 0^+$, $\sqrt{t} \to 0$, so the integral converges to $2$. Even though $1/\sqrt{x}$ rises to infinity as $x \to 0$, the spike is narrow enough that the area beneath it — over the whole interval $(0, 1]$ — is exactly $2$. Such a singularity is called integrable.

Worked Example 17.2.2 — A non-integrable singularity

Evaluate $\displaystyle\int_0^1 \frac{1}{x}\,dx$.

$$\int_t^1 \frac{1}{x}\,dx = \big[\ln x\big]_t^1 = 0 - \ln t = -\ln t.$$

As $t \to 0^+$, $\ln t \to -\infty$, so $-\ln t \to +\infty$ and the integral diverges. Once again the difference between converging and diverging is a single notch in the exponent: $1/\sqrt{x}$ has $p = 1/2$ and converges, while $1/x$ has $p = 1$ and diverges. Notice that near the origin, $1/x$ rises faster than $1/\sqrt{x}$ — the steeper the spike, the more likely the area is infinite.

The p-Integral at Zero

These two examples are again the faces of a single rule — but the inequality flips. For $a > 0$,

$$\int_0^a \frac{1}{x^p}\,dx = \begin{cases} \dfrac{a^{1-p}}{1 - p}, & p < 1 \quad (\text{converges}),\\[2mm] \text{diverges}, & p \ge 1. \end{cases}$$

Derivation. For $p \neq 1$, $\int_t^a x^{-p}\,dx = \dfrac{a^{1-p} - t^{1-p}}{1-p}$. As $t \to 0^+$, the term $t^{1-p} \to 0$ precisely when $1 - p > 0$, i.e. $p < 1$, leaving the finite value $a^{1-p}/(1-p)$. When $p > 1$, $t^{1-p} \to \infty$ and the integral diverges; the case $p = 1$ diverges by Example 17.2.2. $\blacksquare$

The Key Insight. The two p-rules are mirror images, and the mirror is the line $p = 1$: $$\int_1^\infty \frac{dx}{x^p} \text{ converges} \iff p > 1, \qquad \int_0^1 \frac{dx}{x^p} \text{ converges} \iff p < 1.$$ At infinity you need fast decay (large $p$). At zero you need a mild blow-up (small $p$). The exponent $p = 1$ — the function $1/x$ — fails on both ends. It is the universal borderline, and that is no accident: $1/x$ is the unique power whose antiderivative is the logarithm rather than another power, and the logarithm grows and decays just slowly enough to straddle the line.

Geometric Intuition. Picture $1/x^p$ near $x = 0$. A small exponent $p$ produces a gentle spike — tall but quickly tamed — so the area underneath is finite. A large exponent produces a violent spike that walls off infinite area against the $y$-axis. The same shape, read from the right as $x \to \infty$, reverses the verdict: a gentle decay (small $p$) leaves an infinitely long tail too thick to have finite area, while a steep decay (large $p$) clamps the tail to the axis fast enough to converge.

Worked Example 17.2.3 — An interior discontinuity, handled correctly

Evaluate, or show divergence of, $\displaystyle\int_0^2 \frac{1}{(x-1)^{2/3}}\,dx$.

The integrand blows up at the interior point $x = 1$, so split there into two improper pieces:

$$\int_0^1 \frac{dx}{(x-1)^{2/3}} + \int_1^2 \frac{dx}{(x-1)^{2/3}}.$$

For the right piece, substitute $u = x - 1$ (so $du = dx$); the limits run $u: 0 \to 1$:

$$\int_1^2 \frac{dx}{(x-1)^{2/3}} = \int_0^1 u^{-2/3}\,du = \big[3u^{1/3}\big]_0^1 = 3.$$

This is a p-integral at zero with $p = 2/3 < 1$, so it converges, and the value is $3$. By the mirror symmetry $u \mapsto -u$, the left piece equals $3$ as well. The total is $6$, and the integral converges. The lesson of the pitfall stands: split first, then evaluate — but when each half genuinely converges, the split delivers an honest finite answer.


17.3 Convergence Tests: Deciding Without Evaluating

Most improper integrals you meet in the wild have no elementary antiderivative — there is nothing to plug into the FTC bar. Yet you can often still answer the only question that matters (does it converge?) by comparing the integrand to one you understand. This is the same strategic move that will reappear, almost word for word, as the comparison test for series in Chapter 22.

The Comparison Test

Theorem (Direct Comparison). Suppose $0 \le f(x) \le g(x)$ for all $x \ge a$.

  • If $\displaystyle\int_a^\infty g\,dx$ converges, then $\displaystyle\int_a^\infty f\,dx$ converges.
  • If $\displaystyle\int_a^\infty f\,dx$ diverges, then $\displaystyle\int_a^\infty g\,dx$ diverges.

In plain language: a smaller positive function cannot enclose more area than a larger one. If the bigger curve already pens in finite area, the smaller one is trapped beneath it and must too. Contrapositively, if the smaller curve already encloses infinite area, the bigger one — sitting above it — has no choice but to diverge as well. The identical statement holds for Type 2 integrals with a singularity.

Worked Example 17.3.1 — Squeezing from above

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

For $x \ge 1$ we have $x^2 + 1 > x^2 > 0$, so $\dfrac{1}{x^2+1} < \dfrac{1}{x^2}$. The larger function $1/x^2$ has a convergent integral (p-rule, $p = 2 > 1$, Example 17.1.1). By direct comparison, the smaller integral converges. We did not need its value — though in this lucky case we know it exactly: $\big[\arctan x\big]_1^\infty = \pi/2 - \pi/4 = \pi/4$. The comparison was the cheap way to certify finiteness; evaluation is a bonus.

Worked Example 17.3.2 — Squeezing from below

Determine whether $\displaystyle\int_1^\infty \frac{e^x}{x}\,dx$ converges.

For $x \ge 1$ we have $e^x \ge e \ge 1$, so $\dfrac{e^x}{x} \ge \dfrac{1}{x} > 0$. The smaller function $1/x$ has a divergent integral (p-rule, $p = 1$, Example 17.1.2). Since our integrand dominates a divergent one, it must diverge too. (Of course $e^x/x$ grows explosively, so divergence is no surprise — but the comparison makes the verdict rigorous in one line.)

The Limit Comparison Test

Direct comparison demands an honest inequality, which can be fiddly to arrange. The limit comparison test trades the inequality for a single limit and is usually faster.

Theorem (Limit Comparison). Let $f, g > 0$ on $[a, \infty)$ and suppose

$$\lim_{x \to \infty} \frac{f(x)}{g(x)} = c, \qquad 0 < c < \infty.$$

Then $\displaystyle\int_a^\infty f$ and $\displaystyle\int_a^\infty g$ either both converge or both diverge.

The idea is that if the ratio settles to a finite positive constant, then far out in the tail — where convergence is decided — $f$ behaves like a fixed multiple of $g$, and a constant multiple never changes whether an integral is finite.

Worked Example 17.3.3 — Choosing the comparison by degree

Determine whether $\displaystyle\int_1^\infty \frac{2x + 1}{x^3 + 5}\,dx$ converges.

For large $x$ the integrand behaves like $\dfrac{2x}{x^3} = \dfrac{2}{x^2}$, so compare against $g(x) = 1/x^2$. The limit of the ratio is

$$\lim_{x\to\infty} \frac{(2x+1)/(x^3+5)}{1/x^2} = \lim_{x\to\infty}\frac{(2x+1)\,x^2}{x^3 + 5} = \lim_{x\to\infty}\frac{2x^3 + x^2}{x^3 + 5} = 2.$$

The limit $c = 2$ is finite and positive. Since $\int_1^\infty 1/x^2\,dx$ converges (p-rule), our integral converges as well. The trick is always the same: keep only the leading powers of the numerator and denominator to guess the comparison function $1/x^p$, then confirm with the limit.

Common Pitfall. Both comparison tests as stated require the functions to be non-negative (at least eventually). If the integrand changes sign — like $\sin x / x$ — you cannot apply them directly. The standard fix is to test the absolute value $|f|$ for convergence: if $\int |f|$ converges, then $\int f$ converges too (this is absolute convergence, §17.7). But the converse fails, and integrals that converge only because of sign cancellation, not size, are the subtle case we treat at the end of the chapter.

Real-World Application — Tail risk in finance and physics (data science / physics). In quantitative finance, whether a model's loss distribution has a finite variance hinges on whether $\int x^2 p(x)\,dx$ converges in the tails — a comparison-test question. "Heavy-tailed" distributions like the Cauchy (Example 17.1.4) fail this test, which is exactly why naive risk models that assume finite variance can catastrophically underestimate extreme events. The same mathematics decides whether a physical field's total energy $\int |E(x)|^2\,dx$ is finite: an idealized point charge has $E \sim 1/r^2$, and its self-energy integral $\int_0^\infty (1/r^2)^2 \, r^2\,dr$ diverges at $r = 0$ — the famous infinite self-energy of a point particle, diagnosed by a p-integral with $p = 2$.


17.4 The Gamma Function: Generalizing the Factorial

One improper integral is so important that it earns its own name and symbol. The Gamma function is defined for $s > 0$ by

$$\Gamma(s) = \int_0^\infty x^{s-1} e^{-x}\,dx.$$

This integral is improper at both ends when $0 < s < 1$: the upper limit is infinite, and the factor $x^{s-1}$ blows up at $x = 0$. Yet it converges for every $s > 0$. The exponential $e^{-x}$ crushes the tail at infinity (beating every power, so the upper end converges by comparison with, say, $e^{-x/2}$), while near zero the integrand behaves like $x^{s-1}$, an integrable singularity precisely when $s - 1 > -1$, i.e. $s > 0$. The two convergence conditions we built in §17.1 and §17.2 conspire to make $\Gamma(s)$ well-defined exactly on $(0, \infty)$.

The Three Defining Properties

Recursion: $\Gamma(s+1) = s\,\Gamma(s)$. Integrate by parts with $u = x^s$ and $dv = e^{-x}\,dx$, so $du = s x^{s-1}\,dx$ and $v = -e^{-x}$:

$$\Gamma(s+1) = \int_0^\infty x^s e^{-x}\,dx = \underbrace{\big[-x^s e^{-x}\big]_0^\infty}_{=\,0} + s\int_0^\infty x^{s-1} e^{-x}\,dx = s\,\Gamma(s).$$

The boundary term vanishes at both ends: at infinity because $e^{-x}$ overwhelms $x^s$, and at zero because $x^s \to 0$ for $s > 0$.

Base case: $\Gamma(1) = 1$. Directly, $\Gamma(1) = \int_0^\infty e^{-x}\,dx = 1$ — the exponential-decay integral from Example 17.1.3.

Factorial: $\Gamma(n) = (n-1)!$ for positive integers $n$. Combine the two: $\Gamma(2) = 1\cdot\Gamma(1) = 1 = 1!$, $\Gamma(3) = 2\cdot\Gamma(2) = 2 = 2!$, and by induction $\Gamma(n) = (n-1)!$.

So $\Gamma$ is the factorial, smoothed out into a continuous (indeed infinitely differentiable) function. It assigns a meaningful value to $\Gamma(1/2)$, $\Gamma(\pi)$, or $\Gamma(\sqrt{2})$ — quantities for which "$(s-1)!$" would otherwise be nonsense.

Historical Note. Leonhard Euler introduced the Gamma function around 1729 while answering a question posed by Christian Goldbach: is there a natural formula that interpolates the factorials $1, 2, 6, 24, \ldots$ at non-integer points? Euler's integral was the answer. The name "Gamma" and the now-standard notation $\Gamma(s)$ — with its awkward shift $\Gamma(n) = (n-1)!$ — are due to Adrien-Marie Legendre decades later. Many mathematicians have since grumbled that Legendre's offset was a mistake; the cleaner choice would have made $\Gamma(n) = n!$. We are stuck with it.

The Famous Half-Integer Value

$\Gamma(1/2) = \sqrt{\pi}$. Start from the definition and substitute $x = u^2$, $dx = 2u\,du$:

$$\Gamma\!\left(\tfrac12\right) = \int_0^\infty x^{-1/2} e^{-x}\,dx = \int_0^\infty u^{-1} e^{-u^2}\,(2u\,du) = 2\int_0^\infty e^{-u^2}\,du.$$

That last integral is half of the Gaussian integral we are about to meet: $\int_0^\infty e^{-u^2}\,du = \tfrac{\sqrt{\pi}}{2}$ (proved by polar coordinates in Chapter 32). Therefore $\Gamma(1/2) = 2 \cdot \tfrac{\sqrt{\pi}}{2} = \sqrt{\pi}$. The appearance of $\sqrt{\pi}$ inside a function built to generalize factorials is one of the lovely surprises of analysis.

Feeding this through the recursion generates the whole half-integer ladder:

$$\Gamma\!\left(\tfrac32\right) = \tfrac12\,\Gamma\!\left(\tfrac12\right) = \frac{\sqrt{\pi}}{2}, \quad \Gamma\!\left(\tfrac52\right) = \tfrac32\cdot\tfrac12\,\Gamma\!\left(\tfrac12\right) = \frac{3\sqrt{\pi}}{4}, \quad \Gamma\!\left(\tfrac72\right) = \tfrac52\cdot\tfrac32\cdot\tfrac12\,\Gamma\!\left(\tfrac12\right) = \frac{15\sqrt{\pi}}{8}.$$

Check Your Understanding. Use the recursion $\Gamma(s+1) = s\Gamma(s)$ and $\Gamma(1) = 1$ to evaluate $\Gamma(5)$, and use $\Gamma(1/2) = \sqrt{\pi}$ to evaluate $\Gamma(9/2)$.

Answer$\Gamma(5) = 4! = 24$ (since $\Gamma(n) = (n-1)!$). For the half-integer, climb one more rung: $\Gamma(9/2) = \tfrac72\,\Gamma(7/2) = \tfrac72\cdot\tfrac{15\sqrt{\pi}}{8} = \tfrac{105\sqrt{\pi}}{16}$.

Why the Gamma Function Matters

$\Gamma$ is not a curiosity; it is structural glue across applied mathematics. It supplies the normalization constants of the Gamma and Beta probability distributions, the moment formulas for many continuous distributions, generalized binomial coefficients in combinatorics, and the closed forms of countless special-function integrals (Bessel functions, the hypergeometric series). It even shows up in number theory, inside the functional equation of the Riemann zeta function. The closely related Beta function $B(a, b) = \int_0^1 x^{a-1}(1-x)^{b-1}\,dx$ satisfies $B(a,b) = \Gamma(a)\Gamma(b)/\Gamma(a+b)$ and governs the Beta distribution used throughout Bayesian statistics.

For numerical work, never integrate by hand — call the library, which uses far more accurate rational approximations than direct quadrature near the singularity.

# Verify the Gamma function values computed by hand above.
from scipy.special import gamma
import numpy as np

print(f"Gamma(5)   = {gamma(5):.6f}   (should be 4! = 24)")
# Gamma(5)   = 24.000000   (should be 4! = 24)

print(f"Gamma(0.5) = {gamma(0.5):.6f}   (should be sqrt(pi) = {np.sqrt(np.pi):.6f})")
# Gamma(0.5) = 1.772454   (should be sqrt(pi) = 1.772454)

print(f"Gamma(2.5) = {gamma(2.5):.6f}   (should be 3*sqrt(pi)/4 = {3*np.sqrt(np.pi)/4:.6f})")
# Gamma(2.5) = 1.329340   (should be 3*sqrt(pi)/4 = 1.329340)

Computational Note. Notice we did not hand scipy.integrate.quad the raw integrand $x^{s-1}e^{-x}$ for $s < 1$. Near $x = 0$ that integrand has an integrable singularity, and general-purpose quadrature can lose precision sampling the spike. The dedicated routine scipy.special.gamma sidesteps the integral entirely with a stable approximation (the Lanczos formula). The broad lesson recurs throughout numerical calculus: when an integral has a known closed form or a specialized routine, prefer it to brute-force quadrature, especially near singularities.


17.5 The Gaussian Integral and the Normal Curve

We reach the most celebrated improper integral in all of mathematics, the Gaussian integral:

$$\int_{-\infty}^\infty e^{-x^2}\,dx = \sqrt{\pi}.$$

Two facts about it sit in beautiful tension. First, the integrand $e^{-x^2}$ has no elementary antiderivative — there is no formula built from polynomials, roots, exponentials, logarithms, and trig functions whose derivative is $e^{-x^2}$. (This is a theorem of Liouville, the same result that confounded us in Chapter 14, §14.12; the antiderivative is christened the error function $\operatorname{erf}$.) Second, despite that, the definite integral over the entire real line is the clean, exact value $\sqrt{\pi}$.

How can we know the value of an integral whose antiderivative we provably cannot write down? Not by the FTC bar — that road is closed. The trick is to leave one dimension behind and work in two. Square the integral and reinterpret the product as a double integral over the plane:

$$I^2 = \left(\int_{-\infty}^\infty e^{-x^2}\,dx\right)\!\left(\int_{-\infty}^\infty e^{-y^2}\,dy\right) = \iint_{\mathbb{R}^2} e^{-(x^2+y^2)}\,dx\,dy.$$

In polar coordinates the radially symmetric integrand $e^{-r^2}$ becomes elementary, and the double integral evaluates to $\pi$, whence $I = \sqrt{\pi}$. We have neither the double integrals nor the polar change of variables yet — both arrive in Chapter 32 — so we record the result now and prove it then.

Geometric Intuition. The reason the two-dimensional approach succeeds is symmetry. The surface $z = e^{-(x^2+y^2)}$ is a smooth bell-shaped hill that is perfectly round when viewed from above — it depends only on the distance $r$ from the origin. Slicing it into thin rings rather than thin strips turns the stubborn one-dimensional integral into an elementary one, because along each ring the height is constant. A problem with no answer in 1D dissolves the moment you give it room to breathe in 2D. This is a recurring motif in mathematics: the hard problem is often the projection of an easy one.

The payoff is the normal distribution, the anchor example introduced back in Chapter 13. The standard normal density is

$$\phi(x) = \frac{1}{\sqrt{2\pi}}\,e^{-x^2/2},$$

and its defining requirement is that total probability equals $1$: $\int_{-\infty}^\infty \phi(x)\,dx = 1$. Substituting $u = x/\sqrt{2}$ turns the integral $\int_{-\infty}^\infty e^{-x^2/2}\,dx$ into $\sqrt{2}\int_{-\infty}^\infty e^{-u^2}\,du = \sqrt{2}\cdot\sqrt{\pi} = \sqrt{2\pi}$. That is exactly where the normalization constant $1/\sqrt{2\pi}$ comes from. Every time you see $\sqrt{2\pi}$ in a statistics formula, you are looking at the Gaussian integral in disguise.

The Key Insight. A one-dimensional integral that cannot be evaluated by any antiderivative can nonetheless be computed exactly by lifting it into two dimensions and exploiting symmetry. The mysterious factor $\sqrt{2\pi}$ that normalizes every bell curve in every statistics textbook is not arbitrary — it is $\sqrt{\pi}$ from the Gaussian integral, dressed up by a change of variables. Chapter 32 supplies the full proof; Chapter 23 returns to this same curve to compute its (non-elementary) antiderivative with Taylor series.

Computational Note. Numerically the Gaussian integral is easy, because scipy.integrate.quad handles infinite limits by an internal change of variables that maps $(0, \infty)$ to a finite interval.

```python

Confirm the half-line Gaussian integral equals sqrt(pi)/2.

from scipy.integrate import quad import numpy as np

result, abserr = quad(lambda x: np.exp(-x**2), 0, np.inf) print(f"integral 0..inf of e^(-x^2) = {result:.6f}") # 0.886227 print(f"sqrt(pi)/2 = {np.sqrt(np.pi)/2:.6f}") # 0.886227 ```


17.6 Applications

Improper integrals are not an exotic corner of calculus; they are the workaday tool for any quantity spread over an unbounded domain. Four examples, drawn from four different fields, show the range.

Drug Exposure (biology / medicine)

In Chapter 15 we modeled a drug's blood concentration as exponential decay $C(t) = C_0 e^{-kt}$. The single most important pharmacokinetic quantity, the area under the concentration curve (AUC), is the total exposure accumulated over all future time:

$$\text{AUC} = \int_0^\infty C_0 e^{-kt}\,dt = C_0\left[-\frac{1}{k}e^{-kt}\right]_0^\infty = \frac{C_0}{k}.$$

This improper integral converges only because exponential decay outruns the lengthening interval. Regulators require AUC to prove that two formulations of a drug are bioequivalent — a question of dosing safety decided by an integral over infinite time.

Probability Normalization (data science / statistics)

A function $f$ is a legitimate continuous probability density only if its total integral equals $1$:

$$\int_{-\infty}^\infty f(x)\,dx = 1.$$

For any distribution with unbounded support — normal, exponential, Gamma, Cauchy — this is an improper integral, and the requirement that it converge to exactly $1$ is what defines the normalizing constant. For the exponential density $f(x) = \lambda e^{-\lambda x}$ on $[0, \infty)$, $\int_0^\infty \lambda e^{-\lambda x}\,dx = 1$ automatically; for the normal density the constant $1/\sqrt{2\pi}$ comes from the Gaussian integral of §17.5. No finite total probability, no valid distribution.

Escape Velocity (physics)

The minimum speed needed to escape Earth's gravity from radius $r_0$ is found by equating the launch kinetic energy to the work done against gravity all the way to infinity:

$$\frac{1}{2}m v_e^2 = \int_{r_0}^\infty \frac{GMm}{r^2}\,dr = GMm\left[-\frac{1}{r}\right]_{r_0}^\infty = \frac{GMm}{r_0}.$$

The improper integral converges because the gravitational force falls off like $1/r^2$ — a p-integral with $p = 2 > 1$, comfortably on the convergent side. Solving for the escape velocity gives

$$v_e = \sqrt{\frac{2GM}{r_0}} \approx 11.2 \text{ km/s for Earth}.$$

Had gravity fallen off only like $1/r$ (the $p = 1$ borderline), the work integral would diverge and no finite velocity could ever escape — a striking case where the abstract convergence threshold of §17.1 has a literal physical meaning.

Laplace Transforms (engineering / signal processing)

The Laplace transform converts a function of time $t$ into a function of a frequency-like variable $s$:

$$\mathcal{L}\{f\}(s) = \int_0^\infty e^{-st} f(t)\,dt.$$

The transform itself is an improper integral, one whose convergence depends on $s$ being large enough that the decaying factor $e^{-st}$ tames the growth of $f$. Laplace transforms turn differential equations into algebra (Chapter 19 hints at this), and they are the backbone of control theory and circuit analysis. The closely related Fourier transform $\hat f(\omega) = \int_{-\infty}^\infty f(t) e^{-i\omega t}\,dt$ is an improper integral over the whole real line and underlies all of modern signal and image processing.

Real-World Application — The heat kernel (physics / engineering). The temperature in an infinite rod, given an initial profile $f$, is the improper convolution integral $u(x,t) = \int_{-\infty}^\infty \tfrac{1}{\sqrt{4\pi\alpha t}}\,e^{-(x-y)^2/(4\alpha t)} f(y)\,dy$. The weighting function is a Gaussian — the very curve of §17.5 — and the prefactor $1/\sqrt{4\pi\alpha t}$ is again the Gaussian normalization, guaranteeing total heat is conserved as it diffuses. Heat spreading through a solid, the price of a financial option (Black-Scholes is mathematically a heat equation), and the blurring of an image are all the same Gaussian integral at work.


17.7 Subtleties: Absolute vs. Conditional Convergence, and the Principal Value

So far every convergent integrand we examined was eventually one-signed, so its area simply accumulated. Sign-changing integrands open a more delicate world that exactly parallels the theory of series in Chapter 22.

Absolute convergence. An improper integral $\int f$ is absolutely convergent if $\int |f|$ converges. Absolute convergence is the strong, well-behaved kind: it implies ordinary convergence, it survives any comparison test, and numerical methods compute it reliably.

Conditional convergence. An integral can converge through cancellation of positive and negative areas even when the total unsigned area is infinite. The classic example is the Dirichlet integral:

$$\int_0^\infty \frac{\sin x}{x}\,dx = \frac{\pi}{2}, \qquad \text{yet} \qquad \int_0^\infty \left|\frac{\sin x}{x}\right|\,dx = \infty.$$

The integral converges only because successive humps of $\sin x / x$ alternate in sign and nearly cancel; their absolute sizes decay like $1/x$, too slowly for the area to be finite. Such an integral is conditionally convergent. The distinction is not academic: a conditionally convergent integral is fragile under numerical evaluation, because rounding errors disrupt the delicate cancellation.

The Cauchy principal value, revisited. Recall from §17.1 that some integrals fail to converge in the strict sense yet have a meaningful symmetric limit. For an interior singularity,

$$\operatorname{PV}\!\int_{-1}^1 \frac{1}{x}\,dx = \lim_{\varepsilon \to 0^+}\left[\int_{-1}^{-\varepsilon}\frac{dx}{x} + \int_{\varepsilon}^{1}\frac{dx}{x}\right] = \lim_{\varepsilon\to 0^+}\big[\ln\varepsilon - \ln\varepsilon\big] = 0.$$

The ordinary improper integral $\int_{-1}^1 (1/x)\,dx$ does not exist — each half diverges, and an asymmetric approach to the singularity gives any answer you like. The principal value forces a symmetric approach, and the matching infinities cancel to leave $0$. Principal-value integrals are indispensable in complex analysis and in the dispersion relations of physics, but always carry the "PV" label: dropping it asserts a convergence that is not there.

Math Major Sidebar — Why conditional convergence is genuinely weaker. The reason $\int_0^\infty |\sin x / x|\,dx$ diverges is a clean comparison. On each interval $[n\pi, (n+1)\pi]$ the hump $|\sin x|$ has area $\int_{n\pi}^{(n+1)\pi}|\sin x|\,dx = 2$, so $\int_{n\pi}^{(n+1)\pi}\frac{|\sin x|}{x}\,dx \ge \frac{2}{(n+1)\pi}$. Summing over $n$ gives a constant times the harmonic series $\sum \frac{1}{n+1}$, which diverges (the series analog of $\int 1/x$). Meanwhile the signed integral converges because the partial integrals $\int_0^T \frac{\sin x}{x}\,dx$ form a Cauchy-like alternating sequence whose oscillations shrink. This is the integral mirror of the alternating harmonic series $\sum (-1)^{n+1}/n = \ln 2$, which converges while $\sum 1/n$ diverges — a parallel made exact by the integral test of Chapter 22. Conditional convergence, in both worlds, is convergence that depends on the order and sign of summation, not on the sizes alone.


17.8 The Bridge to Series

Throughout this chapter, the same words keep reappearing — converges, diverges, comparison test, limit comparison, p. That is no coincidence. Improper integrals are the continuous shadow of infinite series, and the analogy is precise enough to become a theorem.

Improper integral Series analog
$\displaystyle\int_a^\infty f(x)\,dx$ $\displaystyle\sum_{n=a}^\infty f(n)$
$\displaystyle\int_1^\infty \frac{dx}{x^p}$ converges $\iff p>1$ $\displaystyle\sum_{n=1}^\infty \frac{1}{n^p}$ converges $\iff p>1$
comparison / limit-comparison tests comparison / limit-comparison tests
absolute vs. conditional convergence absolute vs. conditional convergence

The link is made rigorous by the integral test, which we prove in Chapter 22: if $f$ is positive, continuous, and decreasing on $[1, \infty)$, then the series $\sum_{n=1}^\infty f(n)$ and the integral $\int_1^\infty f(x)\,dx$ converge or diverge together. The proof is pure geometry — the series is a sum of rectangle areas that sandwich the area under the curve — and it lets you settle a series by computing an integral, or vice versa. Everything you have built here about p-integrals, comparison, and tail behavior transfers directly to the convergence of series. Improper integration is the dress rehearsal; series convergence is opening night.

Add to Your Modeling Portfolio. Add an improper integral over an unbounded domain to your model, and confirm it converges before you trust its value. Biology: compute total drug exposure $\text{AUC} = \int_0^\infty C_0 e^{-kt}\,dt = C_0/k$ for your pharmacokinetic model, and interpret it as cumulative dose. Economics: compute the present value of a perpetual income stream, $\int_0^\infty R\,e^{-rt}\,dt = R/r$ — an improper integral that converges precisely because the discount rate $r > 0$ guarantees exponential decay. Physics: compute the work-to-escape integral $\int_{r_0}^\infty \frac{GMm}{r^2}\,dr = GMm/r_0$ and derive your system's escape velocity. Data Science: verify that your chosen probability density normalizes to $1$, $\int_{-\infty}^\infty f(x)\,dx = 1$, and identify which Gaussian or Gamma constant makes it so.


17.9 A Final Curiosity: Gabriel's Horn

To close, an honest paradox that improper integrals resolve. Take the curve $y = 1/x$ for $x \ge 1$ and spin it around the $x$-axis. The resulting infinite trumpet is Gabriel's Horn.

Its volume is a convergent improper integral (we will derive the disk-method formula in Chapter 18):

$$V = \pi\int_1^\infty \frac{1}{x^2}\,dx = \pi\cdot 1 = \pi \quad (\text{finite!}).$$

Its surface area, however, diverges. The surface-area integral is bounded below by a divergent p-integral:

$$S = 2\pi\int_1^\infty \frac{1}{x}\sqrt{1 + \frac{1}{x^4}}\,dx \ \ge\ 2\pi\int_1^\infty \frac{1}{x}\,dx = \infty.$$

So Gabriel's Horn has finite volume but infinite surface area. You could fill it with $\pi$ cubic units of paint, yet you could never cover its inner wall with a coat of paint of uniform thickness — there is not enough surface-area-worth of paint in the universe. The "paradox" dissolves once you notice that real paint has thickness, while mathematical surface area does not; the horn narrows faster than its wall area accumulates. It is a perfect parable for this chapter: the verdict of finite or infinite turns entirely on the rate of decay, and the convergent volume ($p = 2$) and divergent surface ($p = 1$) sit on opposite sides of the same line $p = 1$ we have been circling all along.


17.10 Summary

  • An improper integral is defined as a limit of proper integrals; it converges if the limit is finite and diverges otherwise.
  • Type 1 (infinite limit): $\displaystyle\int_a^\infty f\,dx = \lim_{t\to\infty}\int_a^t f\,dx$. For doubly infinite integrals, both halves must converge separately.
  • Type 2 (infinite integrand): $\displaystyle\int_a^b f\,dx = \lim_{t\to b^-}\int_a^t f\,dx$ when $f$ blows up at $b$; split at any interior singularity and require each piece to converge.
  • The p-integral rules are the workhorse tests, mirror images across $p = 1$:
  • $\displaystyle\int_1^\infty \frac{dx}{x^p}$ converges $\iff p > 1$ (need fast decay at infinity);
  • $\displaystyle\int_0^1 \frac{dx}{x^p}$ converges $\iff p < 1$ (need a mild blow-up at zero).
  • The comparison and limit comparison tests decide convergence for non-negative integrands without explicit evaluation.
  • The Gamma function $\Gamma(s) = \int_0^\infty x^{s-1}e^{-x}\,dx$ generalizes the factorial: $\Gamma(n) = (n-1)!$, $\Gamma(s+1) = s\Gamma(s)$, and $\Gamma(1/2) = \sqrt{\pi}$.
  • The Gaussian integral $\int_{-\infty}^\infty e^{-x^2}\,dx = \sqrt{\pi}$ has no elementary antiderivative yet an exact value, and it supplies the $\sqrt{2\pi}$ normalizing the normal distribution. Full proof in Chapter 32.
  • Absolute convergence is the robust kind; conditional convergence (e.g. the Dirichlet integral $\int_0^\infty \frac{\sin x}{x}\,dx = \frac{\pi}{2}$) depends on cancellation. The principal value regularizes some non-convergent integrals symmetrically.
  • All of this convergence machinery returns in Chapter 22 as the integral test for infinite series.

Chapter 18 turns integration loose on geometry and physics — areas between curves, volumes of revolution (Gabriel's Horn included), arc length, and work. Chapter 19 closes Part III with differential equations, where improper integrals and the Laplace transform reappear as solution tools.

Continue to: Exercises · Quiz · Case Study 1 · Case Study 2 · Key Takeaways · Further Reading