Successive over Relaxation Method
Iterative Method (Numerical Analysis)
Khushdil Ahmad
Government College University Lahore
Department of Mathematics
December 7, 2018
Khushdil Ahmad Successive over Relaxation Method
Abstracts
In this Talk I will Discussed the following topics:
1 Formula of Successive Over Relaxation
2 Some Important
3 Proof of SOR
4 Examples
Khushdil Ahmad Successive over Relaxation Method
Formula of Successive Over Relaxation
x
(k+1)
i = x
(k)
i +
w
aii
[bi −
i−1
j=1
aij x
(k+1)
j −
n
j=1
aij x(k)
] (1)
OR
x
(k+1)
1 = x
(k)
1 + w
a11
[b1 − a11x
(k)
1 − a12x
(k)
2 − a13x
(k)
3 ]
x
(k+1)
2 = x
(k)
2 + w
a22
[b2 − a21x
(k+1)
1 − a22x
(k)
2 − a23x
(k)
3 ]
x
(k+1)
3 = x
(k)
3 + w
a33
[b3 − a31x
(k+1)
1 − a32x
(k+1)
2 − a33x
(k)
3 ]
Khushdil Ahmad Successive over Relaxation Method
Some Important Terms
Here w is the Relaxation Perimeter.
1 If w = 1 then this method will reduced to Gauss Seidal
Method.
2 If w > 1 then this method is called Over Relaxation.
3 If w <1 then this method is called under Relaxation.
4 If w Lies between 0< w <2 then the method converges
otherwise diverges.
5 We can find ”w” by the formula:
w =
2
1 − p(tj )2
(2)
and p(tj ) = D−1(L + U)
Khushdil Ahmad Successive over Relaxation Method
PROOF
We Prove this formula from Gauss Seidel Iterative Formula. As
Generalized form of Gauss Siedel is :
x
(k+1)
i = 1
aii
[bi − i−1
j=1 aij x
(k+1)
i − n
j=1 aij x(k)]
Now adding and Subtracting xk
i on both sides of equation
x
(k+1)
i = x
(k)
i +
1
aii
[bi −
i−1
j=1
aij x
(k+1)
i −
n
j=1
aij x(k)
] (3)
Replace ”1” by ”w” in equation (3) then we get
x
(k+1)
i = x
(k)
i +
w
aii
[bi −
i−1
j=1
aij x
(k+1)
i −
n
j=1
aij x(k)
] (4)
Khushdil Ahmad Successive over Relaxation Method
PROOF
Equation (4) Is the Requires equation of Successive over
Relaxation (SOR) Method
If we expand the ” ” and put the values of i = 1,2,3,. . . ,n then
we get the Equations
x
(k+1)
1 = x
(k)
1 + w
a11
[b1 − a11x
(k)
1 − a12x
(k)
2 − a13x
(k)
3 ]
x
(k+1)
2 = x
(k)
2 + w
a22
[b2 − a21x
(k+1)
1 − a22x
(k)
2 − a23x
(k)
3 ]
x
(k+1)
3 = x
(k)
3 + w
a33
[b3 − a31x
(k+1)
1 − a32x
(k+1)
2 − a33x
(k)
3 ]
Khushdil Ahmad Successive over Relaxation Method
Example 01
Question: Solve the following equations by SOR with w = 1.45
5x1 + 2x2 − x3 = 6
x1 + 6x2 − 3x3 = 4
2x1 + x2 + 4x3 = 7
Khushdil Ahmad Successive over Relaxation Method
Solution:
As Formula of SOR
x
(k+1)
1 = x
(k)
1 + w
a11
[b1 − a11x
(k)
1 − a12x
(k)
2 − a13x
(k)
3 ]
x
(k+1)
2 = x
(k)
2 + w
a22
[b2 − a21x
(k+1)
1 − a22x
(k)
2 − a23x
(k)
3 ]
x
(k+1)
3 = x
(k)
3 + w
a33
[b3 − a31x
(k+1)
1 − a32x
(k+1)
2 − a33x
(k)
3 ]
Here the Equation are in Matrix form are:


