




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





Jim Lambers MAT 460/ Fall Semester 2009- Lecture 17 Notes
These notes correspond to Section 3.2 in the text.
In the previous lecture, we learned how to compute the value of an interpolating polynomial at a given point, using Neville’s Method. However, the theorem that serves as the basis for Neville’s Method can easily be used to compute the interpolating polynomial itself. The basic idea is to represent interpolating polynomials using the Newton form, which uses linear factors involving the interpolation points, instead of monomials of the form 푥푗^. Recall that if the interpolation points 푥 0 ,... , 푥푛 are distinct, then the process of finding a polynomial that passes through the points (푥푖, 푦푖), 푖 = 0,... , 푛, is equivalent to solving a system of linear equations 퐴x = b that has a unique solution. The matrix 퐴 is determined by the choice of basis for the space of polynomials of degree 푛 or less. Each entry 푎푖푗 of 퐴 is the value of the 푗th polynomial in the basis at the point 푥푖. In Newton interpolation, the matrix 퐴 is upper triangular, and the basis functions are defined to be the set {풩푗 (푥)}푛푗=0, where
푘=
The advantage of Newton interpolation is that the interpolating polynomial is easily updated as interpolation points are added, since the basis functions {풩푗 (푥)}, 푗 = 0,... , 푛, do not change from the addition of the new points. The coefficients 푐푗 of the Newton interpolating polynomial
푗=
are given by 푐푗 = 푓 [푥 0 ,... , 푥푗 ]
where 푓 [푥 0 ,... , 푥푗 ] denotes the divided difference of 푥 0 ,... , 푥푗. The divided difference is defined as follows:
푓 [푥푖] = 푦푖,
This definition implies that for each nonnegative integer 푗, the divided difference 푓 [푥 0 , 푥 1 ,... , 푥푗 ] only depends on the interpolation points 푥 0 , 푥 1 ,... , 푥푗 and the value of 푓 (푥) at these points. It follows that the addition of new interpolation points does not change the coefficients 푐 0 ,... , 푐푛. Specifically, we have
푝푛+1(푥) = 푝푛(푥) +
This ease of updating makes Newton interpolation the most commonly used method of obtaining the interpolating polynomial. The following result shows how the Newton interpolating polynomial bears a resemblance to a Taylor polynomial.
Theorem Let 푓 be 푛 times continuously differentiable on [푎, 푏], and let 푥 0 , 푥 1 ,... , 푥푛 be distinct points in [푎, 푏]. Then there exists a number 휉 ∈ [푎, 푏] such that
푓 [푥 0 , 푥 1 ,... , 푥푛] =
We now describe in detail how to compute the coefficients 푐푗 = 푓 [푥 0 , 푥 1 ,... , 푥푗 ] of the Newton interpolating polynomial 푝푛(푥), and how to evaluate 푝푛(푥) efficiently using these coefficients. The computation of the coefficients proceeds by filling in the entries of a divided-difference table. This is a triangular table consisting of 푛 + 1 columns, where 푛 is the degree of the interpolating polynomial to be computed. For 푗 = 0, 1 ,... , 푛, the 푗th column contains 푛 − 푗 entries, which are the divided differences 푓 [푥푘, 푥푘+1,... , 푥푘+푗 ], for 푘 = 0, 1 ,... , 푛 − 푗. We construct this table by filling in the 푛 + 1 entries in column 0, which are the trivial divided differences 푓 [푥푗 ] = 푓 (푥푗 ), for 푗 = 0, 1 ,... , 푛. Then, we use the recursive definition of the divided differences to fill in the entries of subsequent columns. Once the construction of the table is complete, we can obtain the coefficients of the Newton interpolating polynomial from the first entry in each column, which is 푓 [푥 0 , 푥 1 ,... , 푥푗 ], for 푗 = 0, 1 ,... , 푛. In a practical implementation of this algorithm, we do not need to store the entire table, because we only need the first entry in each column. Because each column has one fewer entry than the previous column, we can overwrite all of the other entries that we do not need. The following algorithm implements this idea.
Algorithm (Divided-Difference Table) Given 푛 distinct interpolation points 푥 0 , 푥 1 ,... , 푥푛, and the values of a function 푓 (푥) at these points, the following algorithm computes the coefficients 푐푗 = 푓 [푥 0 , 푥 1 ,... , 푥푗 ] of the Newton interpolating polynomial.
The resulting divided-difference table is 푥 0 = − 1 푓 [푥 0 ] = 3 푓 [푥 0 , 푥 1 ] = − 7 푥 1 = 0 푓 [푥 1 ] = − 4 푓 [푥 0 , 푥 1 , 푥 2 ] = 8 푓 [푥 1 , 푥 2 ] = 9 푓 [푥 0 , 푥 1 , 푥 2 , 푥 3 ] = − 6 푥 2 = 1 푓 [푥 2 ] = 5 푓 [푥 1 , 푥 2 , 푥 3 ] = − 10 푓 [푥 2 , 푥 3 ] = − 11 푥 3 = 2 푓 [푥 3 ] = − 6
It follows that the interpolating polynomial 푝 3 (푥) can be obtained using the Newton divided- difference formula as follows:
푗=
푖=
We see that Newton interpolation produces an interpolating polynomial that is in the Newton form, with centers 푥 0 = −1, 푥 1 = 0, and 푥 2 = 1. □
Once the coefficients have been computed, we can use nested multiplication to evaluate the resulting interpolating polynomial, which is represented using the Newton divided-difference formula
푝푛(푥) =
푗=
푗=
푖=
Algorithm (Nested Multiplication) Given 푛 distinct interpolation points 푥 0 , 푥 1 ,... , 푥푛 and the coefficients 푐푗 = 푓 [푥 0 , 푥 1 ,... , 푥푗 ] of the Newton interpolating polynomial 푝푛(푥), the following algo- rithm computes 푦 = 푝푛(푥) for a given real number 푥.
푦 = 푐푛 for 푖 = 푛 − 1 , 푛 − 2 ,... , 0 do 푦 = 푐푖 + (푥 − 푥푖)푦 end
It can be seen that this algorithm closely resembles Horner’s Method, which is a special case of nested multiplication that works with the power form of a polynomial, whereas nested multiplication works with the more general Newton form.
Example Consider the interpolating polynomial obtained in the previous example,
푝 3 (푥) = 3 − 7(푥 + 1) + 8(푥 + 1)푥 − 6(푥 + 1)푥(푥 − 1).
We will use nested multiplication to write this polynomial in the power form
푝 3 (푥) = 푏 3 푥^3 + 푏 2 푥^2 + 푏 1 푥 + 푏 0.
This requires repeatedly applying nested multiplication to a polynomial of the form
푝(푥) = 푐 0 + 푐 1 (푥 − 푥 0 ) + 푐 2 (푥 − 푥 0 )(푥 − 푥 1 ) + 푐 3 (푥 − 푥 0 )(푥 − 푥 1 )(푥 − 푥 2 ),
and for each application it will perform the following steps,
푏 3 = 푐 3 푏 2 = 푐 2 + (푧 − 푥 2 )푏 3 푏 1 = 푐 1 + (푧 − 푥 1 )푏 2 푏 0 = 푐 0 + (푧 − 푥 0 )푏 1 ,
It follows that
푝(푥) = −4 + (−7)(푥 − 0) + 14(푥 − 0)(푥 − (−1)) + (−6)(푥 − 0)(푥 − (−1))(푥 − 0) = − 4 − 7 푥 + 14푥(푥 + 1) − 6 푥^2 (푥 + 1),
and the centers are now 0, −1 and 0. For the second application of nested multiplication, we have
푝(푥) = − 4 − 7 푥 + 14푥(푥 + 1) − 6 푥^2 (푥 + 1),
so the coefficients of 푝(푥) in this Newton form are
푐 0 = − 4 , 푐 1 = − 7 , 푐 2 = 14, 푐 3 = − 6 ,
with the centers 푥 0 = 0, 푥 1 = − 1 , 푥 2 = 0.
Applying nested multiplication to these coefficients and centers, with 푧 = 0, yields
푏 3 = − 6 푏 2 = 14 + (0 − 0)(−6) = 14 푏 1 = −7 + (0 − (−1))(14) = 7 푏 0 = −4 + (0 − 0)(7) = − 4.
It follows that
푝(푥) = −4 + 7(푥 − 0) + 14(푥 − 0)(푥 − 0) + (−6)(푥 − 0)(푥 − 0)(푥 − (−1)) = −4 + 7푥 + 14푥^2 − 6 푥^2 (푥 + 1),
and the centers are now 0, 0 and −1. For the third and final application of nested multiplication, we have
푝(푥) = −4 + 7푥 + 14푥^2 − 6 푥^2 (푥 + 1),
so the coefficients of 푝(푥) in this Newton form are
푐 0 = − 4 , 푐 1 = 7, 푐 2 = 14, 푐 3 = − 6 ,
with the centers 푥 0 = 0, 푥 1 = 0, 푥 2 = − 1.
Applying nested multiplication to these coefficients and centers, with 푧 = 0, yields
푏 3 = − 6 푏 2 = 14 + (0 − (−1))(−6) = 8 푏 1 = 7 + (0 − 0)(8) = 7 푏 0 = −4 + (0 − 0)(7) = 1.
It follows that
푝(푥) = −4 + 7(푥 − 0) + 8(푥 − 0)(푥 − 0) + (−6)(푥 − 0)(푥 − 0)(푥 − 0) = −4 + 7푥 + 8푥^2 − 6 푥^3 ,
and the centers are now 0, 0 and 0. Since all of the centers are equal to zero, the polynomial is now in the power form. It should be noted that this is not the most efficient way to convert the Newton form of 푝(푥) to the power form. To see this, we observe that after one application of nested multiplication, we have
푝(푥) = 푏 0 + 푏 1 (푥 − 푧) + 푏 2 (푥 − 푧)(푥 − 푥 0 ) + 푏 3 (푥 − 푧)(푥 − 푥 0 )(푥 − 푥 1 ) = 푏 0 + (푥 − 푧)[푏 1 + 푏 2 (푥 − 푥 0 ) + 푏 3 (푥 − 푥 0 )(푥 − 푥 1 )].
Therefore, we can apply nested multiplication to the second-degree polynomial
푞(푥) = 푏 1 + 푏 2 (푥 − 푥 0 ) + 푏 3 (푥 − 푥 0 )(푥 − 푥 1 ),
which is the quotient obtained by dividing 푝(푥) by (푥 − 푧). Because
푝(푥) = 푏 0 + (푥 − 푧)푞(푥),
it follows that once we have changed all of the centers of 푞(푥) to be equal to 푧, then all of the centers of 푝(푥) will be equal to 푧 as well. In summary, we can convert a polynomial of degree 푛 from Newton form to power form by applying nested multiplication 푛 times, where the 푗th application is to a polynomial of degree 푛 − 푗 + 1, for 푗 = 1, 2 ,... , 푛. Since the coefficients of the appropriate Newton form of each of these polynomials of successively lower degree are computed by the nested multiplication algorithm, it follows that we can implement this more efficient procedure simply by proceeding exactly as before, except that during the 푗th application of nested multiplication, we do not compute the coefficients 푏 0 , 푏 1 ,... , 푏푗− 2 , because they will not change anyway, as can be seen from the previous computations. For example, in the second application, we did not need to compute 푏 0 , and in the third, we did not need to compute 푏 0 and 푏 1. □