Example 1.  Use successive over relaxation - SOR iteration to solve the linear system  [Graphics:Images/SORmethodMod_gr_51.gif].   
1 (a).  Use 10 iterations.  Compare the speed of convergence with Jacobi and Gauss-Seidel iteration.

Solution 1 (a).

The matrix A can be constructed with the command.

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


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

The column vector B can be constructed with the command.

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


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


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



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

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

Use 10 iterations of Jacobi iteration.

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


]
[Graphics:../Images/SORmethodMod_gr_60.gif]
[Graphics:../Images/SORmethodMod_gr_61.gif]


Use 10 iterations of Gauss-Seidel iteration.

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



[Graphics:../Images/SORmethodMod_gr_63.gif]
[Graphics:../Images/SORmethodMod_gr_64.gif]
[Graphics:../Images/SORmethodMod_gr_65.gif]


Use 10 iterations of the SOR method with the parameter  [Graphics:../Images/SORmethodMod_gr_66.gif].  

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



[Graphics:../Images/SORmethodMod_gr_68.gif]
[Graphics:../Images/SORmethodMod_gr_69.gif]


We can compare the approximations with the "true solution."

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



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

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

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



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



[Graphics:../Images/SORmethodMod_gr_75.gif]
[Graphics:../Images/SORmethodMod_gr_76.gif]
[Graphics:../Images/SORmethodMod_gr_77.gif]

[Graphics:../Images/SORmethodMod_gr_78.gif]
[Graphics:../Images/SORmethodMod_gr_79.gif]
[Graphics:../Images/SORmethodMod_gr_80.gif]

[Graphics:../Images/SORmethodMod_gr_81.gif]
[Graphics:../Images/SORmethodMod_gr_82.gif]
[Graphics:../Images/SORmethodMod_gr_83.gif]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004