Example 6. Use the Gaussian elimination methods to solve  [Graphics:Images/PivotingMod_gr_214.gif],  where [Graphics:Images/PivotingMod_gr_215.gif] is the Hilbert matrix and  [Graphics:Images/PivotingMod_gr_216.gif].  Use the trivial, partial scaled partial and total pivoting strategies.
Solution 6.

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


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

 

 

Perform Gaussian elimination using the various pivoting strategies.

[Graphics:../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_220.gif]

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

 

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

 

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

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

 

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

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

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

 

 

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

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

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

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


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

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2005