An adaptive integrator has to choose where another function evaluation is useful. Simpson's rule supplies a practical comparison: compute one estimate on an interval and another on its two halves. Their difference can estimate remaining error, provided the expected smooth error pattern has become representative.
For a robot simulation that integrates a scalar cost along a normalized path coordinate, the examples below are exact mathematical constructions. No trajectory, physical energy record, or software-library run is being reported. The purpose is to distinguish the returned approximation, the error estimate, and the tolerance budget.
Define the two approximations
For an interval [a,b] with midpoint m, let S(a,b) = (b minus a)[f(a) + 4f(m) + f(b)]/6. Call this single-panel result S_c. The refined result is S_f = S(a,m) + S(m,b), using the quarter points as well as the original three samples.
There are five distinct function values in this comparison. If the interval is later subdivided, those existing values can be reused. Recomputing them may waste evaluations; treating them as independent new evidence would also misdescribe the calculation.
For a sufficiently smooth function on a small interval, suppose the coarse signed error S_c minus I is approximately E. Bisection makes the combined two-panel error approximately E/16. The factor sixteen combines two effects: each half has a fifth-power interval-length error, and there are two halves.
Subtracting the two approximations gives S_f minus S_c approximately minus 15E/16. Consequently I minus S_f is approximately (S_f minus S_c)/15. The computable magnitude estimate is eta = abs(S_f minus S_c)/15.
The same argument suggests a corrected value Q = S_f + (S_f minus S_c)/15. Eta estimates the error of the uncorrected refined approximation. It is not generally an exact error bar for Q, whose leading error term has just been canceled approximately.
Check a quartic with rational arithmetic
Take f(x) = x to the fourth power on [0,1]. Its exact integral is 1/5. The coarse samples at zero, one half, and one give S_c = 5/24, or approximately 0.2083333333.
Adding samples at one quarter and three quarters gives S_f = 77/384, approximately 0.2005208333. The difference S_f minus S_c is minus 1/128. Thus eta = 1/1920, approximately 0.0005208333.
The actual refined error is also 1/1920. The corrected value is 77/384 minus 1/1920 = 1/5 exactly. For this polynomial, the fourth derivative is constant, so the error scaling used in the derivation is exact rather than merely local and approximate.
With an absolute target of 0.001, this comparison would pass the basic eta test on the initial interval. With a target of 0.0001, it would fail and trigger subdivision. Knowing from symbolic integration that Q happens to be exact does not give a black-box adaptive algorithm that knowledge.
Distribute a global tolerance
Suppose the requested absolute tolerance on [0,1] is epsilon = 0.0001. After rejecting the parent interval, assign epsilon/2 = 0.00005 to each child. Each child forms its own coarse and refined pair and tests its own eta.
For our quartic, each child's refined error is 1/61440, approximately 0.00001627604. Both children pass their local budgets. Adding their refined values gives a total error of 1/30720, approximately 0.00003255208, smaller than the requested target. Applying the corresponding corrections makes this quartic result exact again.
If only one child failed, the algorithm could retain the accepted child's contribution and refine the other. A child that splits again divides its own budget between its descendants. Equal halves are a simple allocation choice; the essential accounting property is that accepted leaf budgets sum to no more than the initial budget.
If every leaf had a proved absolute error bound within its assigned budget, the triangle inequality would prove a global bound. In ordinary adaptive Simpson, however, eta is an estimate built from an asymptotic model. Adding estimated local errors does not convert them into rigorous interval bounds.
Keep an imperfect case visible
For f(x) = x to the sixth power on the same interval, S_c = 17/96 and S_f = 893/6144. The exact integral is 1/7. The estimator is 13/6144, approximately 0.0021158854, whereas the actual refined error is 107/43008, approximately 0.0024879092.
The corrected result is 55/384, whose remaining error is 1/2688, approximately 0.0003720238. Correction helps here, but neither the initial factor-fifteen estimate nor the corrected value is exact. This difference is compatible with the derivation's assumption of similar fourth-derivative behavior across the compared intervals.
Sampling still has limits
A separate failure mechanism is unobserved structure. The smooth function sin(4 pi x) squared is zero at all five initial sample points, yet its integral on [0,1] is one half. Both initial Simpson estimates and their difference are zero. This is a single counterexample to certification from the difference alone, not the main justification for adaptive subdivision.
Known discontinuities or singular endpoints should be represented explicitly in the integration setup. Finite evaluation budgets, recursion-depth limits, nonfinite values, and an inability to create a distinct floating-point midpoint also need explicit outcomes. Reaching a limit should preserve the partial estimate and an unresolved accuracy status instead of silently declaring success.
The original CLP text and Persson's notes explain refinement and local tolerance splitting. The quartic and sixth-power calculations here isolate when their error model is exact and when it is approximate. Adaptive refinement can spend evaluations more selectively, but its stopping message must still distinguish an estimated tolerance from a mathematically proved error bound.
Sources checked October 24, 2026
https://personal.math.ubc.ca/~CLP/CLP2/clp_2_ic/ap_adaptive.html
https://persson.berkeley.edu/math128a/lecture_notes/math128a_lecture_notes_chapter_4.html
Concept illustration: A small desktop robot beside a laptop showing a generic workflow provides robotics context for this analytical model. The image does not depict the article's numerical example, a verified experiment, a product specification, or deployment evidence.