Why Refine a Quadrature Grid?
When an integral is estimated from function values, a single numerical result does not show how sensitive that result is to the chosen panel width. Repeating the calculation on a finer grid provides a useful diagnostic: if the estimates change very little as the grid is refined, the sequence may be stabilizing. If they change substantially, the current estimates may not yet be dependable.
Refining an equally spaced grid by halving its panel width has a practical advantage. Every point from the coarser grid remains on the finer grid. The grids are nested, so previously calculated function values can be reused; only the newly inserted points need to be evaluated. This tutorial develops that process for composite trapezoidal and composite Simpson estimates.
Nested Equally Spaced Grids
Let the interval be \([a,b]\), and divide it into \(n\) equal panels, where \(n\) is a positive integer. The panel width is \(h=(b-a)/n\), and the grid points are \(x_i=a+ih\), for \(i=0,1,\ldots,n\). Halving the panel width doubles the number of panels: the refined grid has \(2n\) panels and width \(h/2\).
Each old point \(x_i\) is still on the refined grid: it is the point with refined index \(2i\). The new points are the midpoints of the old panels, \(x_i+h/2\), for \(i=0,\ldots,n-1\). Thus refinement does not discard earlier data.
Reusing Values for the Trapezoidal Rule
For \(n\) equal panels of width \(h\), the composite trapezoidal estimate is
To refine it, retain all values at old grid points and evaluate \(f\) at the \(n\) new midpoints. The refined trapezoidal estimate satisfies a simple update formula.
The factor \(h/2\) is the refined panel width. The formula can also be obtained by writing out the composite trapezoidal rule on the finer grid and grouping its old-point and new-midpoint contributions.
The contribution from old grid points in the refined rule is half of \(T_n\), because the refined panel width is \(h/2\).
Each newly inserted midpoint has coefficient \(h/2\) in the refined trapezoidal sum.
The old-point contribution and the new-point contribution give the stated expression for \(T_{2n}\).
For completeness, the old-point contribution is \((h/2)[f(a)/2+\sum_{i=1}^{n-1}f(a+ih)+f(b)/2]=T_n/2\). The new points have coefficient \(h/2\) each, which proves the update formula.
Worked Example: Refining a Trapezoidal Estimate
Estimate \(\int_0^1 x^2\,dx\) with \(n=2\), then refine to \(n=4\). The coarse width is \(h=1/2\). The grid values are \(f(0)=0\), \(f(1/2)=1/4\), and \(f(1)=1\), so
The new points are \(1/4\) and \(3/4\). Their function values are \(f(1/4)=1/16\) and \(f(3/4)=9/16\). Apply the refinement formula:
Checking directly with the four-panel formula gives \(T_4=(1/4)[0+1/16+1/4+9/16+1/2]=11/32\), agreeing with the update. The exact integral is \(1/3\), so both estimates are below it, and the refined estimate is closer: \(|1/3-3/8|=1/24\), whereas \(|1/3-11/32|=1/96\).
Nested Refinement for Simpson’s Rule
The composite Simpson rule applies when the number of panels is even. If \(n\) is even and \(h=(b-a)/n\), its estimate is
Halving \(h\) takes an even panel count \(n\) to the even panel count \(2n\), so the refined grid can also be used for Simpson’s rule. Every old point is retained, and the newly inserted midpoints are added. The weights change when the rule is recomputed: in the refined rule, old interior points have weight \(2\), while new midpoint points have weight \(4\), within the bracketed sum.
In particular, write \(x_i=a+ih\) for the old nodes. The refined estimate is
This expression is the composite Simpson rule with refined width \(h/2\), written to make the reused old values and new midpoint values visible. Unlike the trapezoidal rule, there is no need to treat a Simpson update as a fixed fraction of the earlier Simpson estimate: recompute the weights using the refined grid.
Worked Example: Comparing Two Simpson Estimates
Estimate \(\int_0^1 x^4\,dx\) with \(n=2\) and \(n=4\). For \(n=2\), \(h=1/2\), and the values at \(0,1/2,1\) are \(0,1/16,1\). Therefore
For \(n=4\), \(h=1/4\). The endpoint values are \(0\) and \(1\); the odd-indexed values are \(f(1/4)=1/256\) and \(f(3/4)=81/256\); and the even interior value is \(f(1/2)=1/16\). Thus
The successive change is \(S_4-S_2=77/384-5/24=77/384-80/384=-1/128\), so its magnitude is \(1/128\). As a check, the exact integral is \(1/5\); the errors are \(1/120\) for \(S_2\) and \(1/1920\) for \(S_4\), since \(77/384-1/5=1/1920\). Here the finer estimate is closer, but the size of the change alone does not establish that conclusion in a different problem.
Measuring Successive Change
Suppose a sequence of estimates \(Q_0,Q_1,\ldots\) comes from successive refinements, where each grid halves the previous panel width. A basic comparison is the absolute change
A smaller \(D_k\) means the latest refinement changed the estimate by less than the preceding difference only when \(D_k<D_{k-1}\). Several small, decreasing differences are more informative than one small difference in isolation. If the estimated integral is not near zero, one can also report the relative change \(D_k/|Q_k|\). When \(Q_k=0\), that relative measure is undefined; when \(Q_k\) is close to zero, it can be misleadingly large. In those cases, report the absolute change and give the scale or units of the integral.
Worked Example: Interpreting a Successive Change
Suppose two nested trapezoidal calculations give \(T_2=17/24\) and \(T_4=1171/1680\). Their absolute change is
The relative change using the finer estimate is \((19/1680)/(1171/1680)=19/1171\approx0.01623\), or about \(1.62\%\). To check the arithmetic, \(17/24=1190/1680\), so the difference is exactly \(19/1680\); dividing that by \(1171/1680\) cancels the common denominator. This comparison describes how much the estimate changed. Without more information, it does not certify that the true integral differs from \(T_4\) by at most \(19/1680\).
What Stabilization Can and Cannot Tell You
A practical refinement study records the panel count, panel width, estimate, and change from the preceding estimate. If a chosen stopping criterion is used—for instance, an absolute change below a specified tolerance—state the criterion explicitly and check it at successive refinements. The tolerance describes an acceptance rule for observed changes; it should not be presented as a guaranteed bound on the quadrature error unless a separate error analysis justifies that claim.
Successive estimates can appear stable for reasons that do not guarantee accuracy. The integrand may vary sharply between sampled points; a sequence of few estimates may not yet reflect that variation; or different errors may partly cancel. A small change is useful evidence, especially when it persists under further refinement and the integrand is understood, but no finite comparison alone rules out these possibilities.
For a reliable comparison, keep the interval, integrand, and rule fixed while refining the grid. Changing several things at once makes the differences harder to interpret. Also ensure that a Simpson calculation uses an even panel count at every level. A nested grid makes the calculation more efficient, but the quadrature rule’s panel requirements still apply.
A Common Mistake: Using the Wrong Refinement Factor
When using the trapezoidal update formula, it is easy to multiply the sum of new midpoint values by \(h\) instead of by the refined width \(h/2\). In the \(x^2\) example, that mistake would give
which is not the four-panel estimate. Each new point has the refined trapezoidal coefficient \(h/2=1/4\), not \(h=1/2\). Using the correct coefficient gives \(3/16+(1/4)(10/16)=11/32\), matching the direct composite-rule calculation. Checking against the definition of the refined rule catches the error.
Check Your Understanding
Answer these questions using the definitions and procedures in this tutorial.
- A grid on \([a,b]\) has \(n\) panels and width \(h\). After halving its panel width, how many panels does it have, and which grid points are new?
- Write the trapezoidal refinement formula for \(T_{2n}\) in terms of \(T_n\) and the newly inserted midpoint values.
- Why must Simpson’s rule be recomputed with its refined-grid weights rather than treated as a fixed fraction of the earlier estimate?
- What does a sequence of decreasing successive changes suggest, and what does it fail to prove on its own?
- For the trapezoidal update, what is the coefficient on each new midpoint value, and why?