Topic 10. Interpolation. Parabolic interpolation. Spline interpolation
Site: | Навчально-інформаційний портал НУБіП України |
Course: | Computers and Computer Technology (БЦІ). P2 ☑️ |
Book: | Topic 10. Interpolation. Parabolic interpolation. Spline interpolation |
Printed by: | Гість-користувач |
Date: | Tuesday, 13 May 2025, 12:48 AM |
Description
1. Statement of the problem of interpolation
When solving many practical problems it is necessary to solve two mutually inverse problems: 1) on the analytical task of the function to get meaning for its specific arguments (to compile a table of values of the function at some of its points) - task tabulation function; 2) get the intermediate value (according to some analytical expressions, to determine the value of the function for a given argument) according to the given table value - the interpolation problem.
Let some function y = f (x) be given tabularly - for the given values of the argument x i the values of the function y i = f (x i ), i = 0, .. n) are given. It is necessary to find the analytic expression of a function that would coincide with this function f (x i ), namely at the points x i took the value y i , i = 0..n. From the geometric point of view, the problem of interpolation is reduced to finding the equation of the curve y = P (x), which passes through the given points (x i , y i ), i = 0 ..n.
An approximation of the function y = f (x) to the segment [a, b] is one of the functions y = P (x), so that the function y = P (x) at the points x i , i = 0..n acquires the same values , that the function y = f (x), ie P (x i ) = y i i = 0..n is called interpolation (or interpolation). The points x i , i = 0..n are called interpolation nodes, the function y = P (x) is an interpolating function, and the formula f (x) »P (x) is an interpolation formula.
Interpolation polygon is built in cases:
- the function is given tabularly for some arguments of the argument, but you need to find its value for an argument that is not in the table;
- the function is given graphically, but it is necessary to find its approximate analytic expression;
- the function is given by a complex analytical expression that is not convenient for integration, differentiation.
Depending on the type of function y = P (x), the methods of interpolation are divided into:
- parabolic (algebraic polynomials) - linear, quadratic, etc.
- transcendental (trigonometric).
As a rule, under interpolation understand the following tasks:
- the choice of the most satisfactory way of constructing an interpolation polynomial of a given function for each particular case;
- estimation of the error when replacing P n (x) f (x) for xÎ] a; b [;
- optimal selection of interpolation nodes for less error.
The task of extrapolation is to find the value of a function for an argument that lies outside the function definition table.
2. Parabolic interpolation
Interpolation by algebraic polynomials is called parabolic interpolation. The construction of a parabolic interpolation has the following form:
- for the given values f (x i ) = y i , i = 0..n to construct the polynomial y = P (x) = a o x n + a 1 x n-1 + .. + a n , where n is the power and which meets the requirements:
- at the points x i , i = 0..n, the value of the polynomial P n (x i ) coincides with the value of the given function f (x i ), that is P n (x i ) = f (x i ) = y i , i = 0 ..n;
- At any other point xÎ] x o ; x n [the equality P n (x) »f (x) is approximated .
The geometric nature of parabolic interpolation is that the graph of one function f (x) is replaced by the graph of the polynomial P of degree n, and these two graphs have (n + 1) a common point.
For parabolic interpolation, the number of interpolation nodes generates a polynomial order per unit smaller.
Linear interpolation
- given the function f (x) at two points: f (x o ) = y o and f (x 1 ) = y 1 ;
- the order of the sought interpolation polynomial n = 1.
The essence of the method. The graph of the linear function P 1 (x) = a o x + a 1 must pass through two points (x o ; y o ) and (x 1 ; y 1 ). Therefore, the desired coefficients a o and a 1 can be determined from the system of linear equations:
The solution of this system relative to a o and a 1 is obtained:
Then the interpolation polynomial can be written as:
Thus, the function f (x) can be rearranged by an approximate polynomial of the form P 1 (x), which is called the linear interpolation formula. From the geometric point of view, the linear interpolation formulas replace the arc of the curve y = f (x) on the interval [x 0 ; x 1 ] segment of a straight line y = P 1 (x), which passes through the point (x o ; y o ) and (x 1 ; y 1 ) type:
where:
Linear interpolation is often used when working with prepared tables when finding the value of a function for intermediate values of arguments.
Quadratic interpolation
Output data:
- given the function f (x) at three points: f (x o ) = y o ; f (x 1 ) = y 1 ; and f (x 2 ) = y 2 ;
- the order of the sought interpolation polynomial n = 2.
The essence of the method. The graph of the quadratic function P 2 (x) = a o x 2 + a 1 x + a 2 must pass through the maple three (x o ; y o ), (x 1 ; y 1 ) and (x 2 ; y 2 ). Therefore, the desired coefficients a o , a 1 and a 2 can be determined from the system of linear equations:
After solving this system, we obtain an interpolation polynomial of the form
Thus, the function f (x) can be rearranged by an approximate polynomial of the form P 2 (x), which is called the quadratic interpolation formula. From a geometrical standpoint, formula quadratic interpolation replace the arc of the curve y = f (x) on the interval [x 0 ; x 1 ; x 2 ] parabolic curve y = P 2 (x), which passes through the point (x o ; y o ) ; (x 1 ; y 1 ) and (x 2 ; y 2 ).
3. Interpolation formula of Lagrange
Output data:
- the value of the unknown function f (x) at two or more points: f ( xо) = y o ; f (x 1 ) = y 1 ; ...; f (x n ) = y n ;
- the order of the interpolating polynomial (n-1).
The essence of the method. As an interpolating polynomial, we will take the form of a polynomial:
,
and the values of P n (x) in the interpolation nodes must coincide with the values of the given function f (x), that is: P n (x) = f (x i ) = y i (i = 0,1,2, ..., n).
This condition allows you to go to the system with (n + 1) linear equations. Since the interpolation nodes are different, then this system of linear equations has only one solution. And hence, the interpolation polynomial P n (x) exists and will be unique. We will derive this polynomial in the following way. First, let's consider the auxiliary polynomial F (x), which takes the value of F 0 (x 0 ) = 1 at the interpolation node x 0 , and in all other nodes x i (i = 1,2, ..., n), the value of this polynomial is equal zero: F 0 (x 1 ) = F 0 (x 2 ) = ... = F 0 (x n ) = 0. Such a polynomial will look like:
.
The interpolation nodes x 1 , x 2 , ..., x n are the roots of the polynomial F 0 (x 0 ), and at the point x = x 0 the numerator is equal to the denominator, and hence, F 0 (x 0 ) = 1. A similar polynomial will be constructed for a node x = x 1 , whose form:
.
The same polynomials can be constructed for all other nodal points of interpolation. In the general form, the polynomials F i (x), (i = 0,1,2, ..., n) can be written as:
.
Then the desired interpolation polynomial will look like:
.
The product F i (x) y i (i = 0,1,2, ..., n) is zero in all interpolation nodes, except node xi, where they are equal to yi. Moreover, the order of the polynomial P n (x) is equal to n, since each term of the sum of F i (x) y i also has the order n.
The well-defined form P n (x) is called the Lagrange interpolation polynomial. In turn, the Lagrange interpolation formula for determining the values of functions in the intermediate points xÎ] x o ; x n [, x χ i (i = 0,1, ..., n) has the form:
.
In the partial case, when there are two interpolation nodes, this formula represents the formula of linear interpolation, for the three nodes the quadratic interpolation formula.
Since the polynomial P n (x) is a parabolic curve of the nth order, such an interpolation is called parabolic.
The error of the parabolic interpolation depends on: 1) the polynomial; 2) the errors of the interpolation nodes, and also 3) the error of the calculation.
4. Spline interpolation
When interpolating functions with a large number of nodes, the interpolating polynomial has a high degree that causes its oscillations between nodes. To reduce the degree of polynomial, all interpolation nodes can be divided into groups and construct interpolation polynomials with fewer nodes. But in this case, at the intersections between polynomials, the analytic properties of the interpolating polynomial are violated, and the derivation points appear. One of the outputs of this provision is the use of splines.
The spline on the gap between the interpolation nodes is a low-level polynomial (n = 3,4). The spline over the entire interpolation segment is a function that consists of different parts of the polynomials of a given degree. A striking example of a spline is a pattern.
Spline is a function which, along with several derivatives, is continuous on the entire given interval [], and on each partial segment [,] separately is a certain algebraic polynomial.
The spline's degree is called the maximum of polynomials in all partial segments, and the spline defect is the difference between the degree of spline and the order of the highest continuous on [] of the derivative. For example, a continuous lamina is a spline of degree 1 with a defect 1 (the function itself is continuous, and the first derivative is already discontinuous).
Interpolation in the Maple environment
When interpolating functions with a large number of nodes, the interpolating polynomial has a high degree that causes its oscillations between nodes.
5. Self-checking
- What is interpolation?
- What is the order of parabolic interpolation for 4 interpolation nodes?
- What is the difference between parabolic and spline interpolations?
Font Face
Font Size
Text Colour
Background Colour
Font Kerning
Image Visibility
Letter Spacing
Line Height
Link Highlight