Numerical differentiation and integration
Numerical differentiation methods are used if the original function f (x) is difficult or impossible to analytically differentiate. For example, this function can be specified in a table. The challenge of numerical differentiation is to choose an easily computable function (usually a polynomial), for which it is approximately assumed
...
Numerical differentiation is an ill-posed problem, since there is no stability of the solution. In numerical differentiation, close function values have to be subtracted from each other. This leads to the destruction of the first significant digits, i.e. to the loss of a part of reliable number signs. And since the values of the function are usually known with a certain error, then all significant figures can be lost. On the graph, curve (1) corresponds to a decrease in the differentiation error with a decrease in the step; curve (2) is an unboundedly increasing (oscillating) contribution of the unremovable error of the initial data - the values of the function y (x). The criterion for going beyond the optimal step when decreasing it is the "looseness" of the solution: the dependence of the calculation results becomes irregularly dependent on the step size.
Let be introduced as Newton's interpolation polynomial. In this case, for an arbitrary non-uniform mesh:
, for i = 0,1 ... n-1, interpolation by a polynomial of the first degree.
, interpolation by a polynomial of the second degree.
In general ... The minimum number of nodes required to calculate the kth derivative is k + 1.
The estimation of the error in numerical differentiation can be carried out by the formula , where n is the number of nodes of the function, k is the order of the derivative.
In practice, simplified formulas for a uniform grid are most often used, and the accuracy is often increased. The following formulas are often used for three nodes:
, where h = x1 - x0 = const.
...
Based on the general form of the interpolation polynomial, you can derive formulas for a higher order of accuracy or for higher derivatives.
2. Numerical integration
Numerical Integration Problemconsists in replacing the original integrand function f (x), for which it is difficult or impossible to write the antiderivative in analytics, by some approximating function φ (x). Such a function is usually a polynomial (piecewise polynomial)... I.e:
,
Where Is the a priori error of the method on the integration interval,
and r (x) is the a priori error of the method at a separate integration step.
Overview of integration methods...
Methods for calculating single integrals are called quadrature (for multiple integrals - cubature).
Newton-Cotes methods. Here φ (x) is a polynomial of different degrees. This includes the method of rectangles, trapezoids, Simpson.
Statistical test methods (Monte Carlo methods). Here grid points for quadrature or cubature integration are selected using a random number generator, the answer is probabilistic. They are mainly used to calculate multiple integrals.
Spline methods. Here φ (x) is a piecewise polynomial with connection conditions between individual polynomials by means of a system of coefficients.
Highest Algebraic Accuracy Methods. Provide the optimal arrangement of the integration grid nodes and the choice of the weight coefficients ρ (x) in the problem
... This includes the Gauss-Christoffel method (calculation of improper integrals) and the Markov method.
Method of rectangles.
Distinguish between the method of left, right and middle rectangles. The essence of the method is clear from the figure. At each step of integration, the function is approximated by a zero degree polynomial - a segment parallel to the abscissa axis.
Let us derive the formula for the method of rectangles from the analysis of the expansion of the function f (x) in the Taylor series near some point x = xi.
...
Consider the range of integration from xi to xi + h, where h is the integration step.
We calculate … =
==
... We got the formula for right (or left) rectangles and an a priori estimate of the error r at a separate integration step. The main criterion by which the accuracy of the algorithm is judged is the degree at the step size in the formula for the a priori estimate of the error.
In the case of an equal step h over the entire range of integration, the general formula has the form
...
Here n is the number of partitions of the integration interval, ... For this estimate to exist, the existence of a continuous f '(x) is necessary.
Medium rectangles method... Here, on each interval, the value of the function is calculated at the point, i.e ... The expansion of the function in a Taylor series shows that in the case of medium rectangles, the accuracy of the method is much higher:
...
Trapezium method.
The approximation in this method is carried out by a polynomial of the first degree. The essence of the method is clear from the figure.
On a unit interval...
In the case of a uniform grid (h = const)
Wherein , and ... The error of the trapezium method is twice as high as that of the average rectangle method! However, in practice, it is possible to find the average value on an elementary interval only for functions that are given analytically (and not tabularly); therefore, it is far from always possible to use the method of mean rectangles. Due to the different signs of the error in the formulas for trapeziums and mean rectangles, the true value of the integral usually lies between these two estimates.
Разрыв страницы

评论
发表评论