Example 6. Find the
polynomial p[x] that
passes through the six points
using
the following steps.
(a). Write down the linear system
MC = B to be solved.
(b). Solve the linear system for
the coefficients
using our Gauss-Jordan subroutine.
(c). Construct the
polynomial p[x].
Solution 6.
(a). Write down the linear system MC = B to be solved.
Form the augmented matrix M = [A,B].
(b). Solve the linear system
for the coefficients
using our Gauss-Jordan subroutine.
This time use Mathematica to get the solution
vector
out
of this augmented matrix !
Or, we could use Mathematica's built in LinearSolve[M,B] procedure.
(c). Construct the
polynomial p[x]. The
coefficients are stored in the array c and
the elements are
.
Of course we could do all this work in two lines by using Mathematica's built in InterpolatingPolynomial[XY,x] procedure.
We are done.
We can graph the polynomial, this is just for fun !
![[Graphics:../Images/GaussianJordanMod_gr_273.gif]](../Images/GaussianJordanMod_gr_273.gif)
(c) John H. Mathews 2004