Example 6. Find the polynomial  p[x]  that passes through the six points  [Graphics:Images/GaussianJordanMod_gr_249.gif]  using the following steps.
(a). Write down the linear system MC = B to be solved.
(b). Solve the linear system for the coefficients [Graphics:Images/GaussianJordanMod_gr_250.gif] using our Gauss-Jordan subroutine.
(c). Construct the polynomial  p[x].

Solution 6.

(a). Write down the linear system MC = B to be solved.

[Graphics:../Images/GaussianJordanMod_gr_251.gif]



[Graphics:../Images/GaussianJordanMod_gr_252.gif]

[Graphics:../Images/GaussianJordanMod_gr_253.gif]

[Graphics:../Images/GaussianJordanMod_gr_254.gif]

Form the augmented matrix  M = [A,B].  

[Graphics:../Images/GaussianJordanMod_gr_255.gif]



[Graphics:../Images/GaussianJordanMod_gr_256.gif]

[Graphics:../Images/GaussianJordanMod_gr_257.gif]

[Graphics:../Images/GaussianJordanMod_gr_258.gif]

[Graphics:../Images/GaussianJordanMod_gr_259.gif]

(b). Solve the linear system for the coefficients [Graphics:../Images/GaussianJordanMod_gr_260.gif] using our Gauss-Jordan subroutine.

 

[Graphics:../Images/GaussianJordanMod_gr_261.gif]

This time use Mathematica to get the solution vector  [Graphics:../Images/GaussianJordanMod_gr_262.gif]  out of this augmented matrix !

[Graphics:../Images/GaussianJordanMod_gr_263.gif]


[Graphics:../Images/GaussianJordanMod_gr_264.gif]

Or, we could use Mathematica's built in  LinearSolve[M,B]  procedure.

[Graphics:../Images/GaussianJordanMod_gr_265.gif]


[Graphics:../Images/GaussianJordanMod_gr_266.gif]

(c). Construct the polynomial  p[x].  The coefficients are stored in the array  c  and the elements are [Graphics:../Images/GaussianJordanMod_gr_267.gif].

[Graphics:../Images/GaussianJordanMod_gr_268.gif]



[Graphics:../Images/GaussianJordanMod_gr_269.gif]

Of course we could do all this work in two lines by using Mathematica's built in  InterpolatingPolynomial[XY,x]  procedure.

[Graphics:../Images/GaussianJordanMod_gr_270.gif]



[Graphics:../Images/GaussianJordanMod_gr_271.gif]

We are done.

We can graph the polynomial, this is just for fun !

[Graphics:../Images/GaussianJordanMod_gr_272.gif]


[Graphics:../Images/GaussianJordanMod_gr_273.gif]

[Graphics:../Images/GaussianJordanMod_gr_274.gif]

[Graphics:../Images/GaussianJordanMod_gr_275.gif]

[Graphics:../Images/GaussianJordanMod_gr_276.gif]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004