Chapter 9
20 min read
Section 87 of 353

Improper Integrals: Infinite Limits

The Indefinite Integral and Antiderivatives

Learning Objectives

By the end of this section, you will be able to:

  1. Understand what makes an integral "improper" and why infinite limits require special treatment
  2. Evaluate improper integrals by expressing them as limits of definite integrals
  3. Determine whether an improper integral converges (has a finite value) or diverges (is infinite)
  4. Apply the p-integral theorem to quickly classify convergence for power functions
  5. Connect improper integrals to probability distributions, Laplace transforms, and machine learning
  6. Compute improper integrals numerically using Python

The Big Picture: Infinite Areas That Are Finite

"How can a region extending infinitely far have a finite area? This is the beautiful paradox at the heart of improper integrals."

In our study of definite integrals, we always worked with finite intervals [a, b]. But what happens when we want to integrate over an infinite domain? Consider the region under f(x)=exf(x) = e^{-x} from x=0x = 0 to x=x = \infty. This region extends infinitely far to the right, yet it has a finite area of exactly 1.

This counterintuitive result reveals a deep truth: if a function decays fast enough as xx \to \infty, the "tail" contributes less and less to the total area, and the sum of all these contributions can be finite.

The Core Insight

An improper integral af(x)dx\int_a^\infty f(x) \, dx is defined as a limit:

af(x)dx=limtatf(x)dx\int_a^\infty f(x) \, dx = \lim_{t \to \infty} \int_a^t f(x) \, dx

If this limit exists and is finite, we say the integral converges. If the limit is infinite or doesn't exist, we say it diverges.

Why Do We Need This?

Improper integrals are not just mathematical curiosities — they appear constantly in applications:

  • Probability Theory: Every probability density function must integrate to 1 over its entire domain, which is often (,)(-\infty, \infty)
  • Physics: The total energy of a system, work done by a force, or charge in a distribution often involves infinite integrals
  • Signal Processing: Fourier and Laplace transforms are defined as improper integrals over infinite domains
  • Machine Learning: Expected values, normalizing constants, and marginal distributions all require infinite integrals

Historical Context

The concept of improper integrals emerged from the rigorous development of calculus in the 18th and 19th centuries.

Leonhard Euler (1707–1783)

Euler was one of the first mathematicians to systematically work with infinite integrals. He computed the famous Gaussian integral:

ex2dx=π\int_{-\infty}^{\infty} e^{-x^2} \, dx = \sqrt{\pi}

This result, which Euler derived using clever techniques, became foundational for probability theory and statistical mechanics. The normal distribution's ubiquity in nature is directly connected to this integral.

Augustin-Louis Cauchy (1789–1857)

Cauchy provided the rigorous definition of improper integrals as limits, clarifying what it means for an infinite integral to "exist." He also introduced the important distinction between absolute convergence and conditional convergence for improper integrals.

The Harmonic Series Connection

The study of improper integrals is intimately connected to the harmonic series n=11n\sum_{n=1}^{\infty} \frac{1}{n}. The integral 11xdx\int_1^{\infty} \frac{1}{x} \, dx diverges for the same reason the harmonic series does — the terms/values don't shrink fast enough.


Definition and Notation

An integral is called improper if it involves one of the following situations:

  1. Type I: One or both limits of integration are infinite
  2. Type II: The integrand has a discontinuity (vertical asymptote) in the interval

In this section, we focus on Type I improper integrals — those with infinite limits. We'll cover Type II (discontinuous integrands) in the next section.

Definition: Type I Improper Integral

Infinite upper limit:
af(x)dx=limtatf(x)dx\int_a^\infty f(x) \, dx = \lim_{t \to \infty} \int_a^t f(x) \, dx
Infinite lower limit:
bf(x)dx=limttbf(x)dx\int_{-\infty}^b f(x) \, dx = \lim_{t \to -\infty} \int_t^b f(x) \, dx
Both limits infinite:
f(x)dx=cf(x)dx+cf(x)dx\int_{-\infty}^\infty f(x) \, dx = \int_{-\infty}^c f(x) \, dx + \int_c^\infty f(x) \, dx

The integral converges if the limit(s) exist and are finite.


