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

Solution 1 (b).

The matrix A can be constructed with the command.

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


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

The column vector B can be constructed with the command.

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


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


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



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

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

Use 20 iterations of Jacobi iteration.

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



[Graphics:../Images/SORmethodMod_gr_92.gif]
[Graphics:../Images/SORmethodMod_gr_93.gif]
[Graphics:../Images/SORmethodMod_gr_94.gif]


Use 20 iterations of Gauss-Seidel iteration.

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



[Graphics:../Images/SORmethodMod_gr_96.gif]
[Graphics:../Images/SORmethodMod_gr_97.gif]
[Graphics:../Images/SORmethodMod_gr_98.gif]


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

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



[Graphics:../Images/SORmethodMod_gr_101.gif]
[Graphics:../Images/SORmethodMod_gr_102.gif]
[Graphics:../Images/SORmethodMod_gr_103.gif]


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

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



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

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

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



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



[Graphics:../Images/SORmethodMod_gr_109.gif]
[Graphics:../Images/SORmethodMod_gr_110.gif]
[Graphics:../Images/SORmethodMod_gr_111.gif]

[Graphics:../Images/SORmethodMod_gr_112.gif]
[Graphics:../Images/SORmethodMod_gr_113.gif]
[Graphics:../Images/SORmethodMod_gr_114.gif]

[Graphics:../Images/SORmethodMod_gr_115.gif]
[Graphics:../Images/SORmethodMod_gr_116.gif]
[Graphics:../Images/SORmethodMod_gr_117.gif]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004