Example 8. Consider
the linear system AC=B
in Example 7, i.e.
.
Solution 8.
(a). Enter the new matrix A and vector B.
(b). Solve the linear system
for the coefficients
using our LUfactor[n] and SolveLU[n] subroutines.
Remark. The solution is quite different from that of Example 7. This is not a problem in our subroutines, Mathematica will also get this answer.
These solution values are so far from the
previous ones in Example 7 that they appear to be a worthless answer,
and this type of ill-conditioning is not easy to
detect. One would normally expect that a small change in a
coefficient in the matrix would result in a small change in the
computed solution. We changed the
element
a small fraction,
, and
the changes in the coefficients went
from
to
.
The element
was
replaced with
in the matrix ? This change is merely
. The
percentage change in the solution
is 36%.
Continue with the explorations.
(c). Construct the
polynomial p[x]. The
coefficients are stored in the array c and
the elements are
.
We are done.
We can graph the polynomial, this is just for fun !
![[Graphics:../Images/LUFactorMod_gr_272.gif]](../Images/LUFactorMod_gr_272.gif)
Behold, do our eyes see anything significantly different from the previous graph in Example 7 ?
![[Graphics:../Images/LUFactorMod_gr_277.gif]](../Images/LUFactorMod_gr_277.gif)
![[Graphics:../Images/LUFactorMod_gr_281.gif]](../Images/LUFactorMod_gr_281.gif)
If you were looking for the polynomial
and found the polynomial
would
you be happy ?
Warning. Remember to check the condition number of your matrix, beware if it is large and seek alternate ways to find compute a solution. In approximation theory there are other methods and algorithms which can be used.
(c) John H. Mathews 2004