Adaptive Simpson’s Rule

Numerical Methods

Source inspiration: (Mathew 2000-2019).

Description

Adaptive Simpson quadrature recursively subdivides intervals until a local error estimate is below a tolerance. On an interval \([a,b]\) with midpoint \(m\), \[ S(a,b)=\frac{b-a}{6}\left[f(a)+4f(m)+f(b)\right], \] and refinement compares \(S(a,b)\) against \(S(a,m)+S(m,b)\).

A common acceptance criterion is \[ \left|S(a,m)+S(m,b)-S(a,b)\right| < 15\,\varepsilon, \] so refinement concentrates where curvature or oscillation is strongest.

Animations

Each animation below shows the adaptive Simpson refinement process for \(f(x)=1+e^{-x}\sin(8x^{2/3})\) on \([0,2]\) with tolerance \(10^{-3}\). Frames follow the recorded node-set progression from the worked example, showing how new points are introduced nonuniformly.

Julia source scripts that generated these animations are linked under each case.

Case 1 — Adaptive Refinement, \(f(x)=1+e^{-x}\sin(8x^{2/3})\), \([0,2]\), \(\varepsilon=10^{-3}\)

Behavior: The partition evolves from coarse to fine by splitting only where needed; each frame redraws the piecewise quadratic approximation over the current node set and updates the running integral estimate.

Julia source

Adaptive Simpson animation over [0,2]: nonuniform node refinement concentrates on difficult regions while the piecewise quadratic approximation and integral estimate update each frame

Derivation Notes (Planned)

Short derivations will be added to explain the core equations and assumptions.

Worked Example (Planned)

A compact numerical example with intermediate steps will be included.

Implementation Notes (Planned)

Implementation details, numerical stability notes, and practical pitfalls will be added.

References

Mathew, John H. 2000-2019. Numerical Analysis - Numerical Methods Modules. https://web.archive.org/web/20190808102217/http://mathfaculty.fullerton.edu/mathews/n2003/NumericalUndergradMod.html.