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 approximation of functions course of the University of Oxford 2011 1 b Solution 2026-10-31
Assume . The functional is the third forward difference: each forward difference lowers the polynomial degree by one, so it annihilates every polynomial of degree at most two. Directly, , , and .
The Peano kernel theorem now gives , where the Peano kernel of the third forward difference isHere is the positive-part truncated power function. The normalized quadratic cardinal B-spline isIts three polynomial pieces agree with the displayed kernel after rescaling, giving . Its knots are in the physical variable, and is positive throughout .
The kernel mass can be evaluated without integrating each piece: apply its representation to , whose third derivative is one. This gives . The weighted mean value theorem for integrals with a nonnegative weight therefore yieldsContinuity of and strict positivity of the weight in the interior place an attained weighted-average value in that open interval, including the constant-derivative case.
Past exam of the mathematics course of the University of Cambridge 2012 ia Paper 1 4F Solution Created 2026-09-24 Updated 2026-10-07
The extreme value theorem ensures that is finite. Since and , multiplication preserves the inequality. Monotonicity of the Riemann integral gives the required boundTo prove the weighted mean value theorem for integrals, put and . If , then , so any works. This includes .
If , the extreme value theorem gives and . Integrating gives . A continuous function on an interval takes every value between its minimum and maximum by the intermediate value theorem. Choose with . Consequently
Write and . By the extreme value theorem, attains a minimum and a maximum on . Because , the monotonicity of the Riemann integral givesIf , this forces , and every satisfies the required identity. This includes .
If , divide to obtain . The intermediate value theorem, applied between points where the continuous function attains and , supplies with . Hence the weighted mean value theorem for integrals gives
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.
