Numerical integration
In numerical mathematics, numerical integration (traditionally also called numerical quadrature) refers to the approximate computation of integrals.
Often integrals cannot be solved in a closed way, because the integrand cannot be given as a primitive function or it is only given by discrete values, e.g. measurements. Then one tries to determine approximate values.
For this purpose, the integral of a function over the interval is represented as the sum of the value of an approximation formula (also called a quadrature formula) and an error value :
The idea of numerical computation of integrals borrows directly from the definition of the Riemann integral.
Quadrature Procedure
Graphical methods
In graphical methods, the graph of the integrand is plotted in a coordinate system with linear axes and the area between the graph and the abscissa is determined.
Counting method
A particularly simple procedure is to plot the graph on graph paper and then determine the number of "square millimetre boxes" (area elements) covered by the area S. In this case, only half of the area elements through which the graph passes are counted. Here, area elements through which the graph passes are only counted by half. The approximation then results with the number of square millimeters and the scale parts Δ and Δ to:
Measurement
Another graphical method is the measurement of the area by means of a planimeter.
quadrature formula calculation
In general, a quadrature formula consists of a weighted sum of function values
The places called supporting places and the numbers weights. The weights here depend on the distances of a grid point to the neighboring grid points. There are different approaches how to choose grid points and weights in a way that the quadrature error as small as possible.
A quadrature formula has the degree of precision (or exactness) if it integrates all polynomial functions up to the maximum degree exactly, and is the largest possible natural number with this property.
Like the integral, quadrature formulas are linear operators.
interpolation points
Interpolatory quadrature formula
An important class of quadrature formulas arises from the idea of approximating the function by an interpolation polynomial of degree and then integrating it. The weights are then obtained as the integrals of the Lagrange polynomials to the given support points. By construction, these quadrature formulas have at least degree of accuracy . The quadrature formula is therefore
with the weights
and the Lagrange polynomials
If the integration limits are support points, one speaks of closed quadrature formulas, otherwise of open ones. If the support points are chosen equidistantly, the Newton-Cotes formulas result among others. Among the closed Newton-Cotes formulas are the chordal trapezoid rule and Simpson's rule, among the open ones is the tangent trapezoid rule. The Newton-Cotes formulas for even even have the degree of precision . The open quadrature formulas also include the Gauss quadrature formulas.
Error estimation
Let denote the smallest interval containing the interpolation points and the interval Furthermore, let -times continuously differentiable on . According to the interpolation quality of the interpolation polynomial, there exists a ξ , such that holds:
By integration, the error formula for numerical quadrature is obtained
.
If for all , the quadrature error is 0. Since this is the case for all polynomials up to degree , the degree of accuracy of these quadrature formulas is at least .
From this error formula follows the error estimate
.
If the function in the interval not change its sign, i.e., if no support point lies in the interval , one can derive the following representation for the remainder element using the mean value theorem of integral calculus:
.
With an intermediate .
Similar formulas for the quadrature error are also obtained for special distributions of the grid points in the interval for example for the Newton-Cotes formulas or the Gauss quadrature formulas.
If the function is only continuous, the above statements do not hold, the error can become very large.