Type I: Infinite Upper Limit

The most common form of improper integral has an infinite upper limit:

af(x)dx=limtatf(x)dx\int_a^\infty f(x) \, dx = \lim_{t \to \infty} \int_a^t f(x) \, dx

Evaluation Process

  1. Replace ∞ with t: Write atf(x)dx\int_a^t f(x) \, dx
  2. Evaluate the definite integral: Find the antiderivative F(x)F(x) and compute F(t)F(a)F(t) - F(a)
  3. Take the limit: Evaluate limt[F(t)F(a)]\lim_{t \to \infty} [F(t) - F(a)]
  4. Conclude: If the limit is finite, the integral converges to that value; otherwise, it diverges

Example: 0exdx\int_0^\infty e^{-x} \, dx

Step 1: Replace ∞ with t

0texdx\int_0^t e^{-x} \, dx

Step 2: Evaluate the definite integral

0texdx=[ex]0t=et(e0)=1et\int_0^t e^{-x} \, dx = \left[-e^{-x}\right]_0^t = -e^{-t} - (-e^0) = 1 - e^{-t}

Step 3: Take the limit

limt(1et)=10=1\lim_{t \to \infty} (1 - e^{-t}) = 1 - 0 = 1

Conclusion:

0exdx=1(converges)\int_0^\infty e^{-x} \, dx = 1 \quad \text{(converges)}

Why Does e^(-x) Converge?

The function exe^{-x} decays exponentially fast — faster than any power of 1/x1/x. This rapid decay ensures that the "tail" of the integral contributes a vanishingly small amount, allowing the total to remain finite.


Type I: Infinite Lower Limit

When the lower limit is -\infty, we replace it with a variable and take the limit from the left:

bf(x)dx=limttbf(x)dx\int_{-\infty}^b f(x) \, dx = \lim_{t \to -\infty} \int_t^b f(x) \, dx

Example: 0exdx\int_{-\infty}^0 e^x \, dx

Step 1: Replace −∞ with t

t0exdx\int_t^0 e^x \, dx

Step 2: Evaluate

t0exdx=[ex]t0=e0et=1et\int_t^0 e^x \, dx = [e^x]_t^0 = e^0 - e^t = 1 - e^t

Step 3: Take the limit

limt(1et)=10=1\lim_{t \to -\infty} (1 - e^t) = 1 - 0 = 1
0exdx=1(converges)\int_{-\infty}^0 e^x \, dx = 1 \quad \text{(converges)}

Both Limits Infinite

When both limits are infinite, we split the integral at any convenient point cc:

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

Both Parts Must Converge

The integral f(x)dx\int_{-\infty}^\infty f(x) \, dx converges only if both parts converge independently. The choice of cc doesn't matter (often we use c=0c = 0).

Example: ex2dx=π\int_{-\infty}^\infty e^{-x^2} \, dx = \sqrt{\pi} (The Gaussian Integral)

This famous integral cannot be evaluated using elementary antiderivatives, but its value is known to be π\sqrt{\pi}.

By symmetry, since ex2e^{-x^2} is an even function:

ex2dx=20ex2dx=2π2=π\int_{-\infty}^\infty e^{-x^2} \, dx = 2 \int_0^\infty e^{-x^2} \, dx = 2 \cdot \frac{\sqrt{\pi}}{2} = \sqrt{\pi}

This result is fundamental in probability — it's why the normal distribution 12πex2/2\frac{1}{\sqrt{2\pi}} e^{-x^2/2} normalizes to 1.

Interactive: Improper Integral Explorer

Explore different improper integrals and see how the area accumulates as the upper bound extends toward infinity:

Interactive Improper Integral Explorer

Current Area
0.993264
Limit as t → ∞
1
Status
CONVERGES

Insight: Converges because e^(-x) decays exponentially fast


The p-Integral Theorem

One of the most important results for improper integrals is the p-integral theorem, which tells us exactly when power functions converge:

The p-Integral Theorem

The integral 11xpdx\int_1^\infty \frac{1}{x^p} \, dx:

