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 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.
Integrate the five Lagrange interpolation polynomials at the equally spaced nodes to obtain the displayed rule. It is exact for polynomials through degree four, and symmetry also makes it exact in degree five. Symmetric endpoint, inner-node and midpoint weights satisfy , , , giving , , .
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.
A quadrature node is a point at which the integrand is sampled by a quadrature rule. Under the affine map from to , a reference quadrature node becomes ; for ordinary numerical integration, the corresponding quadrature weight is multiplied by .
A quadrature weight multiplies a sampled integrand value in a quadrature rule. For ordinary numerical integration, its units match those of the integration variable. Positive quadrature weights that sum to make a weighted average of the samples; signed quadrature weights can magnify sample perturbations, as quantified by noise sensitivity of a quadrature rule.
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.
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.
Integrate the Lagrange polynomial through values at all equally spaced nodes , including both endpoints. The resulting quadrature rule is exact through degree . For even , the node polynomial is odd about , so its integral vanishes and exactness extends through degree . The weights need not remain positive as the number of nodes increases.
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.
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 .
Composite Simpson's rule applies Simpson's rule to consecutive pairs of equal subintervals. Choose a positive even integer , put , and take quadrature nodes for . There are subintervals, two-subinterval panels, and quadrature nodes. ThenThe second sum is empty when , recovering one panel. The quadrature weights, before multiplication by , are . Every interior even-indexed quadrature node is an endpoint of two panels, so its two endpoint contributions add to two; every odd-indexed quadrature node is a midpoint with weight four. An odd cannot be covered by these pairs. The displayed formula requires equal spacing.[ref]
5.6 Numerical integration. Fundamentals of Numerical Computation by Tobin A. Driscoll and others; §5.6, equations 5.6.20–5.6.21: elementary and composite Simpson formulas
For the exponential function on the interval , the exact integral is . With , the formula gives , an overestimate of about . With , it gives , an overestimate of about . The figure shows the intermediate refinements and compares every computed absolute error with the error bound for composite Simpson's rule.
Computed composite Simpson errors for the exponential function on zero to one approach fourth-order convergence; the dashed curve is the rigorous bound e over 180 n to the fourth power
. Details. For this exponential function, a geometric series also gives a compact independent formula. With and , summing the panel contributions yieldsA Taylor series at givesThe Big O notation describes the remaining terms as tends to zero. Consequently tends to sixteen: the computed ratios increase from about to . Fourth-order truncation error is also obtained by Richardson extrapolation of the composite trapezoidal rule.[ref]
5.6 Numerical integration. Fundamentals of Numerical Computation by Tobin A. Driscoll and others; §5.6.2, equations 5.6.14–5.6.15: Simpson extrapolation and fourth-order error
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.
On a compact interval, positive quadrature rule weights whose sum is the interval length define uniformly bounded functionals on continuous functions. If the rules eventually integrate every fixed polynomial exactly, the Weierstrass approximation theorem proves convergence for every continuous function.
An -node quadrature rule already exact through degree is exact through degree exactly when its nodal polynomialis orthogonal to every polynomial of degree at most .
No -node quadrature rule for a positive interval weight can be exact through degree , because it evaluates the nonnegative nodal square as zero although its integral is positive.
If an -node quadrature rule for a positive interval weight is exact through degree , every weight is positive. Indeed, applying the rule to the square of the corresponding degree- Lagrange cardinal polynomial isolates that weight.
If each -node quadrature rule is exact through degree and has positive weights, then it converges on every continuous function. The Weierstrass approximation theorem reduces the error to the uniform polynomial-approximation error, while exactness on constants controls the sum of the weights.
A quadrature rule is exact through degree precisely when its node weights reproduce the first moments of the integration measure.
Articles by others on the same topic
Numerical integration is a computational technique used to estimate the value of a definite integral when an analytical solution is difficult or impossible to obtain. It involves approximating the area under a curve defined by a mathematical function over a specified interval. This is particularly useful for functions that are complex, have no closed-form antiderivative, or are only known through discrete data points. There are various methods of numerical integration, each with its own advantages and limitations.