5 2 −1
1 6 −3
2 1 4




x1
x2
x3

 =


6
4
7


and 

a11 a12 a13
a21 a22 a23
a31 a32 a33

 =


5 2 −1
1 6 −3
2 1 4


Khushdil Ahmad Successive over Relaxation Method
Solution:
Here
a11 = 5, a12 = 2, a13 = −1. a21 = 1, a22 = 6, a23 = −3. a31 =
2, a32 = 1, a33 = 4.b1 = 6, b2 = 4 and b3 = 7.
For Initial Estimate
Take x0
1 = x0
2 = x0
3 = 0
First Iteration
Put k=0 and w = 1.45 in General Formula’s of SOR,
∗1 For x1
1
x
(1)
1 = x
(0)
1 + w
a11
[b1 − a11x
(0)
1 − a12x
(0)
2 − a13x
(0)
3 ]
By Putting Values
x
(1)
1 = 0 + 1.45
5 [6 − 5(0) − 2(0) − (−1)(0)]
x
(1)
1 = 1.74
Khushdil Ahmad Successive over Relaxation Method
Solution:
∗2 For x
(1)
2
x
(1)
2 = x
(0)
2 + w
a22
[b2 − a21x
(1)
1 − a22x
(0)
2 − a23x
(0)
3 ]
By Putting Values
x
(1)
2 = 0 + 1.45
6 [4 − 1(1.74) − 6(0) − (−3)(0)]
x
(1)
2 = 0.5462
∗3 For x
(1)
3
x
(1)
3 = x
(0)
3 + w
a33
[b3 − a31x
(1)
1 − a32x
(1)
2 − a33x
(0)
3 ]
By Putting Values
x
(1)
3 = 0 + 1.45
4 [7 − 2(1.74) − 1(0.5462) − (4)(0)]
x
(1)
3 = 1.0780
Khushdil Ahmad Successive over Relaxation Method
Solution:
Second Iteration
Put k=1 , and w = 1.45 in General Formula’s of SOR, and
x
(1)
1 = 1.74, x
(1)
2 = 0.5462 x
(1)
3 = 1.0780
∗1 For x2
1
x
(2)
1 = x
(1)
1 + w
a11
[b1 − a11x
(1)
1 − a12x
(1)
2 − a13x
(1)
3 ]
By Putting Values
x
(2)
1 = 1.74 + 1.45
5 [6 − 5(1.74) − 2(0.5462) − (−1)(1.0780)]
x
(2)
1 = 0.9528
∗2 For x
(2)
2
x
(2)
2 = x
(1)
2 + w
a22
[b2 − a21x
(2)
1 − a22x
(1)
2 − a23x
(1)
3 ]
By Putting Values
x
(2)
2 = 0.5462+ 1.45
6 [4−1(0.9528)−6(0.5426)−(−3)(1.0780)]
Khushdil Ahmad Successive over Relaxation Method
Solution:
x
(2)
2 = 1.7519
∗3 For x
(2)
3
x
(2)
3 = x
(1)
3 + w
a33
[b3 − a31x
(2)
1 − a32x
(3)
2 − a33x
(1)
3 ]
By Putting Values
x
(2)
3 = 1.0780 + 1.45
4 [7 − 2(0.9528) − 1(1.7519) − 4(1.0780)]
x
(2)
3 = 0.7266
Khushdil Ahmad Successive over Relaxation Method
Solution:
Similarly
iteration No (k) x
(k)
1 x
(k)
2 x
(k)
3
3 0.5064 0.5827 1.6322
4 1.6475 1.6710 0.8707
What happen when we change the value of w?
If we change the value of w towards ”2” then answer will converge
quickly than of near to ”1” and if w = 1 then it reduces to Gauss
Siedel Method and if we put w < 1 then it will take more time to
get the better approximation.
If w > ”2” then the Method will diverges.
Khushdil Ahmad Successive over Relaxation Method
Thank You
THANK YOU
Khushdil Ahmad Successive over Relaxation Method