Converges when p > 1
11xpdx=1p1\int_1^\infty \frac{1}{x^p} \, dx = \frac{1}{p-1}
Diverges when p ≤ 1
11xpdx=\int_1^\infty \frac{1}{x^p} \, dx = \infty

Proof of the p-Integral Theorem

Case 1: When p1p \neq 1

1t1xpdx=1txpdx=[x1p1p]1t=t1p11p\int_1^t \frac{1}{x^p} \, dx = \int_1^t x^{-p} \, dx = \left[\frac{x^{1-p}}{1-p}\right]_1^t = \frac{t^{1-p} - 1}{1-p}

If p>1p > 1, then 1p<01-p < 0, so t1p0t^{1-p} \to 0 as tt \to \infty:

limtt1p11p=011p=1p1\lim_{t \to \infty} \frac{t^{1-p} - 1}{1-p} = \frac{0 - 1}{1-p} = \frac{1}{p-1}

If p<1p < 1, then 1p>01-p > 0, so t1pt^{1-p} \to \infty:

limtt1p11p=(diverges)\lim_{t \to \infty} \frac{t^{1-p} - 1}{1-p} = \infty \quad \text{(diverges)}

Case 2: When p=1p = 1 (the harmonic integral)

1t1xdx=[lnx]1t=lntln1=lnt\int_1^t \frac{1}{x} \, dx = [\ln x]_1^t = \ln t - \ln 1 = \ln t
limtlnt=(diverges)\lim_{t \to \infty} \ln t = \infty \quad \text{(diverges)}

Interactive: p-Integral Explorer

Explore how the value of pp affects convergence. Watch the critical transition at p=1p = 1:

p-Integral Explorer: ∫₁^∞ 1/x^p dx

p = 0.3p = 1 (critical)p = 3
Current p
1.50
Area (t = 10)
1.3675
Limit as t → ∞
2.0000
Status
CONVERGES

The p-Integral Theorem

The integral ∫₁^∞ 1/x^p dx:

  • Converges to 1/(p-1) when p > 1
  • Diverges to ∞ when p ≤ 1

The case p = 1 is the harmonic integral ∫₁^∞ 1/x dx = ln(t) → ∞, which grows slowly but without bound.

p valueIntegralResult
p = 0.5∫₁^∞ 1/√x dxDiverges (√t → ∞)
p = 1∫₁^∞ 1/x dxDiverges (ln(t) → ∞)
p = 2∫₁^∞ 1/x² dxConverges to 1
p = 3∫₁^∞ 1/x³ dxConverges to 1/2
p = 4∫₁^∞ 1/x⁴ dxConverges to 1/3

Exponential Decay Integrals

Integrals involving exponential decay are among the most important in applications. The exponential function decays so rapidly that these integrals almost always converge.

Key Results

IntegralValueApplication
∫₀^∞ e^(-x) dx1Exponential distribution normalization
∫₀^∞ xe^(-x) dx1 = 1!Gamma function Γ(2)
∫₀^∞ x²e^(-x) dx2 = 2!Gamma function Γ(3)
∫₀^∞ e^(-x²) dx√π/2Error function, Gaussian
∫₀^∞ xe^(-x²) dx1/2Moment of Gaussian
∫₀^∞ e^(-ax) dx (a>0)1/aLaplace transform of 1

The Gamma Function

The Gamma function generalizes the factorial to non-integer values:

Γ(n)=0xn1exdx\Gamma(n) = \int_0^\infty x^{n-1} e^{-x} \, dx

For positive integers: Γ(n)=(n1)!\Gamma(n) = (n-1)!

This improper integral converges for all n>0n > 0 because the exponential decay dominates the polynomial growth.


Worked Examples

Example 1: 12x3dx\int_1^\infty \frac{2}{x^3} \, dx

This is a p-integral with p=3>1p = 3 > 1, so it converges:

12x3dx=21x3dx=2131=212=1\int_1^\infty \frac{2}{x^3} \, dx = 2 \int_1^\infty x^{-3} \, dx = 2 \cdot \frac{1}{3-1} = 2 \cdot \frac{1}{2} = 1

Example 2: 0xe2xdx\int_0^\infty x e^{-2x} \, dx

Use integration by parts with u=xu = x, dv=e2xdxdv = e^{-2x} dx:

