SOR

Consider the linear system of equations

E1: 4*x1 + x2 - x3 + x4 = -2
E2: x1 + 4*x2 -x3 - x4 = -1
E3: -x1 - x2 + 5*x3 + x4 = 0
E4: x1 - x2 + x3 + 3*x4 = 1

Solving this script with the Gauss Seidel method, and the SOR method (for different omega's) gives:

Gauss Seidel (SOR with omega = 1.0)
omega1.0.gif

SOR with omega = 1.1
omega1.1.gif

SOR with omega = 1.2
omega1.2.gif

SOR with omega = 1.3
omega1.3.gif

SOR with omega = 1.5
omega1.5.gif

SOR with omega = 0.5
omega0.5.gif