Lec. - 1 - (Linear Eqns.)
Lec. - 1 - (Linear Eqns.)
1.1 Introduction
The basic idea for this method is finding the value of (x) by
arranging several simulation equations in a manner that simplify the
solution.
Suppose we have several equations that contain the unknown value of (x),
we cannot find the value of (xs) from one equation, like
𝒂𝟏𝟏 𝒙𝟏 + 𝒂𝟏𝟐 𝒙𝟐 + 𝒂𝟏𝟑 𝒙𝟑 + ⋯ + 𝒂𝟏𝒏 𝒙𝒏 = 𝒃𝟏
Where
The values of 𝒙𝟏 → 𝒙𝒏 is unknown
𝒂𝟏𝟏 → 𝒂𝟏𝒏 Constant
𝒃𝟏 Constant
So:
If we want to know the values of (x), we should have several equations
having a number equal to the number of unknown,
In General
(𝑘+1) 𝑏1 𝑎12 (𝑘) 𝑎13 (𝑘) 𝑎1𝑛 (𝑘)
𝑥1 = − 𝑥2 − 𝑥3 … … − 𝑥
𝑎11 𝑎11 𝑎11 𝑎11 𝑛
⋮ ⋮ ⋮ ⋮ ⋮
Important Note
The first step for solving any gauss-Seidel problem is to apply the condition
below
Example (1-1)
Solution
Iteration X1 X2 X3
1 1 0 4
2 0 2.75 2.875
3 1.324 1.8565 2.990
4 0.9446 2.008 3.007
5 1.002 2.003 2.998
6 1.001 1.999 3.000
7 0.999 2.000 3.000
∴ 𝑥1 = 1, 𝑥2 = 2, 𝑥3 = 3
H.W (1)
Solve the following sets of linear equations using Gauss-Seidel and Jacobi
iteration methods and compare the results of the two methods.
8𝑥1 + 2𝑥2 + 3𝑥3 = 30
𝑥1 − 9𝑥2 + 2𝑥3 = 1
2𝑥1 + 3𝑥2 + 6𝑥3 = 31
H.W (2)
Solve the following sets of linear equations using Gauss-Seidel and Jacobi
iteration methods.
10𝑥1 − 𝑥2 + 2𝑥3 =6
−𝑥1 + 11𝑥2 − 𝑥3 + 3𝑥4 = 25
2𝑥1 − 𝑥2 + 10𝑥3 − 𝑥4 = −11
3𝑥2 − 𝑥3 + 8𝑥4 = 15
1.3 Direct Method (Exact Method)
1.3.1 Gauss Elimination Method
Engineers often need to solve large systems of linear equations; for
example in determining the forces in a large framework or finding currents
in a complicated electrical circuit. The method of Gauss elimination
provides a systematic approach to their solution.
The technique involves combining equations in order to eliminate
unknown, although it is one of the earliest methods for solving simultaneous
equations, it remains among the most important algorithms in use today.
Simple Example
Consider we have three simultaneous equations
3𝑥1 − 𝑥2 + 2𝑥3 = 12 → 𝑟1
𝑥1 + 2𝑥2 + 3𝑥3 = 11 → 𝑟2
2𝑥1 − 2𝑥2 − 𝑥3 = 2 → 𝑟3
Hint
The superscript (n) means that the elements of the right-hand side vector
have been modified n- times (for this case n=3).
Example
Solve the following set of algebraic equations by using the Gauss-Jordan
method
3𝑥1 − 0.1𝑥2 − 0.2𝑥3 = 7.85
0.1𝑥1 + 7𝑥2 − 0.3𝑥3 = −19.3
0.3𝑥1 − 0.2𝑥2 + 10𝑥3 = 71.3
Solution
The first step normalized the first row by dividing by 3
1 0 −0.068 2.524
[0 1 −0.0417 ⋮ −2.7814]
0 0 10.192 70.081
Now: (R3/10.192),(R1 + 0.068R3), (R1+0.0417R2)
1 0 0 2.991
[0 1 0 ⋮ −2.4946]
0 0 1 6.8765