Example 7. Use the Gaussian elimination methods to solve  [Graphics:Images/PivotingMod_gr_238.gif],  where [Graphics:Images/PivotingMod_gr_239.gif] is the Hilbert matrix and  [Graphics:Images/PivotingMod_gr_240.gif].  Use the trivial, partial scaled partial and total pivoting strategies.
Solution 7.

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


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

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

 

 

Perform Gaussian elimination using the various pivoting strategies.

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

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

 

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

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

 

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

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

 

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

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

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

 

 

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

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

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

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


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

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2005