0txe2xdx=[x2e2x]0t+120te2xdx\int_0^t x e^{-2x} \, dx = \left[-\frac{x}{2}e^{-2x}\right]_0^t + \frac{1}{2}\int_0^t e^{-2x} \, dx
=t2e2t+0+12[12e2x]0t= -\frac{t}{2}e^{-2t} + 0 + \frac{1}{2}\left[-\frac{1}{2}e^{-2x}\right]_0^t
=t2e2t14e2t+14= -\frac{t}{2}e^{-2t} - \frac{1}{4}e^{-2t} + \frac{1}{4}

As tt \to \infty, both terms with e2te^{-2t} go to 0:

0xe2xdx=14\int_0^\infty x e^{-2x} \, dx = \frac{1}{4}

Example 3: 21xlnxdx\int_2^\infty \frac{1}{x \ln x} \, dx (Divergent)

Use substitution u=lnxu = \ln x, du=1xdxdu = \frac{1}{x} dx:

2t1xlnxdx=ln2lnt1udu=[lnu]ln2lnt=ln(lnt)ln(ln2)\int_2^t \frac{1}{x \ln x} \, dx = \int_{\ln 2}^{\ln t} \frac{1}{u} \, du = [\ln u]_{\ln 2}^{\ln t} = \ln(\ln t) - \ln(\ln 2)

As tt \to \infty, ln(lnt)\ln(\ln t) \to \infty, so:

21xlnxdx=(diverges)\int_2^\infty \frac{1}{x \ln x} \, dx = \infty \quad \text{(diverges)}

Even though 1xlnx\frac{1}{x \ln x} decays faster than 1x\frac{1}{x}, it's not fast enough!


Real-World Applications

Probability and Statistics

Every probability density function (PDF) must satisfy:

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

For distributions with unbounded support (like the normal, exponential, or gamma), this is an improper integral that must converge to 1.

Exponential Distribution: f(x)=λeλxf(x) = \lambda e^{-\lambda x} for x0x \geq 0

0λeλxdx=1\int_0^\infty \lambda e^{-\lambda x} \, dx = 1

Normal Distribution: f(x)=12πσe(xμ)22σ2f(x) = \frac{1}{\sqrt{2\pi}\sigma} e^{-\frac{(x-\mu)^2}{2\sigma^2}}

12πσe(xμ)22σ2dx=1\int_{-\infty}^\infty \frac{1}{\sqrt{2\pi}\sigma} e^{-\frac{(x-\mu)^2}{2\sigma^2}} \, dx = 1

Physics: Total Energy

In physics, improper integrals compute total quantities over infinite domains:

  • Electric potential from a point charge integrating over all space
  • Total energy stored in an electromagnetic field
  • Work done by a force over an infinite displacement

Signal Processing: Laplace Transforms

The Laplace transform converts differential equations to algebraic equations:

L{f(t)}=F(s)=0f(t)estdt\mathcal{L}\{f(t)\} = F(s) = \int_0^\infty f(t) e^{-st} \, dt

The factor este^{-st} ensures convergence for a wide class of functions, even those that grow polynomially.


Machine Learning Connection

Improper integrals appear throughout machine learning, often hidden behind probabilistic frameworks.

Normalization Constants

When defining probability distributions, we need the integral to be 1. The partition function in energy-based models:

Z=eE(x)dxZ = \int_{-\infty}^\infty e^{-E(x)} \, dx

This integral must converge for the model to be well-defined.

Expected Value Calculations

Computing expected values for continuous distributions:

E[X]=xf(x)dx\mathbb{E}[X] = \int_{-\infty}^\infty x \cdot f(x) \, dx

Some distributions (like Cauchy) have undefined means because this integral diverges!

Gaussian Processes

In Gaussian process regression, the marginal likelihood involves:

p(yX)=p(yf)p(fX)dfp(\mathbf{y}|\mathbf{X}) = \int p(\mathbf{y}|\mathbf{f}) p(\mathbf{f}|\mathbf{X}) \, d\mathbf{f}

This is an improper integral over the infinite-dimensional function space.

Variational Inference

