Example 6. Use the Gaussian
elimination methods to solve
, where
is the Hilbert matrix and
. Use
the trivial, partial scaled partial and total pivoting
strategies.
Solution 6.
![[Graphics:../Images/PivotingMod_gr_218.gif]](../Images/PivotingMod_gr_218.gif)
Perform Gaussian elimination using the various pivoting strategies.
![[Graphics:../Images/PivotingMod_gr_219.gif]](../Images/PivotingMod_gr_219.gif)
The output has been suppressed because of its size.
Summary Let us compare the "true solution" with the results from the various methods.
![[Graphics:../Images/PivotingMod_gr_221.gif]](../Images/PivotingMod_gr_221.gif)
![[Graphics:../Images/PivotingMod_gr_222.gif]](../Images/PivotingMod_gr_222.gif)
For this example, we see that the total pivoting
solution
is
slightly better than the others.
Warning. We must proceed with caution when using a Hilbert matrix because the linear system might be ill conditioned.
![[Graphics:../Images/PivotingMod_gr_225.gif]](../Images/PivotingMod_gr_225.gif)
The condition number of the above system can be determined by Mathematica.
![]()
Fact. Given
the linear system
. If
are
input with machine precision then a bound for the error in the
computed solution
is
given by
where
is machine epsilon for the
computer. The computed
solution
loses
about
decimal
digits of accuracy relative to precision of input.
![[Graphics:../Images/PivotingMod_gr_236.gif]](../Images/PivotingMod_gr_236.gif)
Caveat. Mathematica
uses extended precision sixteen digit numbers, the
solution
retains
some of this accuracy.
(c) John H. Mathews 2005