Skip to content
ExtendedSource checked

Adaptive Quadrature

Numerically integrates by subdividing intervals where the error estimate is too high.

Quick Facts

Compact metadata for implementation and discovery.

Category
Numerical Methods
Difficulty
Intermediate
Family
Numerical Integration
Tier
Extended
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
3
Code example
Ready
Visualization
Ready

Overview

Adaptive Quadrature spends more evaluations on difficult parts of a function and fewer on smooth regions.

Core Concepts

local error estimaterecursive subdivisiontolerancequadrature rule

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(n)

Average

Adaptive

Worst

Problem dependent

Space

O(depth)

When to Use

  • Use when the integrand is mostly smooth but has localized difficult regions.
  • Use when integrating functions with local sharp features is a central requirement.

When Not to Use

  • Avoid when samples are noisy enough that error estimates are unreliable.
  • Avoid when roundoff, conditioning, or discontinuities dominate the result.

What It Does

  • Estimates local integration error
  • Subdivides difficult intervals
  • Combines accepted interval estimates

Use Cases

  • Integrating functions with local sharp features
  • Scientific computing
  • Tolerance-controlled quadrature

Inputs

  • Function
  • Interval
  • Error tolerance

Outputs

  • Integral estimate

Key Formulas (1)

Error estimate

error ≈ |estimatewhole − (estimateleft + estimateright)|
error ~= abs(estimate_whole - (estimate_left + estimate_right))

Compares coarse and subdivided estimates to decide whether to refine.

Pseudocode

  1. 1.Estimate the integral on an interval
  2. 2.Estimate the integral on its two halves
  3. 3.Compare the difference as an error estimate
  4. 4.Accept or subdivide recursively
  5. 5.Sum accepted estimates

Canonical Example

Input
function has a narrow peak
Output
more subintervals near the peak
Explanation
The method refines where the estimated error is largest.

Implementation Notes

  • Carry a per-interval tolerance so total error remains controlled.
  • Compare against a small hand-checkable case before scaling up.
  • Keep a tiny example with expected output beside the implementation.

Common Pitfalls

  • Highly oscillatory functions can fool simple error estimates.
  • Ignoring conditioning can make a correct method return unreliable numbers.
  • Not defining boundary, empty, or degenerate inputs before implementation.

Interactive Mechanism Walkthrough

Iterative Convergence & State Trajectory

Show an interval split more finely near a curve's sharp bend.

Adaptive Quadrature mechanism walkthrough step 1 of 5x₀x₁x₂x*
Step 1 of 5: Estimate the integral on an interval
numeric-iteration

Notes

A maximum recursion depth protects against pathological functions.

Sources (1)

What each reference supports for this entry.

Numerical Recipes

Book

Numerical methods reference covering adaptive quadrature and error-based subdivision.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Alternative toRomberg Integration

Both refine integration but with different error-control strategies.

Improves onSimpson's Rule

Adaptive quadrature recursively allocates work where estimated error is high.

Tags

Numerical MethodsQuadratureNumerical IntegrationRecursion