The ELBO (Evidence Lower Bound) in variational autoencoders involves:

L=Eq(z)[logp(xz)]DKL(q(z)p(z))\mathcal{L} = \mathbb{E}_{q(z)}[\log p(x|z)] - D_{\text{KL}}(q(z) \| p(z))

Both terms involve improper integrals over the latent space.


Python Implementation

Here's how to evaluate improper integrals numerically using Python:

Evaluating Improper Integrals in Python
🐍improper_integrals.py
12Scipy Handles Infinity

scipy.integrate.quad can directly accept np.inf as limits. It uses intelligent subdivision and transformation to handle infinite domains efficiently.

37The Gaussian Integral

The integral ∫₀^∞ e^(-x²) dx = √π/2 is fundamental. The full Gaussian integral ∫₋∞^∞ e^(-x²) dx = √π normalizes the probability distribution.

47Oscillatory Integrals

Integrals like ∫ sin(x)/x dx require special care. The limit parameter increases subdivisions for better accuracy with oscillating integrands.

72Critical Threshold at p=1

The p-integral shows phase transition behavior: convergent for p > 1, divergent for p ≤ 1. This pattern appears throughout probability and physics.

98PDF Normalization

Every probability density function must satisfy ∫f(x)dx = 1 over its support. This normalization condition is an improper integral for unbounded supports.

125The Cauchy Distribution

The Cauchy distribution has such heavy tails that its mean is undefined — the integral ∫x·f(x)dx diverges. This shows that convergence depends on the specific integral.

138Laplace Transform Definition

L{f(t)} = ∫₀^∞ f(t)e^(-st) dt transforms differential equations into algebraic equations. The exponential decay factor ensures convergence for many functions.

