Example 3. Find the Newton
polynomial of degree n=3 that
passes through the four points
.
Solution 3.
Set up the four equations to be solved.
|
|
|
|
|
|
|
|
Solve these equations for the coefficients
.
If the matrix method AX = B is preferred, then we can have Mathematica convert the 4 equations to a 4⨯4 matrix and a column vector.
The first part of this data structure is the matrix A and the second part is the column vector B.
The solution can be found by using our forward substitution subroutine.
If you prefer, you could even let Mathematica do it with the built in procedure LinearSolve.
In any event, we have determined the coefficients of the desired Newton polynomial.
We see that P[t] passes
through the given points
.
We are done.
We can graph the polynomial, just for fun!
![[Graphics:../Images/BackSubstitutionMod_gr_175.gif]](../Images/BackSubstitutionMod_gr_175.gif)
(c) John H. Mathews 2004