If a quadrature error bound is and the relevant numerical resolution is , equating these scales gives an estimate of the strip count beyond which that truncation guarantee reaches the rounding scale. For the composite Simpson's rule, . This estimate is useful for choosing a sensible order of magnitude, but a worst-case bound need not equal the actual quadrature error.
For a normal floating-point number in base two, the spacing depends on the exponent of the result; half the spacing is a natural final-storage rounding scale. Machine epsilon instead measures the gap above one. Function-evaluation errors, accumulation of summation error, cancellation, and the arithmetic used for the nodes can impose an earlier practical accuracy limit. Thus final storage precision alone cannot give a universal optimal strip count.
Composite Simpson's rule 2026-10-18
Composite Simpson's rule applies Simpson's rule to consecutive pairs of equal subintervals. Choose a positive even integer , put , and take quadrature nodes for . There are subintervals, two-subinterval panels, and quadrature nodes. Then
The second sum is empty when , recovering one panel. The quadrature weights, before multiplication by , are . Every interior even-indexed quadrature node is an endpoint of two panels, so its two endpoint contributions add to two; every odd-indexed quadrature node is a midpoint with weight four. An odd cannot be covered by these pairs. The displayed formula requires equal spacing.[ref]
For the exponential function on the interval , the exact integral is . With , the formula gives , an overestimate of about . With , it gives , an overestimate of about . The figure shows the intermediate refinements and compares every computed absolute error with the error bound for composite Simpson's rule.
Figure 1.
Computed composite Simpson errors for the exponential function on zero to one approach fourth-order convergence; the dashed curve is the rigorous bound e over 180 n to the fourth power
. Details.
For this exponential function, a geometric series also gives a compact independent formula. With and , summing the panel contributions yields
A Taylor series at gives
The Big O notation describes the remaining terms as tends to zero. Consequently tends to sixteen: the computed ratios increase from about to . Fourth-order truncation error is also obtained by Richardson extrapolation of the composite trapezoidal rule.[ref]
Suppose has a fourth derivative that is a continuous function on the interval , and there. With , the signed quadrature error here is . Then, for some point ,
In particular, a strictly positive fourth derivative makes : composite Simpson's rule overestimates the integral.[ref]
The bound's scale follows by adding the panel errors. A panel of width has signed quadrature error and absolute error at most . There are panels, so the triangle inequality gives . The intermediate value theorem for the continuous fourth derivative replaces the average of the panel values by a single value , giving the signed formula.
The underlying single-panel calculation can be seen through the Peano kernel theorem. On the interval , define the raw Peano kernel , where is integral minus Simpson's rule and is the positive part. Then for and for . It is strictly negative inside the interval and has integral . Thus
The uniform norm bounds the fourth derivative. The polynomial attains equality. Scaling to endpoint spacing multiplies the coefficient by , giving the sharp single-panel bound . The normalized Peano kernel is , so the external factorial must be omitted when using that normalization.
For the exponential function on , , so and the bound is . Its leading actual absolute error is , smaller than the bound because a uniform upper bound on the fourth derivative does not use its variation across the interval. The theorem bounds truncation error with exact function evaluations; sample errors and roundoff error are additional contributions, as described by noise sensitivity of a quadrature rule.
For the same uniform grid and even , the composite Simpson's rule integrates a quadratic interpolant over each successive pair of strips:
The weights are , which explains the even number of strips.
Let , , and . The composite midpoint rule and composite trapezoidal rule are
For composite Simpson's rule with strips, the spacing is . Its odd-indexed nodes are the and its even interior nodes are the . Consequently
This is an identity between the quadrature rules, not an approximation involving an omitted quadrature error.
Take to be a positive even integer, as required by composite Simpson's rule. There are two-strip panels, each of width . Applying the supplied panel bound with the global fourth-derivative minimum and maximum , and summing, gives
Here is the nonnegative absolute error. In this example Simpson's rule overestimates the integral, so . Each panel has that same sign because its fourth derivative is nonnegative; cancellation is not being assumed.[ref]
No: Monte Carlo integration is poorly suited to this smooth one-dimensional problem at such a tight tolerance. A sample-average Monte Carlo estimator has a standard error proportional to , whereas the deterministic composite Simpson's rule bound decreases as here and already certifies the target with tens of strips. Random sampling would require vastly more function evaluations and supplies a probabilistic error statement rather than the displayed deterministic guarantee.
A general-purpose high-dimensional choice is Monte Carlo integration. Draw independent vectors uniformly from the unit cube and evaluate . The cube has volume , so its integral is the expected value of . The iterative estimator is
The integrand is continuous on a compact set, hence bounded with finite variance. The strong law of large numbers gives almost sure convergence, and the square root of the mean squared error is exactly , where . Thus the standard stochastic accuracy rate is ; the dimension affects the variance and evaluation cost, not this exponent.
There is also an important structure-specific improvement here: is a separable integrand. The Fubini theorem reduces the requested value exactly to
One can therefore replace high-dimensional sampling by one-dimensional composite Simpson's rule calculations. For each factor use even , , and
then iterate and form the sum of the products. These smooth factors give deterministic discretization error for fixed centres. Thus Monte Carlo integration is a valid generic answer, while exploiting separability is the more efficient specialized alternative; a large dimension alone does not force a tensor-product grid.
Use tensor-product quadrature with composite Simpson's rule in each coordinate. If there are subintervals in each direction, then and the quadrature rule error is : apply the one-dimensional error bound for composite Simpson's rule successively, using bounded fourth partial derivatives. Hence the error is in big O notation. The rectangular domain makes the product grid convenient.
For a generic integrand in 20 dimensions, Monte Carlo integration gives root mean square error , whereas tensor-product quadrature with composite Simpson's rule gives only . One can sample uniformly in the Euclidean unit ball, for example by an independent uniform direction and radius with uniform on .
For this particular integrand, the most efficient elementary choice uses radial integration over a ball first. The area of the unit 19-sphere is , as follows from the volume of an n-ball. Hence
The reduced integrand is smooth. Apply composite Simpson's rule to obtain deterministic error in big O notation, with one original radial integrand evaluation per node. If the selection is restricted to direct multidimensional methods, Monte Carlo integration with root mean square error is the appropriate choice.
Let and let . A composite Simpson's rule panel covers two strips, so it has width and absolute error at most
There are panels. By the triangle inequality, the absolute error of their sum is at most the sum of their absolute errors. Hence
This assumes even and, for the usual Simpson remainder theorem, . In particular its fourth derivative is bounded on the interval. It is the error bound for composite Simpson's rule, expressed in strip count rather than panel count.[ref]
Separable integrand 2026-10-25
An integrand is separable across coordinates when it factors as . On a product domain, the Fubini theorem reduces its integral to a product of one-dimensional integrals, provided the factors are integrable; for nonnegative factors the Tonelli theorem gives the extended-value version.
A finite sum of separable terms can likewise be integrated as a finite sum of products. For example,
For fixed centres, the factors are smooth on compact intervals. Repeated one-dimensional composite Simpson's rule refinements have fourth-order discretization error, avoiding the exponential tensor-grid cost of a generic -dimensional rule. The numerical constants and possible floating-point overflow still depend on the scale of the factors; separability removes a dimension-dependent combinatorial cost, not all conditioning difficulties.
Simpson's rule Created 2026-10-14 Updated 2026-10-18
Simpson's rule approximates a definite integral by integrating the quadratic polynomial obtained by polynomial interpolation at two endpoints and their midpoint. For an interval with , write and . The three quadrature nodes are , and the quadrature rule is
Thus its quadrature weights are . Their sum is , as required for exactness on constant functions. This is the three-node Newton-Cotes closed quadrature; its degree of precision of a quadrature rule is three, even though the interpolating polynomial has polynomial degree at most two.[ref]
For an original worked example, take the cubic polynomial on the interval . Here and , so the function evaluations give
Simpson's rule gives
An antiderivative supplies an independent exact definite integral:
The quadratic polynomial through the same quadrature nodes is . It differs from between the quadrature nodes, but its definite integral agrees exactly. The picture shows why: the signed polynomial interpolation error has two lobes with opposite integrals.
Figure 1.
An original cubic and its quadratic interpolant have the same integral because the two interpolation-error lobes have signed integrals plus and minus 81 over 64
. Details.
Three function evaluations therefore capture more information about an integral than about the whole function. When an antiderivative is unavailable, composite Simpson's rule repeats this inexpensive local construction over a partition of an interval. For a sufficiently smooth function, halving the node spacing reduces its truncation error by approximately a factor of sixteen.
Tensor-product quadrature 2026-10-25
On a product domain, apply a one-dimensional quadrature rule independently in each coordinate. The resulting quadrature nodes form a product grid and the quadrature weights multiply. With subdivisions per direction in fixed dimension , the evaluation count is . If the one-dimensional rule has error , uniformly for the required coordinate slices, and its weight sums are bounded, telescoping the integration operators against their quadrature operators gives total error . Thus composite Simpson's rule has for sufficiently smooth integrands, but loses efficiency as increases.