152 lines without explanation
1import numpy as np
2from scipy import integrate
3import sympy as sp
4
5def evaluate_improper_integrals():
6    """
7    Evaluate various improper integrals numerically.
8    scipy.integrate.quad handles infinite limits automatically!
9    """
10    print("Improper Integral Evaluation")
11    print("=" * 50)
12
13    # Example 1: ∫₀^∞ e^(-x) dx = 1
14    result1, error1 = integrate.quad(lambda x: np.exp(-x), 0, np.inf)
15    print(f"\n∫₀^∞ e^(-x) dx = {result1:.10f}")
16    print(f"  Expected: 1.0000000000")
17    print(f"  Error estimate: {error1:.2e}")
18
19    # Example 2: ∫₁^∞ 1/x² dx = 1
20    result2, error2 = integrate.quad(lambda x: 1/x**2, 1, np.inf)
21    print(f"\n∫₁^∞ 1/x² dx = {result2:.10f}")
22    print(f"  Expected: 1.0000000000")
23
24    # Example 3: ∫₀^∞ x·e^(-x) dx = 1 (Gamma function Γ(2))
25    result3, error3 = integrate.quad(lambda x: x * np.exp(-x), 0, np.inf)
26    print(f"\n∫₀^∞ x·e^(-x) dx = {result3:.10f}")
27    print(f"  Expected: 1.0000000000 (Γ(2) = 1!)")
28
29    # Example 4: ∫₀^∞ e^(-x²) dx = √π/2 ≈ 0.8862
30    result4, error4 = integrate.quad(lambda x: np.exp(-x**2), 0, np.inf)
31    expected4 = np.sqrt(np.pi) / 2
32    print(f"\n∫₀^∞ e^(-x²) dx = {result4:.10f}")
33    print(f"  Expected: √π/2 = {expected4:.10f}")
34
35    # Example 5: ∫₋∞^∞ e^(-x²) dx = √π (Full Gaussian)
36    result5, error5 = integrate.quad(lambda x: np.exp(-x**2), -np.inf, np.inf)
37    print(f"\n∫₋∞^∞ e^(-x²) dx = {result5:.10f}")
38    print(f"  Expected: √π = {np.sqrt(np.pi):.10f}")
39
40    # Example 6: ∫₀^∞ sin(x)/x dx = π/2 (Dirichlet integral)
41    # This is a conditionally convergent integral
42    result6, error6 = integrate.quad(
43        lambda x: np.sinc(x/np.pi),  # sinc(x/π) = sin(x)/x
44        0, np.inf,
45        limit=200  # Increase subdivision limit for oscillatory integrals
46    )
47    print(f"\n∫₀^∞ sin(x)/x dx = {result6:.10f}")
48    print(f"  Expected: π/2 = {np.pi/2:.10f}")
49
50    return result1, result2, result3, result4, result5, result6
51
52def p_integral_analysis():
53    """
54    Analyze the p-integral ∫₁^∞ 1/x^p dx.
55    Demonstrates the critical threshold at p = 1.
56    """
57    print("\n" + "=" * 50)
58    print("p-Integral Analysis: ∫₁^∞ 1/x^p dx")
59    print("=" * 50)
60
61    p_values = [0.5, 0.8, 0.9, 0.99, 1.0, 1.01, 1.1, 1.5, 2.0, 3.0]
62
63    for p in p_values:
64        try:
65            result, error = integrate.quad(
66                lambda x: 1 / x**p, 1, np.inf
67            )
68            if p > 1:
69                theoretical = 1 / (p - 1)
70                print(f"p = {p:4.2f}: {result:12.6f} (expected: {theoretical:.6f})")
71            else:
72                print(f"p = {p:4.2f}: DIVERGES (numerical: {result:.2e})")
73        except Exception as e:
74            print(f"p = {p:4.2f}: DIVERGES (error: {e})")
75
76    print("\nThe critical threshold is p = 1:")
77    print("  • p > 1: Converges to 1/(p-1)")
78    print("  • p ≤ 1: Diverges to ∞")
79
80def probability_applications():
81    """
82    Improper integrals are fundamental in probability theory.
83    Every PDF must integrate to 1 over its support.
84    """
85    print("\n" + "=" * 50)
86    print("Probability Applications")
87    print("=" * 50)
88
89    # Exponential distribution: f(x) = λe^(-λx) for x ≥ 0
90    lambda_param = 2.0
91
92    def exp_pdf(x):
93        return lambda_param * np.exp(-lambda_param * x)
94
95    # Verify normalization
96    normalization, _ = integrate.quad(exp_pdf, 0, np.inf)
97    print(f"\nExponential PDF (λ={lambda_param}):")
98    print(f"  ∫₀^∞ λe^(-λx) dx = {normalization:.10f} (should be 1)")
99
100    # Expected value E[X] = 1/λ
101    mean, _ = integrate.quad(lambda x: x * exp_pdf(x), 0, np.inf)
102    print(f"  E[X] = ∫₀^∞ x·λe^(-λx) dx = {mean:.10f}")
103    print(f"  Expected: 1/λ = {1/lambda_param:.10f}")
104
105    # Variance E[X²] - E[X]²
106    moment2, _ = integrate.quad(lambda x: x**2 * exp_pdf(x), 0, np.inf)
107    variance = moment2 - mean**2
108    print(f"  Var(X) = {variance:.10f}")
109    print(f"  Expected: 1/λ² = {1/lambda_param**2:.10f}")
110
111    # Normal distribution normalization
112    print("\nStandard Normal PDF:")
113    normal_pdf = lambda x: (1 / np.sqrt(2 * np.pi)) * np.exp(-x**2 / 2)
114    norm_check, _ = integrate.quad(normal_pdf, -np.inf, np.inf)
115    print(f"  ∫₋∞^∞ (1/√(2π))e^(-x²/2) dx = {norm_check:.10f}")
116
117    # Cauchy distribution (heavy tails - infinite mean!)
118    print("\nCauchy Distribution:")
119    cauchy_pdf = lambda x: 1 / (np.pi * (1 + x**2))
120    cauchy_norm, _ = integrate.quad(cauchy_pdf, -np.inf, np.inf)
121    print(f"  ∫₋∞^∞ 1/(π(1+x²)) dx = {cauchy_norm:.10f}")
122    print("  Note: Mean is undefined (integral of x·f(x) diverges!)")
123
124def laplace_transforms():
125    """
126    Laplace transforms are improper integrals:
127    L{f(t)} = ∫₀^∞ f(t)e^(-st) dt
128    """
129    print("\n" + "=" * 50)
130    print("Laplace Transforms as Improper Integrals")
131    print("=" * 50)
132
133    s_values = [1, 2, 3]
134
135    # L{1} = 1/s
136    print("\nL{1} = ∫₀^∞ e^(-st) dt = 1/s")
137    for s in s_values:
138        result, _ = integrate.quad(lambda t: np.exp(-s * t), 0, np.inf)
139        print(f"  s = {s}: {result:.6f} (expected: {1/s:.6f})")
140
141    # L{t} = 1/s²
142    print("\nL{t} = ∫₀^∞ t·e^(-st) dt = 1/s²")
143    for s in s_values:
144        result, _ = integrate.quad(lambda t: t * np.exp(-s * t), 0, np.inf)
145        print(f"  s = {s}: {result:.6f} (expected: {1/s**2:.6f})")
146
147    # L{sin(t)} = 1/(s² + 1)
148    print("\nL{sin(t)} = ∫₀^∞ sin(t)·e^(-st) dt = 1/(s²+1)")
149    for s in s_values:
150        result, _ = integrate.quad(
151            lambda t: np.sin(t) * np.exp(-s * t), 0, np.inf, limit=100
152        )
153        print(f"  s = {s}: {result:.6f} (expected: {1/(s**2+1):.6f})")
154
155# Run all demonstrations
156evaluate_improper_integrals()
157p_integral_analysis()
158probability_applications()
159laplace_transforms()

