You are on page 1of 25

Numerical Analysis

‫التحليل العددي‬
‫ علي محمد عبد الشاهد‬:‫إعداد الدكتور‬

Ali Mohmed Abdulshahed, BSc, MSc, PhD.


Systems of Linear Equations :05 ‫المحاضرة‬
Email: aa_shahed@yahoo.com
Email: a.abdulshahed@eng.misuratau.edu.ly
Google scholar page: https://scholar.google.co.uk/citations?user=U4s6PyYAAAAJ&hl=en 1
Systems of Linear Equations Relaxation Method

The system linear equations can be rewritten as follows

The relaxation method is used to accelerate


the convergence of Jacobi and Gauss–Seidel
methods.

In case 0 < ω < 1, the methods are called as under-relaxation methods


Note: The method (successive displacements: Gauss–Seidel) with
In case ω > 1, the methods are called as over-relaxation methods over-relaxation is known as a successive over-relaxation (SOR)
method.
2
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method

3
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method

4
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method

5
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method

6
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method

7
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method

Note: Here, we observe that Gauss–Seidel method (ω =1.0)


requires a minimum number of iterations (9 iterations) for
the accuracy of 0.000001 as compared to relaxation
method with relaxation parameters ω = 0.9 and 1.1.
But, this is not the case always, which will be clear from
the following example.

8
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method

9
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method

10
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method

11
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method

Let us solve this system using Relaxation method with relaxation parameter, ω = 1.2. The iterations are given by

12
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method

It is easy to see that the difference between 12th iteration and 13th iteration is less than 0.000001. So, total 13
iterations of the SOR method are required for the accuracy of 0.000001. It is easy to conclude that the number of
iterations required in SOR method is pretty less than the number of iterations of the Gauss–Seidel method .

13
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method

Note: Consider the relaxation method with different relaxation parameter ω for the solution of the system in Example 5.29.
The numbers of iterations required for the accuracy of 0.000001 with different values of relaxation parameter ω are given in
the following table.

It is easy to see that for relaxation parameter ω = 1.2


and 1.25, the minimum number of iterations are
required for a given accuracy 0.000001. So, these
values of relaxation parameter are appropriate for this
system. It is further worth mentioning here that the
best relaxation parameter varies for different systems.

So, the obvious question is which relaxation parameter


is the best relaxation parameter for a given system?

14
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method

Relaxation

15
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method

16
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method

17
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method

18
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method

19
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method

20
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method
The Gauss–Seidel iterations

It is easy to see that both the Jacobi and


Gauss–Seidel methods diverge for the
given system.

21
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method
The system is not satisfying the convergence conditions, so Jacobi and Gauss–Seidel methods are diverging for the given
system in the present form.

22
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations Relaxation Method

The Gauss–Seidel method provides following iterations for the given system.

After seven iterations of the Gauss–Seidel method, the approximate solution correct up to three decimal places is as follows

23
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
Systems of Linear Equations

24
a.abdulshahed@eng.misuratau.edu.ly ‫إعداد الدكتور علي عبد الشاهد‬
‫‪HW‬‬
‫الكود البرمجي السابق يعتبر بسيط لتوضيح فكرة الحل فقط‬
‫المطلوب تطوير الكود السابق إلظهار معلومات أكثر حول (التباعد أو‬
‫التقارب‪ -‬عدد التك اررات – األخطاء – دقة الحل – شروط الحل)‬

‫‪25‬‬

You might also like