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.
Richardson extrapolation 2026-10-14
Richardson extrapolation improves an approximation by combining two resolutions so that their leading truncation errors cancel. The useful surprise is that the size of that leading error need not be known: its scaling under refinement is enough. This lets an existing finite difference method or quadrature rule produce a more accurate answer from two runs, without first deriving a new method from scratch.
Suppose approximates a fixed limit as the positive resolution parameter tends to zero, with an asymptotic expansion
Here is known, is independent of , and denotes Big O notation. The same asymptotic expansion, with the same , must describe both and . Nested grids make it natural to reuse samples, although nesting itself does not establish this error model. Define the linear combination
The weights sum to one, preserving , while . Thus Richardson extrapolation gives : the next available term in the asymptotic expansion determines the improved order. Justin Solomon's numerical analysis text develops this cancellation for finite differences and applies it to numerical integration.[ref]
Geometrically, regard the approximation as a function of . Its first two terms are a straight line . The two computed points lie at positive ; extending the line through them to gives . This is why the operation is extrapolation: it estimates a value outside the sampled parameter interval. The remaining curvature corresponds to the uncancelled terms of the asymptotic expansion.
Worked example: a centered derivative of sine. For the smooth function , the exact derivative at is . The centered difference quotient, a central finite difference, is
The Taylor series of sine gives the signed truncation error
Thus , and . Halving divides the leading truncation error by four. Combining the two centered difference quotients with Richardson extrapolation gives
Indeed, the coefficient becomes ; the coefficient vanishes. This is the even-power case of Richardson extrapolation discussed in Persson's authored lecture notes.[ref]
For and , the actual computations are
The absolute error drops from about for to for , an improvement by roughly a factor of 498. Refining again gives , whose absolute error is about . The refined truncation errors decrease by nearly four for and nearly sixteen for , reflecting their second and fourth orders.
Figure 1.
Centered sine derivative errors: second order before Richardson extrapolation and fourth order after cancellation
. Source. Details.
The logarithmic scale on each axis turns power laws into straight lines. The dashed reference curves are and , the magnitudes of the leading truncation errors. The plotted errors are computed with 70-digit decimal arithmetic, rather than clipped to a display floor; this isolates the asymptotic expansion from roundoff error.
Worked example: integrating an exponential. Approximate the definite integral of the exponential function on :
For numerical integration, the composite trapezoidal rule adds the areas of trapezoids between successive samples; this is the quadrature use of the endpoint average that also occurs in the ODE trapezoidal rule. On equal intervals, with , define
Summing the geometric series gives . Expanding the exponential function near zero yields
The leading truncation error again has , . On the uniform nested grids with and intervals, Richardson extrapolation therefore gives
This linear combination is exactly composite Simpson's rule on the finer grid, whose spacing is . On each coarse panel, an old endpoint receives weight and the new midpoint weight ; shared old endpoints receive weight . These are the usual Simpson's rule weights multiplied by . The equivalence is explained directly in LeMesurier's university notes.[ref]
For two coarse panels and four fine panels,
The absolute errors are about , and , respectively. Reusing the fine-grid samples makes Richardson extrapolation especially attractive here: the resulting Simpson's rule needs no samples beyond those already used by .
Figure 2.
Exponential quadrature on nested grids: trapezoidal areas, reused sample nodes, and the fourth-order Simpson combination
. Source. Details.
When the improvement is justified. Richardson extrapolation requires the stated asymptotic expansion and the correct positive . If the actual leading exponent is , its coefficient after combination is , so the leading truncation error generally remains. Merely knowing does not supply a common coefficient or a higher-order remainder. A discontinuity of a function, a singular endpoint, or unrelated changes between grids can invalidate the assumed asymptotic expansion; refinement alone does not guarantee improvement for every numerical problem.
Roundoff error and errors in the sampled values survive the cancellation of truncation error. If the coarse and fine values have absolute perturbations bounded by , the perturbation in is bounded by ; for this is . In floating-point arithmetic, a centered difference quotient can also amplify sample errors through division by , so an indefinitely smaller need not be more accurate. Persson's notes describe this balance between truncation error and roundoff error.[ref]
The same cancellation idea appears in step-doubling error estimation. For an order- one-step method for an ordinary differential equation, two half steps each contribute local truncation error of order , so their accumulated leading local error has ratio to one full step. This explains the denominator there; the appropriate exponent follows from that local error model, rather than automatically from a generic use of Richardson extrapolation.
Second Dahlquist barrier Created 2026-09-28 Updated 2026-11-05
The Second Dahlquist barrier states that an irreducible A-stable linear multistep method with constant real coefficients and only first-derivative evaluations has classical order at most two. Irreducible means that its characteristic polynomials and have no common factor. The theorem concerns the entire recurrence, rather than a formula obtained by canceling unstable starting modes.[ref]
The trapezoidal rule and BDF2 method attain order two while remaining A-stable. Increasing the number of retained values cannot produce a third-order method with all of these properties. A multiderivative multistep method lies outside the hypotheses: the A-stable third-order two-step multiderivative method uses second derivatives and therefore provides no contradiction. Likewise, high-order Gauss collocation methods are Runge-Kutta methods, a different class.
For with , the trapezoidal rule satisfies the displayed bound, and the constant is best possible. The polynomial interpolation error for the endpoint linear interpolant satisfies , where . Integrating this inequality and using the triangle inequality for an integral proves the bound because . Equality holds for : the exact integral is , its trapezoidal rule estimate is , and .
Theta method 2026-10-14
This one-step family interpolates between the Forward Euler method at , the trapezoidal rule at , and the Backward Euler method at . Its stability function is . It is first order except at one half, where it is second order. Applying it to spatial diffusion gives the theta diffusion stability criterion.
Total ion current profile 2026-11-05
A total ion current profile plots total ion current from successive mass spectra against time. In liquid chromatography–mass spectrometry, it can show the passage of summed ion signal through the measurement system. IUPAC uses the broader profile term for time-dependent sampling beyond chromatography as well.[ref]
With fixed included mass-to-charge ratio bins , a reconstructed profile is
where labels a spectral acquisition. An extracted ion profile instead follows a selected mass interval or feature. Changing , scan conditions or detector response can change the total profile even if the underlying sample composition is unchanged.
Consider three scans at . An invented ion A contributes , ion B contributes , and constant background contributes . Their total profile is . Its last two points form a plateau even though the individual ion signals have changed completely. The total alone cannot distinguish that exchange from one ion remaining constant.
If one deliberately chooses straight-line interpolation between these three total-signal measurements, the trapezoidal rule gives area
The discrete sum is a different quantity. Neither calculation identifies a chemical species, and unsampled signal changes remain unknown. State the time spacing, mass range, baseline and interpolation or integration rule when comparing profile areas. A total profile is useful for acquisition overview; the underlying mass spectra preserve the information needed to investigate its apparent peaks and plateaus.
This real-parameter linear multistep method has formal order two except at the degenerate value , where its local symbol vanishes to fourth degree. The zero-stability roots are and , so it is convergent exactly for . Every convergent member is A-stable: the boundary-locus test for multistep A-stability gives nonnegative real part , with no unit-circle denominator zero for . At the two interlaced sequences obey a trapezoidal step of length . At it is the BDF2 method. The endpoint two fails the root condition for a multistep method even though canceling a common polynomial factor resembles the trapezoidal rule.
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 satisfies
A 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] A short derivation is the identity
obtained by two integrations by parts. The nonnegative Peano kernel has integral , and the weighted mean value theorem for integrals gives the formula.
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.
Trapezoidal rule fails B-stability Created 2026-10-05 Updated 2026-10-14
The trapezoidal rule is A-stable but is not B-stable. For the dissipative vector field at step size one, its uniquely defined step map obeys . At , and implicit differentiation gives , so nearby states expand rather than contract. This is a concrete nonlinear obstruction, rather than merely failure of the sufficient algebraic stability criterion.
The exponential-symbol order criterion for a multistep method gives leading defect , so the family has order two except at , where it has order three. The root condition for a multistep method holds exactly for , and the convergent A-stable members are exactly . At it reduces to the trapezoidal rule after removal of a zero root. At a repeated root one destroys convergence of a numerical method of the original recurrence despite a common polynomial factor and a formally vanishing second-order residual.