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

Solution 2.

Enter the 9×9 matrix A and the column vector B.

 

 

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

Use 10 iterations of Jacobi iteration.

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



[Graphics:../Images/SORmethodMod_gr_121.gif]
[Graphics:../Images/SORmethodMod_gr_122.gif]


Use 10 iterations of Gauss-Seidel iteration.

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



[Graphics:../Images/SORmethodMod_gr_124.gif]
[Graphics:../Images/SORmethodMod_gr_125.gif]


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

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



[Graphics:../Images/SORmethodMod_gr_128.gif]
[Graphics:../Images/SORmethodMod_gr_129.gif]


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

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



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

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

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



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



[Graphics:../Images/SORmethodMod_gr_135.gif]
[Graphics:../Images/SORmethodMod_gr_136.gif]
[Graphics:../Images/SORmethodMod_gr_137.gif]

[Graphics:../Images/SORmethodMod_gr_138.gif]
[Graphics:../Images/SORmethodMod_gr_139.gif]
[Graphics:../Images/SORmethodMod_gr_140.gif]

[Graphics:../Images/SORmethodMod_gr_141.gif]
[Graphics:../Images/SORmethodMod_gr_142.gif]
[Graphics:../Images/SORmethodMod_gr_143.gif]

For this type of linear system the SOR method is known to give fast, accurate results.

We are done.

Aside.   

    The solution to the above linear system is an approximate the solution of the Laplace's equation  
    
        
[Graphics:../Images/SORmethodMod_gr_144.gif]  over the rectangle  [Graphics:../Images/SORmethodMod_gr_145.gif]  
        
with the boundary values  

        [Graphics:../Images/SORmethodMod_gr_146.gif],  [Graphics:../Images/SORmethodMod_gr_147.gif],  for  [Graphics:../Images/SORmethodMod_gr_148.gif],  
    and  
        [Graphics:../Images/SORmethodMod_gr_149.gif]  and  [Graphics:../Images/SORmethodMod_gr_150.gif], for  [Graphics:../Images/SORmethodMod_gr_151.gif].  

(Remark. There are singularities at the corners of the square and at these points an average value along adjacent edges is assumed.)

The nine points are the interior points of a 5×5 grid and must be arranged in the following manner.

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



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


And the boundary values need to be filled in around these center points as follows.

 

 

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

Then we can plot the solution to the P. D. E.

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


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

[Graphics:../Images/SORmethodMod_gr_157.gif]
[Graphics:../Images/SORmethodMod_gr_158.gif]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004