A uniform mesh spends the same effort on every part of an interval, even when one small region bends sharply and the rest is nearly linear. Adaptive quadrature compares a coarse approximation with a refined one and subdivides regions that appear difficult. The comparison is evidence from sampled values. It becomes a rigorous bound only when additional assumptions justify the error model or an independent enclosure method supplies a certificate.
Predict
Predict whether two identical estimates imply exact integration. A narrow smooth peak can lie between every sampled point, giving zero for both estimates while contributing positive area. Therefore a refinement difference of zero is not a universal proof of zero error. The method can work very well on smooth resolved functions, but it must expose its assumptions and resource limits rather than silently treating every accepted interval as mathematically certified.
Experiment
Let S_c be one Simpson panel and S_f the sum of two half-panels. Under the leading error model, compare these quantities.
Quantity
Leading error relative to exact integral I
Coarse S_c
I−S_c≈E
Fine S_f
I−S_f≈E/16
Difference S_f−S_c
≈15E/16
Thus the estimated fine error is (S_f−S_c)/15, and the corrected estimate is S_f+(S_f−S_c)/15. Verify the sign for a function whose coarse rule overestimates.
Understand
The factor sixteen comes from fourth-order composite error under halving. Algebraically, if I−S_h=Ch⁴+smaller terms, then I−S_(h/2)=Ch⁴/16+smaller terms. Subtracting gives the divisor fifteen. This is Richardson extrapolation, not a bound valid for arbitrary sampled data. An adaptive algorithm accepts a leaf when its estimated absolute error fits a local budget; otherwise it splits the interval and usually halves that budget. If each leaf had a true error bound and the leaf budgets summed to ε, the triangle inequality would certify total error at most ε. With heuristic estimators, the same bookkeeping controls estimated error only.
Apply
Caching is important: a parent’s endpoint and midpoint values are reused by its children, so each refinement needs only the newly introduced quarter points. Track actual unique evaluations rather than multiplying panels by three. Bound recursion depth and total evaluations, detect midpoint stagnation, and reject nonfinite values. Singularities or discontinuities may require interval splitting based on known structure, transformations or specialized rules. Near-zero integrals also need an absolute tolerance; a purely relative request can become meaningless when cancellation makes the integral vanish. Combine absolute and relative goals with a clearly stated rule.
Execute the partition and preserve unresolved work
The bounded experiment below implements cached recursive Simpson comparisons on[0,1]. The first panel uses three values at0,1/2,1. Assessing it adds the quarter points1/4and3/4. On subdivision, each child inherits its endpoints and midpoint from those values; assessing a child adds only its own two new quarter points. Counts refer to unique evaluations of the integrand, not reference-integral calculations or rendering.
A leaf is accepted only when the absolute correction fits its local tolerance and its depth reaches the selected scouting minimum. The accepted contribution is the fine estimate plus the correction. Otherwise the leaf is split if resources permit, assigning half its tolerance to each child. Left children are processed first. If the evaluation cap prevents the next pair of samples, the entire interval is retained as unresolved with its available coarse estimate and an unknown error estimate. If depth stops a completed comparison, the leaf retains its fine estimate and the observed estimated error but remains unresolved. No interval silently disappears, and an unknown estimate is not replaced by zero.
Inspect acceptance, missed structure and resource limits
Estimated tolerance accepted on every leaf; accuracy is not certified.
Returned approximation: 0.2. Known exact reference: 0.2. Measured absolute error against that reference: 2.775557562e-17. Summed estimated error: 0.00003255208333.
Unique evaluations: 9 / 65; panel assessment attempts: 3; splits: 1; leaves: 2; unresolved: 0. These are algorithm work counts, not measured time. Reference arithmetic and rendering are excluded.
Gold means estimator-accepted, red means depth-limited, grey means evaluation-limited. Dots are actually evaluated positions. Every interval and status also appears below.
Interval
Depth
Local tolerance
Estimated error
Returned contribution
Status
0 to 0.5
1
0.0001220703125
0.00001627604167
0.00625
accepted
0.5 to 1
1
0.0001220703125
0.00001627604167
0.19375
accepted
Copy the current computation report
Controls replace this temporary report; copy it before changing a case. It records every sample and leaf, settings, caps and unresolved intervals. It is not independently assessed project evidence.
Maximum depth6 and257function evaluations keep work bounded. Only these fixed teaching integrands are supported. Floating-point roundoff, unknown functions and general endpoint singularities need separate analysis.
An exactly missed smooth feature
For f(x)=x⁴, the initial fine estimate exceeds the exact1/5 by1/1920, and Richardson’s correction removes that quartic error in exact arithmetic. At tolerance1/4096 the root’s estimated error exceeds its budget, so it splits; its two children accept after a total of nine unique evaluations. Floating-point output can still differ from the exact corrected value by roundoff.
Now use the polynomial F(x)=65536 times the square of x(x−1/4)(x−1/2)(x−3/4)(x−1). Every initial sample is zero, so both root estimates and their difference are zero. With no scouting requirement the estimator accepts zero after five evaluations. But the function is nonnegative, nonzero between its roots, and has exact integral160/693. Expanding gives coefficients, in ascending powers from x²through x¹⁰:576, −9600,66880, −254720,581888, −819200,696320, −327680,65536. Integrating each term and summing verifies the exact reference. This is a smooth polynomial counterexample, not a singularity or roundoff accident.
Force one scouting level before acceptance and inspect the newly sampled eighth-points. They reveal this particular feature. Finite scouting is still not a universal guarantee: for any finite inspected set T, the product of (x−t)²over t in T vanishes on every inspected point, is nonnegative elsewhere and has positive integral unless the interval is degenerate. Scaling it can make the missed integral arbitrarily large. Extra assumptions about the function class, derivative bounds, or an independent enclosure are required for certification.
Separate a genuine bound from the Richardson estimate
The composite quadrature lesson proves a Simpson panel bound M4 times its length to the fifth power, divided by2880, when the fourth derivative is continuous and bounded in absolute value by M4. On a leaf of length ℓ, the fine rule consists of two half-panels. Its bound is therefore M4ℓ⁵/46080. If the corrected contribution adds c=(fine−coarse)/15, the triangle inequality gives the valid, possibly conservative bound M4ℓ⁵/46080+|c| for its truncation error. This bound uses an independently justified M4; it is not the assertion that |c|alone is always a bound.
If a covering partition has valid local bounds whose sum is at most the requested tolerance, their total truncation error is bounded by that tolerance. The experiment’s acceptance test sums heuristic corrections instead, and does not obtain such a certificate automatically. Its known exact reference lets us measure error in these synthetic cases. Rounding error is additional to a real-arithmetic truncation bound. For |x−1/3| the required global smoothness fails; splitting at the known corner makes each side linear, but discovering arbitrary hidden structure is a different problem.
The bounded depth here keeps all sample positions on a representable dyadic grid, so midpoint stagnation cannot occur under its controls. That does not remove stagnation checks from a general implementation. The copyable report retains the actual partition, values, work counters and stopping state so a learner can explain an execution, revise assumptions and compare a changed case.
Continue
A useful report includes the partition, evaluation count, estimated error, termination reason and any known singular structure. Test on exact polynomial integrals, smooth functions with known answers, narrow bumps and integrable endpoint singularities. A finite sample cannot rule out every hidden feature without a function class assumption. Next, linear-system algorithms introduce another kind of evidence: residuals and backward-error bounds reveal how arithmetic affects a solve, while condition numbers explain the possible forward error.
Drafts save locally as you type. Reveal worked solutions when useful; the site remembers that exposure. Automatic matches check the requested answer, while written arguments require review against the rubric.
Run the quartic case with tolerance1/4096, depth6, no scouting and evaluation caps65,5,3. Explain why the completed run uses nine unique values. For each capped run, state the covering intervals and why the aggregate error estimate is unknown rather than zero. Explain what left-first processing can change without changing the mathematical partition obligation.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
The five initial Simpson sample values of the hidden polynomial are zero, but its exact integral is160/693. Explain the accepted zero report and why forced scouting does not universally certify accuracy. For a C⁴ function with a proved fourth-derivative bound M4 on a leaf of length ℓ, derive a valid truncation bound for the corrected fine contribution using the established single-panel bound M4ℓ⁵/2880.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Coarse Simpson estimate is 1 and the two-half estimate is 16/15. What corrected estimate S_f+(S_f−S_c)/15 results?
Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.
A total absolute tolerance 1/100 is split equally across four accepted leaves. What is each leaf budget?
Integers, fractions and finite decimals are accepted. Expressions such as sqrt(2) are not parsed by this checker.
Derive the divisor 15 from a leading Simpson error proportional to h⁴.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Why does summing certified local absolute error bounds produce a global bound?
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Construct a smooth function missed by a fixed finite sampling set.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Specify termination and accounting for recursive adaptive Simpson.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Reflect and continue
Before marking this lesson complete, explain one key idea without the worked solution and identify a condition that matters. Marking complete records participation, not independent mastery.