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 error bound 2026-10-31
If is twice continuously differentiable on , take a uniform bound . On one panel , two integrations by parts give the signed quadrature errorThe nonnegative kernel has integral , so the absolute error is at most . Summing equal panels proves the displayed bound. The maximum exists on the closed interval; a supremum or any known uniform bound also suffices. The estimate certifies a sufficient panel count, which need not be the least count achieving a particular actual error.
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.
Error bound for composite Simpson's rule 2026-10-18
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 . ThusThe 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.
Finite samples do not certify quadrature accuracy Created 2026-10-14 Updated 2026-10-25
For any finite set of quadrature nodes in , , consider the polynomialEvery sample is zero, so every quadrature rule at these quadrature nodes gives . Yet is nonnegative and strictly positive away from its finitely many polynomial roots; its continuity makes the integral positive. Consequently the smooth functions and have identical samples but definite integrals and . Multiplying by any positive constant makes the difference arbitrarily large. This is an information limit, even with exact arithmetic; merely assuming smoothness without quantitative bounds does not remove it. The related degree ceiling for quadrature exactness uses the same squared nodal polynomial to limit polynomial exactness.
For example, the endpoint quadrature nodes give , , and . Both the zero function and produce zero under the one-panel trapezoidal rule, although . More generally, any estimate based only on their shared samples has absolute error at least for one of these two integrands, by the triangle inequality.
The obstruction also applies to a deterministic adaptive procedure that terminates after finitely many evaluations on the zero function: form using every quadrature node it visited. On , the same zero responses lead to the same choices and answer. Certified quadrature error control therefore needs additional information, such as a known bound on relevant derivatives, rather than agreement among sampled approximations alone.
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.
Noise sensitivity of a quadrature rule 2026-10-14
If the observed samples are , the resulting quadrature rule changes by . Bounded sample perturbations therefore satisfyFor ordinary numerical integration with nonnegative quadrature weights exact on constant functions, the bound is , independent of panel refinement. A common bias attains it: the quadrature error due to the function approximation may vanish while this sample error persists. Interpolating a fixed data set onto a finer grid likewise does not create new observations or remove its uncertainty.
With new samples whose errors are independent random variables of zero expectation and common variance , a different model givesFor equal panels this is for the composite midpoint quadrature rule and for the composite trapezoidal rule. These variance reductions require the stated independence and unbiasedness assumptions; a common bias or correlated sample errors need not shrink. The two displayed perturbation formulas follow directly from the triangle inequality and the variance additivity for independent random variables, respectively.
Numerical integration Created 2026-10-03 Updated 2026-10-18
Numerical integration approximates a definite integral using finitely many sampled function values. For an integrand on a finite interval , , a quadrature rule has the formThe quadrature nodes tell us where to evaluate ; the quadrature weights turn those values into an approximation to the accumulated signed area. The exact definite integral depends on the integrand throughout the interval, whereas the quadrature rule sees only these samples. Integrating a chosen interpolant exactly still generally approximates the original integrand's integral.[ref]
5.6 Numerical integration. Fundamentals of Numerical Computation by Tobin A. Driscoll and others; Definition 5.6.1 and §5.6.1, equations 5.6.2–5.6.5: weighted samples and integration of an interpolant
The fundamental theorem of calculus evaluates as when an antiderivative is available. Numerical integration is useful when no convenient antiderivative is known, or each evaluation of the integrand requires an expensive computation. The task then becomes choosing informative quadrature nodes and controlling the quadrature error with as few evaluations as possible. Fixed data also permit a quadrature rule, but refinement cannot supply new information between observations.[ref]
5.6 Numerical integration. Fundamentals of Numerical Computation by Tobin A. Driscoll and others; Opening discussion, Example 5.6.1 and the paragraph following Definition 5.6.1: antiderivatives, numerical evaluation and fixed data
For an exact comparison, take the polynomial on . Its antiderivative gives . On a partition of an interval into equal panels, the composite midpoint quadrature rule uses midpoint samples, each with quadrature weight ; the composite trapezoidal rule uses endpoint samples, with outer quadrature weights and interior quadrature weights . The existing derivations under these two quadrature rules giveIn particular, and already bracket ; two panels give and . The convex function explains the opposite signs. A midpoint rectangle can cross the curve within its panel, so its total signed area, rather than pointwise ordering, determines the underestimate.
One and two panels for numerical integration of : midpoint and endpoint samples with their quadrature weights
. Details. Define the signed approximation error as . In this example the absolute errors are and : doubling reduces each by exactly four. A plot with both axes on a logarithmic scale therefore has slope , expressing order two with respect to panel refinement. This is an exact calculation for this polynomial, including , rather than an observed rate extrapolated from a few computed answers.
Exact absolute errors for midpoint and trapezoidal numerical integration of : slope and a factor-four reduction
. Details. For a general integrand, the composite midpoint quadrature rule and composite trapezoidal rule give second-order quadrature error bounds when has two continuous derivatives on and a known bound on . These hypotheses describe behavior between samples. A formal error formula containing an unknown derivative is not a numerical accuracy certificate or a justified sample count. Finite samples do not certify quadrature accuracy makes the missing information explicit. Errors in the evaluations and roundoff error must also be considered; noise sensitivity of a quadrature rule treats the former.
More elaborate choices exploit other information: Gaussian quadrature obtains high polynomial exactness from carefully chosen quadrature nodes, and Simpson's rule uses a quadratic interpolant. Adaptive numerical integration compares approximations and concentrates samples where they disagree, often saving evaluations. Such a difference is an error estimate, not a certified bound without further assumptions: both approximations can miss the same feature.[ref]
5.7 Adaptive integration. Fundamentals of Numerical Computation by Tobin A. Driscoll and others; §5.7.1, equation 5.7.4: a difference-based error estimate; §5.7.2: interval bisection; Example 5.7.2 and concluding discussion: requested accuracy is not guaranteed
For a real-valued linear error functional annihilating , the Peano kernel iswhere is the argument on which the functional acts. Under the standard boundedness and extension hypotheses, the Peano kernel theorem statesFor example, a bounded functional on continuous functions, represented by a finite signed measure and extended to the truncated powers, has this representation. Quadrature error functionals have precisely this structure.
The source's bare linearity assumption on is not by itself a complete theorem hypothesis. Truncated powers need not belong to that domain, and interchange of the functional with an integral needs justification. For instance annihilates but would require a Dirac point mass rather than an ordinary integrable kernel. The statement above supplies the usual functional class needed for the requested theorem and applies directly to part (c).
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 209 1 b Solution Created 2026-10-03 Updated 2026-10-06
Use the same as in part (a). The error of the weighted realized variance splits into its centered fluctuation and its deterministic quadrature error:The Hölder continuity of controls this bias:Since , the bias-variance decomposition of mean squared error has no cross term. Part (a) therefore givesHence is a universal choice. This argument separately controls the statistical fluctuation and the Riemann sum approximation.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 209 1 c Solution Created 2026-10-03 Updated 2026-10-14
Write and , restricting to meshes small enough that . This discontinuous indicator function does not satisfy the hypothesis of part (b). Instead apply part (a) with and handle its two boundary cells directly.
Let on each observation cell . Away from cells containing the two ends of , almost everywhere. Even if an endpoint is itself an observation time, at most two cells contribute, and their total length is at most . Thus the quadrature error obeysThe fluctuation has variance at most . Its zero expected value givesusing .
The remaining bias is the difference between an interval average and the spot variance. By the Hölder continuity of ,Retaining the centered fluctuation and bounding yieldsFor , both and equal . Therefore and satisfy both requested bounds:The constants are independent of the observation partition, , and . The exponent follows from a bias-variance tradeoff for a shrinking window.
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.
Read the differential order literally: take quadrature nodes in and in . Applying Simpson's rule first in and then in multiplies the one-dimensional quadrature weights. With , this tensor-product quadrature isEquivalently, the nine sampled function values have the quadrature weight arraywith rows indexed by the quadrature nodes and columns by the quadrature nodes. The quadrature weights sum to the rectangle's area. If the intended coordinate assignment is instead , , exchange and in the formula. Both conventions give the same calculation on the unit square used below.
For the separable integrand, tensor-product quadrature factors into two one-dimensional applications of Simpson's rule:soThe exact double integral, evaluated by Fubini's theorem and the power rule for integration, isThe factor is always integrated exactly. All quadrature error therefore comes from applying Simpson's rule to the factor.
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.
Let , , and . The composite midpoint rule and composite trapezoidal rule areFor composite Simpson's rule with strips, the spacing is . Its odd-indexed nodes are the and its even interior nodes are the . ConsequentlyThis is an identity between the quadrature rules, not an approximation involving an omitted quadrature error.
The global bound requiresSince the strip count must be even, the smallest count certified by this bound is .
For the tighter bound, use the bisection method on the continuous extension for . The initial root bracket is valid: , while is below the global bound and hence below . To identify the smallest admissible even count, the monotonicity of can also be justified.
Put andFor , differentiation showsThe numerator is nonnegative because : its difference from starts at zero and has nonnegative derivative , by the arithmetic-geometric mean inequality. Thus , and . Therefore increases with , so is strictly decreasing with . Bisection locates its unique threshold crossing; then check the neighboring even integers, retaining the strict error inequality.
For example, and , so the tighter bound certifies strips. These are evaluations of the bound, not an assumption that it equals the actual 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.





