Composite midpoint quadrature rule 2026-10-14
Apply the midpoint quadrature rule on each of equal panels of a partition of an interval, with :Each quadrature node is a panel midpoint and each quadrature weight is . For , put . Summing the panel quadrature errors givesfor some . Each panel contributes at most ; there are panels, explaining the composite midpoint rule error of order in big O notation. On a nonuniform partition of an interval with panel widths and largest width , the corresponding bound is .
For on , summing the sampled polynomial exactly yieldsDoubling divides the absolute error by exactly four. For a general function, halving divides the displayed error bound by four, but the actual absolute error need not follow that ratio: cancellation can make it smaller or zero. Continuous functions still give convergence as the largest panel width tends to zero, by uniform continuity; without the bounded second derivative, the second-order rate is not guaranteed. Noise sensitivity of a quadrature rule explains a separate limitation when samples are inexact.
Composite trapezoidal rule Created 2026-10-14 Updated 2026-10-31
On an equal-panel partition of an interval, with , sum the trapezoidal rule over adjacent panels:There are distinct quadrature nodes. Each interior sample belongs to two panels and therefore has quadrature weight , while each endpoint has quadrature weight . Equivalently, the composite trapezoidal rule integrates the piecewise linear function obtained by linear interpolation exactly.[ref]
For and , summing panel quadrature errors givesfor some . Thus panel quadrature errors of order accumulate to order , using big O notation.[ref]
3.5 Quadrature, subsection (i) Trapezoidal Rules. §3.5(i), equations 3.5.2–3.5.3: composite formula and signed error
On a nonuniform partition of an interval with widths and largest width , the bound is .For the polynomial on , direct summation yieldsBoth quadrature errors shrink by exactly four when doubles, with opposite signs. This exact relation belongs to this polynomial example; the trapezoidal rule is not always twice as inaccurate as the midpoint quadrature rule.
Quadratic quadrature errors fall by four on refinement while a common sample bias persists
. Details. The left plot uses exact polynomial sums; the right adds a common sample bias to the composite trapezoidal rule. That mathematical model converges to , showing why smaller panels alone do not ensure accuracy for noisy samples. It illustrates noise sensitivity of a quadrature rule, rather than measured data.
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.
The midpoint error annihilates affine functions, so here . Apply the functional to :ThusIt is nonnegative, and symmetry gives . ThereforeFor a quadratic with constant nonzero second derivative equality holds, so this midpoint quadrature rule error constant is sharp.
Past exam of the mathematics course of the University of Cambridge 2018 ib Paper 3 19D Solution Created 2026-09-24 Updated 2026-10-03
Repeated integration by parts inproduces the first terms of the Taylor polynomial and leaves , proving the integral remainder in Taylor theoremApply the linear functional to this identity. It annihilates the Taylor polynomial, and commuting it with integration gives the Peano kernel theorem
For the midpoint quadrature rule on , , so . Its Peano kernel isFor , the formula givesagreeing with .
Integrate the ordinary differential equation across one step, using the fundamental theorem of calculus:The midpoint quadrature rule approximates the integral by . Approximate the unknown midpoint state by the midpoint value of linear interpolation between the endpoint states:Combining these approximations gives the implicit midpoint ruleIt is an implicit time-stepping method because its new state occurs inside the evaluation of . An equivalent derivation uses a straight-line approximation on the step and imposes the ordinary differential equation at its midpoint, a one-stage collocation method.
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.
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.


