Cubic exactness of Simpson's rule Created 2026-10-18 Updated 2026-10-20
Polynomial interpolation makes Simpson's rule exact for every polynomial of polynomial degree at most two. To understand the extra polynomial degree, centre the coordinate at the midpoint: , with endpoints . For any cubic polynomial , let be its interpolating quadratic polynomial. The polynomial vanishes at all three quadrature nodes, sowhere is the coefficient of in . As a function of , this is an odd function, whose integral over the symmetric interval is zero. Hence integrating also integrates exactly. This is the symmetry mechanism in the nodal-polynomial criterion for quadrature exactness.
In the worked example, the polynomial difference factors asIts definite integrals on and are respectively and . Their cancellation concerns signed integrals, rather than pointwise accuracy of polynomial interpolation.
The degree of precision of a quadrature rule stops at three: on the same interval, the monomial gives , whereas . Their difference, exact integral minus approximation, is .
Degree of precision of a quadrature rule 2026-10-14
The degree of precision of a quadrature rule is the largest integer such that for every polynomial of polynomial degree at most . By linearity, checking the monomials suffices. Exactness for one higher-degree polynomial alone does not raise this degree: every lower polynomial degree must also be covered.
Midpoint quadrature rule Created 2026-10-03 Updated 2026-10-14
The midpoint quadrature rule replaces the integrand on , , by its value halfway across the interval:Geometrically, is the signed area of a rectangle with width and height . Its single quadrature node is and its quadrature weight is . Sampling in the interior is useful when endpoint evaluation is inconvenient, although an endpoint singularity can invalidate the quadrature error estimates below.
The midpoint quadrature rule is exact for every affine function : the average height over an interval equals its midpoint height. For example, on , gives and . Positive and negative area discrepancies cancel for a sloping straight line. For the polynomial on , however, and , giving approximation error . Thus its degree of precision of a quadrature rule is exactly one.[ref]
5.8 Numerical Integration. §5.8, printed p. 223: midpoint rectangles, linear exactness and signed quadratic errors
For the polynomial on , four panels give composite midpoint quadrature rule value and composite trapezoidal rule value , bracketing the exact integral . Individual midpoint rectangles can cross the curve; it is their total signed area that underestimates the integral.
For , meaning that its first two derivatives exist and are continuous functions on the closed interval, the signed approximation error has the formHence a convex function with is underestimated, and a concave function with is overestimated. A short justification uses the Taylor formula with integral remainder: writing , it gives , where for and for . This nonnegative Peano kernel has integral , so the weighted mean value theorem for integrals gives the stated sign and coefficient.
Past exam of the numerical analysis course of the University of Oxford 2015 1 b ii Solution 2026-10-31
The trapezoidal rule is exact for every affine function , equivalently every polynomial of polynomial degree at most one: the linear interpolant is the function itself. These functions have , so the preceding upper bound is also zero. There is no contradiction: zero error is precisely what the bound predicts.
The degree of precision of a quadrature rule is one, since the quadratic polynomial in part (i) is not integrated exactly. This does not exclude exactness for particular higher-degree or nonpolynomial functions. For example , , has zero integral and opposite endpoint values, so the trapezoidal rule also gives zero. Its second derivative is generally nonzero, making the upper bound positive; an upper bound need not be attained. Signed quadrature error can cancel.
A Newton-Cotes quadrature integrates a Lagrange interpolation polynomial at equally spaced quadrature nodes. For the Newton-Cotes closed quadrature, the endpoints are included: write , , and useThese quadrature weights depend on the quadrature nodes, not on the sampled function. Open Newton-Cotes quadrature uses equally spaced interior quadrature nodes instead.
For Simpson's rule, use and set , so . The Lagrange cardinal polynomials becomeIntegrating these quadratic polynomials gives , , , respectively. The change of variable contributes , soIts degree of precision of a quadrature rule is three: it integrates every quadratic polynomial by construction, and also the cubic nodal polynomial , whose integral vanishes by odd symmetry about . Any cubic polynomial differs from its quadratic polynomial interpolant by a constant multiple of this nodal polynomial.
Past exam of the numerical analysis course of the University of Oxford 2017 1 d iii Solution 2026-10-31
At ,This is an overestimate, with signed quadrature errorThe relative error is , approximately . The quartic polynomial lies beyond the degree of precision of a quadrature rule of Simpson's rule, so the exactness of the previous cases no longer applies.
Past exam of the numerical analysis course of the University of Oxford 2017 1 d ii Solution 2026-10-31
At ,The factor is now a cubic polynomial. Simpson's rule still integrates it exactly because its degree of precision of a quadrature rule is three. Exactness of tensor-product quadrature depends on the polynomial degree in each variable, rather than their sum.
Past exam of the numerical analysis course of the University of Oxford 2021 1 c ii Solution 2026-10-25
Truncate the Chebyshev series at the full degree of precision of a quadrature rule:Since on , the geometric series estimate givesThe same bound proves uniform convergence of the original Chebyshev series, so its sum and the tail estimate are justified. Gauss-Legendre quadrature is exact on . Its positive quadrature weights sum to , henceTherefore one explicit choice proving exponential convergence of Gaussian quadrature isUsing exactness through polynomial degree doubles the exponent compared with truncating at polynomial degree .
Past exam of the numerical analysis course of the University of Oxford 2021 1 c i Solution 2026-10-25
Let denote the conventional Legendre polynomial, normalized by . The quadrature nodes are its distinct polynomial roots in . For these nodes form the Lagrange cardinal polynomialsChoose the quadrature weights by integrating these polynomials:An equivalent standard formula isThe reason for selecting these quadrature nodes is the resulting degree of precision of a quadrature rule. For any polynomial of polynomial degree at most , polynomial division givesThe orthogonality of the Legendre polynomial makes , while at each quadrature node. The definition of the quadrature weights integrates exactly, soIn particular, . Applying this exactness to also proves .
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.
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 isThus 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]
3.5 Quadrature, subsection (ii) Simpson’s Rule. NIST Digital Library of Mathematical Functions; §3.5(ii), equation 3.5.6: elementary Simpson rule and its fourth-derivative remainder
For an original worked example, take the cubic polynomial on the interval . Here and , so the function evaluations giveSimpson's rule givesAn 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.
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.
Trapezoidal rule Created 2026-09-24 Updated 2026-10-14
As a quadrature rule, the trapezoidal rule replaces an integrand by the linear interpolation joining its two endpoint values:For nonnegative endpoint values, this is the area of a trapezoid; in general it is a signed area. The quadrature nodes are , each with quadrature weight . Unlike the midpoint quadrature rule, it uses endpoint samples, which can be reused between adjacent panels.
Every affine function agrees with its linear interpolation, so the trapezoidal rule integrates it exactly. On , gives . On , the polynomial instead gives , exceeding by . Its degree of precision of a quadrature rule is exactly one.
If , its signed approximation error satisfiesA convex function lies below its endpoint chord, so the trapezoidal rule overestimates its integral; a concave function gives the reverse inequality. The error formula assumes that the second derivative exists and is a continuous function throughout the closed interval.[ref]
3.5 Quadrature, subsection (i) Trapezoidal Rules. §3.5(i), equation 3.5.1 and its C² hypothesis; the source writes integral minus rule
A short derivation is the identityobtained by two integrations by parts. The nonnegative Peano kernel has integral , and the weighted mean value theorem for integrals gives the formula.The trapezoidal rule for an ordinary differential equation averages vector fields at the old and new states and is A-stable.
This time-stepping use applies the same trapezoidal rule to the integral of the derivative in an ordinary differential equation. That connection explains its place under implicit Runge-Kutta methods; its quadrature behavior and the nonlinear issue in trapezoidal rule fails B-stability concern different uses of the same endpoint averaging.

