Читайте также:
|
|
Laboratory work № 5
Building of the Lagrange interpolation polynomial
Objectives: To acquire skills of building of the Lagrange interpolation polynomial on the base of ecological observations. To apply the interpolation polynomial for evaluating function values at given points.
Theoretical information.
The function is given on the interval by its explicit values at the interpolation :
. (1)
The problem of polynomial interpolation is to find a polynomial of degree n or less than , such that its values at the interpolation knots coincide with the given values . The Lagrange interpolation polynomial:
(2)
satisfy these conditions. Let’s represent the Lagrange polynomial in the general form:
(3)
Then determining unknown coefficients is reduced to solving the system of linear equations:
(4)
For solving this system it is necessary to check that the system determinant is nonzero and to find the solution by means of one known methods (for example by the method of inverse matrix).
By means of the Lagrange interpolation polynomial it is possible to find approximate values of the function at any points of the interval :
The task:
Initial data:
Variant № | X0 | X1 | X2 | X3 | X4 | Y0 | Y1 | Y2 | Y3 | Y4 | Δ |
- | - | 0,5 | |||||||||
2,5 | - | - | 0,5 | ||||||||
0,5 | |||||||||||
- | - | 0,5 | |||||||||
2,5 | - | - | 0,5 | ||||||||
0,5 | |||||||||||
Questions:
The sample:
Represent the results of ecological observations (initial data) in the form of a table:
i | ||||
Xi | ||||
Yi |
Conclusion: the degree of the Lagrange interpolation polynomial is equal to 3.
Calculate the coefficients of the linear equation system for determining the unknown coefficients :
Thus the system has the form:
Use the built-in EXCEL function МОПРЕД, to find the determinant of the system:
detX= |
Find the inverse matrix (the function МОБР):
3,75 | -5,00 | 2,50 | -0,25 | |
X-1= | -3,88 | 7,67 | -4,25 | 0,46 |
1,25 | -3,00 | 2,00 | -0,25 | |
-0,13 | 0,33 | -0,25 | 0,04 |
Multiply the inverse matrix by the vector of the right part of the system (the function МУМНОЖ) and find the coefficients :
a0= | -31,50 |
a1= | 54,58 |
a2= | -26,00 |
a3= | 3,92 |
Thus the Lagrange interpolation polynomial for the given task has the form:
Calculate by means of this formula values of the function on the interval [1, 5] with the step 0,5:
Xm | 1,00 | 1,50 | 2,00 | 2,50 | 3,00 | 3,50 | 4,50 |
f(Xm) | 1,00 | 5,09 | 5,00 | 3,66 | 4,00 | 8,97 | 44,53 |
And build the corresponding graphic:
Дата добавления: 2015-11-14; просмотров: 40 | Нарушение авторских прав
<== предыдущая страница | | | следующая страница ==> |
Сутність заробітної плати, характеристика основних форм та систем оплати праці. | | | Основные принципы и функции маркетинга. |