calculus 225 min

Improper Integrals

Evaluate integrals with infinite limits or unbounded integrands and determine whether they converge

0/9Not Started

Why This Matters

Not every integral has nice, finite bounds and a well-behaved integrand. When you integrate 1/x^2 from 1 to infinity, the upper limit is infinite. When you integrate 1/sqrt(x) from 0 to 1, the integrand blows up at x = 0. Both of these are improper integrals, and they require special treatment: you replace the problematic bound with a variable, evaluate the resulting proper integral, and then take a limit.

The central question for any improper integral is whether it converges or diverges. A convergent integral yields a finite number -- meaning the total accumulated area under the curve is bounded. A divergent integral grows without bound, meaning there is no finite total area. The classic example is the p-test: the integral of 1/x^p from 1 to infinity converges when p is greater than 1 and diverges when p is less than or equal to 1.

Improper integrals are everywhere in probability (the normal distribution integrates from negative infinity to positive infinity), physics (gravitational and electrostatic potential energy), and transform methods (Laplace and Fourier transforms integrate to infinity). Understanding convergence is essential before relying on any of these results.

Define Terms

Visual Model

Improper IntegralInfinite limit or discontinuity
Type IInfinite limit of integration
Type IIIntegrand has discontinuity
Replace with Limitlim as t -> inf or t -> c
Evaluate Proper IntegralStandard techniques
ConvergentLimit is finite
DivergentLimit is infinite or DNE
p-Test1/x^p: converges if p exceeds 1

The full process at a glance. Click Start tour to walk through each step.

Improper integrals replace problematic bounds with limits. The key question is whether that limit yields a finite value (convergent) or not (divergent).

Code Example

Code
// Improper Integrals: numerical approximation and convergence

function trapezoid(f, a, b, n) {
  const h = (b - a) / n;
  let sum = 0.5 * (f(a) + f(b));
  for (let i = 1; i < n; i++) {
    sum += f(a + i * h);
  }
  return sum * h;
}

// Type I: integral of 1/x^2 from 1 to infinity (converges to 1)
// Approximate by integrating from 1 to T for large T
function oneOverX2(x) { return 1 / (x * x); }

for (const T of [10, 100, 1000, 10000]) {
  const approx = trapezoid(oneOverX2, 1, T, 100000);
  console.log(`T=${T}: approx = ${approx.toFixed(6)}`);
}
console.log("Exact: 1.000000");

// Type I: integral of 1/x from 1 to infinity (diverges)
function oneOverX(x) { return 1 / x; }

for (const T of [10, 100, 1000, 10000]) {
  const approx = trapezoid(oneOverX, 1, T, 100000);
  console.log(`1/x T=${T}: approx = ${approx.toFixed(4)} (grows without bound)`);
}

// p-test demonstration
console.log("\np-test: integral of 1/x^p from 1 to 1000");
for (const p of [0.5, 1.0, 1.5, 2.0, 3.0]) {
  const f = (x) => 1 / Math.pow(x, p);
  const val = trapezoid(f, 1, 1000, 100000);
  const status = p > 1 ? "converges" : "diverges";
  console.log(`p=${p}: approx=${val.toFixed(4)} (${status})`);
}

Interactive Experiment

Try these exercises:

  • Compute the integral of 1/x^2 from 1 to T for T = 10, 100, 10000, 1000000. Watch how the values approach 1 (convergence).
  • Do the same for 1/x. The values keep growing. This is divergence, even though 1/x approaches 0.
  • Try 1/x^1.01 from 1 to large T. It converges (barely), but the convergence is extremely slow. How large must T be to get close to the exact value of 100?
  • Integrate 1/sqrt(x) from epsilon to 1 for epsilon = 0.1, 0.01, 0.001. This is a Type II improper integral. Does it converge?
  • What happens with 1/x from 0.001 to 1? Is this a Type II improper integral? Does it converge or diverge?

Quick Quiz

Coding Challenge

Approximate an Improper Integral

Write a function called `approxImproper` that takes a value of p (a positive number) and approximates the integral of 1/x^p from 1 to 100000 using the trapezoidal rule with 100000 subintervals. Then return the string 'CONVERGES' if p exceeds 1 or 'DIVERGES' if p is at most 1, followed by the approximate value rounded to 2 decimal places, in the format: 'CONVERGES: 1.00' or 'DIVERGES: 11.51'.

Loading editor...

Real-World Usage

Improper integrals are fundamental in science and engineering:

  • Probability: The normal distribution PDF integrates from negative infinity to positive infinity. Proving this integral equals 1 is a classic improper integral result.
  • Physics: Gravitational and electrostatic potential energy involve integrals to infinity. The total energy stored in a field requires convergent improper integrals.
  • Laplace transforms: The Laplace transform definition integrates from 0 to infinity, making every Laplace transform an improper integral.
  • Signal processing: Fourier transforms integrate from negative infinity to positive infinity. Convergence conditions determine which signals have valid transforms.
  • Quantum mechanics: Normalization of wave functions requires that the integral of the probability density from negative infinity to positive infinity equals 1.

Connections