0% found this document useful (0 votes)
416 views13 pages

Relaxation Methods

The document discusses relaxation techniques for solving linear systems. Relaxation methods are iterative methods used to solve systems of equations, including nonlinear systems. They were developed for solving large sparse linear systems arising from differential equation discretizations. The document provides an example of using the relaxation method to solve a system of 3 equations with 3 unknowns. It compares the relaxation method to the Gauss-Seidel method over multiple iterations and shows they converge to the same solution.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
416 views13 pages

Relaxation Methods

The document discusses relaxation techniques for solving linear systems. Relaxation methods are iterative methods used to solve systems of equations, including nonlinear systems. They were developed for solving large sparse linear systems arising from differential equation discretizations. The document provides an example of using the relaxation method to solve a system of 3 equations with 3 unknowns. It compares the relaxation method to the Gauss-Seidel method over multiple iterations and shows they converge to the same solution.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

RELAXATION TECHNIQUES FOR

SOLVING LINEAR SYSTEM


RELAXATION TECHNIQUES FOR SOLVING
LINEAR SYSTEM
In numerical mathematics, relaxation methods are iterative methods
for solving systems of equations, including nonlinear systems.
Relaxation methods were developed for solving large sparse
linear systems, which arose as finite-difference discretizations of
differential equations. They are also used for the solution of linear
equations for linear least-squares problems,and also for systems of
linear inequalities, such as those arising in linear programming.
They have also been developed for solving nonlinear systems of
equations.
HOW CAN WE SOLVE BY RELAXATION METHOD ?
1- It must be ensured that the main diagonal elements are greater than the sum of
the rest of the elements

5 2 1 5< 2 + 1
2 6 3 6< 3 + 2
3 4 8 8< 4 + 3
2- We will assume the variable is equal (1, 1,1) and solve the equation.
Then we will assume the variable is equal (3.25,1.4,.4) and then we
compare them
3- 𝜔 = 1.25
GENERAL EQUATION:
𝜔 𝑘−1 𝑘−1
𝑥𝑛𝑘 = 1−𝜔 × 𝑥𝑛𝑘−1 + 𝑏 − 𝑥𝑛−1 − 𝑥𝑛+1 ……
𝑎𝑛

𝑎𝑥1 + 𝑎𝑥2 − 𝑎𝑥3 = 𝑏1 𝑥1

𝑎𝑥1 + 𝑎𝑥2 + 𝑎𝑥3 = 𝑏2 𝑥2

𝑎𝑥1 + 𝑎𝑥2 + 𝑎𝑥3 = 𝑏3 𝑥3

0<𝜔<2
FIRST ITERATIONS:

𝑥11 = 1 − 𝜔 𝑥10 + 𝑎𝜔 𝑏1 − 𝑥20 − 𝑥30


1

𝑥21 = 1 − 𝜔 𝑥20 + 𝑎𝜔 𝑏2 − 𝑥30 − 𝑥11


2

𝑥31 = 1−𝜔 𝑥30 + 𝜔


𝑎3
𝑏3 − 𝑥21 − 𝑥11
SECOND ITERATIONS:
𝑥12 = 1 − 𝜔 𝑥11 + 𝑎𝜔 𝑏1 − 𝑥21 − 𝑥31
1

𝑥22 = 1 − 𝜔 𝑥21 + 𝑎𝜔 𝑏2 − 𝑥12 − 𝑥31


2

𝑥32 = 1 − 𝜔 𝑥31 + 𝑎𝜔 𝑏3 − 𝑥22 − 𝑥12


3
EXAMPLE:
Solve this system of equations by Relaxation method :
8𝑋1 + 𝑋2 + 𝑋3 = 26 1 3
𝑥 (0) = 1 Exact= 1
𝑋1 + 5𝑋2 − 𝑋3 = 7 1 1
𝑋1 − 𝑋2 + 5𝑋3 = 7

𝑥11 = 1 − 1.25 × 1 + 1.25


8
26 − 1 − 1
𝑥11 = 3.5
𝑥21 = 1 − 1.25 × 1 + 1.25
5
7 − 3.5 + 1
𝑥21 = 0.875
𝑥31 = 1 − 1.25 × 1 + 1.25
5
7 − 3.5 + 0.875
𝑥31 = 0.84375
3.5
𝑥12 = 1 − 1.25 × 3.5 + 1.25
8
26 − 0.875 − 0.84375 𝑥 (1) = 0.875
𝑥12 = 2.918945313 0.84375
𝑥22 = 1 − 1.25 × 0.875 + 1.25
5
7 − 2.918945313 + 0.84375
𝑥22 = 1.012451172
𝑥32 = 1 − 1.25 × 0.84375 + 1.25
5
7 − 2.918945313 + 1.012451172
𝑥32 = 1.062438965
𝒙𝟏 𝒙𝟐 𝒙𝟑
3.5 0.875 0.84375
2.918945313 1.012451172 1.062438965
3.008562088 1.010356426 0.9848388433
2.998610217 0.99396805 1.002629747
3.00087904 1.00194664 0.9996092193
RELAXATION & GAUSS-SEIDEL COMPARISON
M 1 2 3 4 5 𝒙𝟎 𝟎𝐟 𝐑 𝒙𝟎 𝐨𝐟 𝐉 exact

J 2.9 2.9825 2.9978 2.9997 2.9996


𝒙𝟏 375 07063 1358 1 3.25 3
R 3.5 2.9189 3.0085 2..9986 3.0008
45313 62088 10217 7904
J 1.1 1.0115 1.0015 1.0002 1.0000
𝒙𝟐 925 08788 27797 1 1.4 1
R 0.875 1.0124 1.0103 0.9939 1.0019
51172 56426 6805 4664
J 1.04 1.0058 1.0007 1.0001 1.0000
𝒙𝟑 51 00345 13288 1 1.4 1
R 0.8437 1.0624 0.9848 1.0026 0.9996
5 38965 388433 29747 092193
RELAXATION & GAUSS-SEIDEL COMPARISON
𝒙 T 1 2 3 4 5
J(T) 2.8125 3.04602050 2.99523282 2.99922661 3.00042435
𝑥1 8 1 5 4
R(T) 3.5 2.91894531 3.00856208 2..9986102 3.00087904
3 8 17
J(T) 1.046875 0.96642456 1.00719879 0.99973823 0.99965518
𝑥2 05 9 42 23
R(T) 0.875 1.01245117 1.01035642 0.99396805 1.00194664
2 6
J(T) 0.95859375 0.99045257 1.00537835 0.99878331 1.00011187
𝑥3 57 1 71 8
R(T) 0.84375 1.06243896 0.98483884 1.00262974 0.99960921
5 33 7 93
𝒙𝟏 𝒙𝟐 𝒙𝟑
3.5 0.875 0.84375

2.918945313 1.012451172 1.062438965

3.008562088 1.010356426 0.9848388433

2..998610217 0.99396805 1.002629747

3.00087904 1.00194664 0.9996092193

2.999537289 0.9995315664 1.000096264


3.000173829 1.000097719 0.999956906
2.999948008 0.9999777953 1.000012998
3.000014437 1.000005192 0.9999944392
2.999996449 0.9999981998 1.000001828
‫‪Made by:‬‬
‫علي محمد علي غزاوي ‪439010039‬‬
‫زيني عبد الرزاق نقشبندي ‪439005999‬‬
‫عبدالرحمن صالح المحمادي ‪439001944‬‬
‫)‪Section(2‬‬
‫د‪ /‬عصام سالم يسري ‪Supervised by :‬‬
‫‪References:‬‬
‫‪Numerical analysis‬‬

You might also like