With unit strip width, the composite trapezoidal rule gives
For Simpson's rule, the even integer arguments are the odd-numbered interior grid positions. Therefore
The requested two-decimal answers are and . The supplied component sums are individually rounded; they should not be treated as exact simultaneous identities. Computing from the original function gives approximately and , respectively, with the same two-decimal results.
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.
Quadrature rule Created 2026-09-24 Updated 2026-10-14
A quadrature rule approximates an integral by a finite weighted sum of sampled function values:
The quadrature nodes specify where to sample, and the quadrature weights specify how much each sample contributes. The density specifies the target integral, whereas the discrete quadrature weights belong to the approximation. Ordinary numerical integration has . Gaussian quadrature and the midpoint quadrature rule choose interior quadrature nodes; the trapezoidal rule includes endpoints.[ref]
For ordinary numerical integration, exactness on the constant function requires ; exactness on additionally requires . These two checks make the quadrature rule exact for every affine function. For example, both the midpoint quadrature rule and trapezoidal rule give for . Testing progressively higher polynomial degrees defines the degree of precision of a quadrature rule. Exactness describes a class of integrands, rather than promising exact results for every function.
Composite midpoint quadrature rules and composite trapezoidal rules apply a simple quadrature rule on every panel of a partition of an interval. This buys accuracy by shrinking the panels while keeping the elementary formula fixed. For continuous functions sampled exactly, their quadrature errors tend to zero as the largest panel width tends to zero. The familiar second-order bounds require stronger assumptions about derivatives. The signed approximation error used here is ; some sources define quadrature error with the opposite sign, so the convention must accompany any formula.
Right Riemann sum 2026-10-31
A right Riemann sum on a partition samples each subinterval at its right endpoint. For a continuous function its limit as the mesh tends to zero is the integral, by the Riemann sum convergence theorem. On a uniform partition of width , comparison of endpoint weights in the composite trapezoidal rule gives . Thus is a right Riemann sum for , and its limit is .
On a partition of an interval symmetric about zero, the composite trapezoidal rule gives opposite quadrature nodes equal quadrature weights. Samples of an odd function cancel pairwise, and a zero quadrature node contributes zero. For a continuous odd function, its exact integral over is also zero. Adding any affine function preserves exactness by linearity of the integral and of the quadrature rule. For example, is nonpolynomial but both the exact integral and every uniform-grid composite trapezoidal rule value on are two.
On a uniform partition of with width , the right Riemann sum and the composite trapezoidal rule have equal weights at every interior mesh point. They differ only by adding half a final-endpoint weight and removing half an initial-endpoint weight. This proves the displayed identity. For continuous , both converge to its definite integral; their finite endpoint correction need not be confused with the smaller trapezoidal discretization error for a smooth integrand.