Sor

  • 1.
    Successive over RelaxationMethod Iterative Method (Numerical Analysis) Khushdil Ahmad Government College University Lahore Department of Mathematics December 7, 2018 Khushdil Ahmad Successive over Relaxation Method
  • 2.
    Abstracts In this TalkI will Discussed the following topics: 1 Formula of Successive Over Relaxation 2 Some Important 3 Proof of SOR 4 Examples Khushdil Ahmad Successive over Relaxation Method
  • 3.
    Formula of SuccessiveOver Relaxation x (k+1) i = x (k) i + w aii [bi − i−1 j=1 aij x (k+1) j − n j=1 aij x(k) ] (1) OR x (k+1) 1 = x (k) 1 + w a11 [b1 − a11x (k) 1 − a12x (k) 2 − a13x (k) 3 ] x (k+1) 2 = x (k) 2 + w a22 [b2 − a21x (k+1) 1 − a22x (k) 2 − a23x (k) 3 ] x (k+1) 3 = x (k) 3 + w a33 [b3 − a31x (k+1) 1 − a32x (k+1) 2 − a33x (k) 3 ] Khushdil Ahmad Successive over Relaxation Method
  • 4.
    Some Important Terms Herew is the Relaxation Perimeter. 1 If w = 1 then this method will reduced to Gauss Seidal Method. 2 If w > 1 then this method is called Over Relaxation. 3 If w <1 then this method is called under Relaxation. 4 If w Lies between 0< w <2 then the method converges otherwise diverges. 5 We can find ”w” by the formula: w = 2 1 − p(tj )2 (2) and p(tj ) = D−1(L + U) Khushdil Ahmad Successive over Relaxation Method
  • 5.
    PROOF We Prove thisformula from Gauss Seidel Iterative Formula. As Generalized form of Gauss Siedel is : x (k+1) i = 1 aii [bi − i−1 j=1 aij x (k+1) i − n j=1 aij x(k)] Now adding and Subtracting xk i on both sides of equation x (k+1) i = x (k) i + 1 aii [bi − i−1 j=1 aij x (k+1) i − n j=1 aij x(k) ] (3) Replace ”1” by ”w” in equation (3) then we get x (k+1) i = x (k) i + w aii [bi − i−1 j=1 aij x (k+1) i − n j=1 aij x(k) ] (4) Khushdil Ahmad Successive over Relaxation Method
  • 6.
    PROOF Equation (4) Isthe Requires equation of Successive over Relaxation (SOR) Method If we expand the ” ” and put the values of i = 1,2,3,. . . ,n then we get the Equations x (k+1) 1 = x (k) 1 + w a11 [b1 − a11x (k) 1 − a12x (k) 2 − a13x (k) 3 ] x (k+1) 2 = x (k) 2 + w a22 [b2 − a21x (k+1) 1 − a22x (k) 2 − a23x (k) 3 ] x (k+1) 3 = x (k) 3 + w a33 [b3 − a31x (k+1) 1 − a32x (k+1) 2 − a33x (k) 3 ] Khushdil Ahmad Successive over Relaxation Method
  • 7.
    Example 01 Question: Solvethe following equations by SOR with w = 1.45 5x1 + 2x2 − x3 = 6 x1 + 6x2 − 3x3 = 4 2x1 + x2 + 4x3 = 7 Khushdil Ahmad Successive over Relaxation Method
  • 8.
    Solution: As Formula ofSOR x (k+1) 1 = x (k) 1 + w a11 [b1 − a11x (k) 1 − a12x (k) 2 − a13x (k) 3 ] x (k+1) 2 = x (k) 2 + w a22 [b2 − a21x (k+1) 1 − a22x (k) 2 − a23x (k) 3 ] x (k+1) 3 = x (k) 3 + w a33 [b3 − a31x (k+1) 1 − a32x (k+1) 2 − a33x (k) 3 ] Here the Equation are in Matrix form are:   5 2 −1 1 6 −3 2 1 4     x1 x2 x3   =   6 4 7   and   a11 a12 a13 a21 a22 a23 a31 a32 a33   =   5 2 −1 1 6 −3 2 1 4   Khushdil Ahmad Successive over Relaxation Method
  • 9.
    Solution: Here a11 = 5,a12 = 2, a13 = −1. a21 = 1, a22 = 6, a23 = −3. a31 = 2, a32 = 1, a33 = 4.b1 = 6, b2 = 4 and b3 = 7. For Initial Estimate Take x0 1 = x0 2 = x0 3 = 0 First Iteration Put k=0 and w = 1.45 in General Formula’s of SOR, ∗1 For x1 1 x (1) 1 = x (0) 1 + w a11 [b1 − a11x (0) 1 − a12x (0) 2 − a13x (0) 3 ] By Putting Values x (1) 1 = 0 + 1.45 5 [6 − 5(0) − 2(0) − (−1)(0)] x (1) 1 = 1.74 Khushdil Ahmad Successive over Relaxation Method
  • 10.
    Solution: ∗2 For x (1) 2 x (1) 2= x (0) 2 + w a22 [b2 − a21x (1) 1 − a22x (0) 2 − a23x (0) 3 ] By Putting Values x (1) 2 = 0 + 1.45 6 [4 − 1(1.74) − 6(0) − (−3)(0)] x (1) 2 = 0.5462 ∗3 For x (1) 3 x (1) 3 = x (0) 3 + w a33 [b3 − a31x (1) 1 − a32x (1) 2 − a33x (0) 3 ] By Putting Values x (1) 3 = 0 + 1.45 4 [7 − 2(1.74) − 1(0.5462) − (4)(0)] x (1) 3 = 1.0780 Khushdil Ahmad Successive over Relaxation Method
  • 11.
    Solution: Second Iteration Put k=1, and w = 1.45 in General Formula’s of SOR, and x (1) 1 = 1.74, x (1) 2 = 0.5462 x (1) 3 = 1.0780 ∗1 For x2 1 x (2) 1 = x (1) 1 + w a11 [b1 − a11x (1) 1 − a12x (1) 2 − a13x (1) 3 ] By Putting Values x (2) 1 = 1.74 + 1.45 5 [6 − 5(1.74) − 2(0.5462) − (−1)(1.0780)] x (2) 1 = 0.9528 ∗2 For x (2) 2 x (2) 2 = x (1) 2 + w a22 [b2 − a21x (2) 1 − a22x (1) 2 − a23x (1) 3 ] By Putting Values x (2) 2 = 0.5462+ 1.45 6 [4−1(0.9528)−6(0.5426)−(−3)(1.0780)] Khushdil Ahmad Successive over Relaxation Method
  • 12.
    Solution: x (2) 2 = 1.7519 ∗3For x (2) 3 x (2) 3 = x (1) 3 + w a33 [b3 − a31x (2) 1 − a32x (3) 2 − a33x (1) 3 ] By Putting Values x (2) 3 = 1.0780 + 1.45 4 [7 − 2(0.9528) − 1(1.7519) − 4(1.0780)] x (2) 3 = 0.7266 Khushdil Ahmad Successive over Relaxation Method
  • 13.
    Solution: Similarly iteration No (k)x (k) 1 x (k) 2 x (k) 3 3 0.5064 0.5827 1.6322 4 1.6475 1.6710 0.8707 What happen when we change the value of w? If we change the value of w towards ”2” then answer will converge quickly than of near to ”1” and if w = 1 then it reduces to Gauss Siedel Method and if we put w < 1 then it will take more time to get the better approximation. If w > ”2” then the Method will diverges. Khushdil Ahmad Successive over Relaxation Method
  • 14.
    Thank You THANK YOU KhushdilAhmad Successive over Relaxation Method