Example 5. Use the Gaussian elimination methods to solve  [Graphics:Images/PivotingMod_gr_190.gif],  where [Graphics:Images/PivotingMod_gr_191.gif] is the Hilbert matrix and  [Graphics:Images/PivotingMod_gr_192.gif].  Use the trivial, partial scaled partial and total pivoting strategies.
Solution 5.

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


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

 

 

Perform Gaussian elimination using the various pivoting strategies.

[Graphics:../Images/PivotingMod_gr_195.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_196.gif]

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

 

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

 

For this example, we see that the partial pivoting solution  [Graphics:../Images/PivotingMod_gr_199.gif]  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_200.gif]

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

 

    The condition number of the above system can be determined by Mathematica.

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

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

 

 

Fact.  Given the linear system  [Graphics:../Images/PivotingMod_gr_204.gif].  If   [Graphics:../Images/PivotingMod_gr_205.gif]  are input with machine precision then a bound for the error in the computed solution  [Graphics:../Images/PivotingMod_gr_206.gif]  is given by

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

where
[Graphics:../Images/PivotingMod_gr_208.gif] is machine epsilon for the computer.  The computed solution  [Graphics:../Images/PivotingMod_gr_209.gif]  loses about  [Graphics:../Images/PivotingMod_gr_210.gif]  decimal digits of accuracy relative to precision of input.

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


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

Caveat.  Mathematica uses extended precision sixteen digit numbers, the solution  [Graphics:../Images/PivotingMod_gr_213.gif]  retains some of this accuracy.  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2005