Common Mistakes to Avoid

Mistake 1: Treating ∞ as a Number

Wrong: Writing F()F(a)F(\infty) - F(a) directly.

Correct: Write limt[F(t)F(a)]\lim_{t \to \infty} [F(t) - F(a)]. We must explicitly use limits because ∞ is not a real number.

Mistake 2: Assuming f(x) → 0 Implies Convergence

Wrong: "Since 1/x → 0 as x → ∞, the integral converges."

Correct: The function must decay fast enough.11xdx\int_1^\infty \frac{1}{x} \, dx diverges even though 1/x → 0. We need decay faster than 1/x.

Mistake 3: Ignoring One Part of a Double Infinity

Wrong: Computing f(x)dx\int_{-\infty}^\infty f(x) \, dx as a single limit.

Correct: Split at some point c and verify that both parts converge independently.

Mistake 4: Forgetting to Check for Divergence

Wrong: Proceeding with calculations without verifying convergence.

Correct: Before computing, determine if the integral converges. If it diverges, the answer is simply "diverges" or ∞.


Test Your Understanding

Test Your Understanding

Question 1 of 8

Which of the following improper integrals converges?


Summary

Improper integrals extend the definite integral to infinite domains, revealing that infinite regions can have finite "size" when functions decay fast enough.

Key Formulas

FormulaDescription
∫ₐ^∞ f(x) dx = lim_{t→∞} ∫ₐ^t f(x) dxInfinite upper limit
∫_{-∞}^b f(x) dx = lim_{t→-∞} ∫_t^b f(x) dxInfinite lower limit
∫_{-∞}^∞ f(x) dx = ∫_{-∞}^c f(x) dx + ∫_c^∞ f(x) dxBoth infinite
∫₁^∞ 1/xᵖ dx = 1/(p-1) for p > 1p-integral (convergent)
∫₁^∞ 1/xᵖ dx = ∞ for p ≤ 1p-integral (divergent)

Key Takeaways

  1. Improper integrals are limits: We replace infinite bounds with variables and take limits
  2. Convergence vs divergence: An improper integral converges if the limit is finite; otherwise it diverges
  3. The p-integral theorem: 11xpdx\int_1^\infty \frac{1}{x^p} \, dx converges iff p>1p > 1
  4. Exponential decay guarantees convergence: Functions like exe^{-x} decay fast enough that their integrals always converge
  5. Applications abound: Probability distributions, Laplace transforms, physics, and machine learning all rely on improper integrals
The Core Insight:
"A function can extend infinitely far yet enclose a finite area — the secret is in how fast it decays."
Coming Next: In Improper Integrals: Discontinuous Integrands, we'll explore Type II improper integrals where the integrand has a vertical asymptote within the interval.
Loading comments...