Escolar Documentos
Profissional Documentos
Cultura Documentos
REPORT
Jacobi Method | Gauss-Seidel Method
BY:
Mark Rosalio M. Delgado
Sofia Aidrianne Marina G. Galindez
Ryan Kenneth L. Lim
Joshua Romel P. Lintag
Jacobi Method
This method is named after Carl Gustav Jacob Jacobi.
There are two assumptions made in the Jacobi method:
1.
2.
Jacobi Method
Short version of Jacobi Method:
STEP 1:
To solve for x1, use equation 1. To solve for x2, use equation 2. To solve for xn, use equation n. Thus giving a
general equation of:
x1 = 1/a11 (b1 - a12x2 + ...a1nxn)
x2 = 1/a22 (b2 - a21x1 + ...a2nxn)
.
.
.
xn = 1/ann (bn - an1x1 + ...an,n-1xn-1)
This will serve as the rewritten equations for the table later.
Jacobi Method
Short version of Jacobi Method:
STEP 2:
For the first iteration, an initial guess x(0) is required. x1, x2 and x3 are set as x(0) and then plugged into the
right side of the rewritten equations to calculate for the approximate values of x1, x2, ... xn.
Jacobi Method
Short version of Jacobi Method:
STEP 3:
For the second iteration, just substitute the first approximate values to the right side of the rewritten
equations and this will give the second approximate values of x1, x2, ... xn .
Jacobi Method
Short version of Jacobi Method:
STEP 4:
Continue to repeat this process until it converges. The iteration can stop if the relative error is less than or
equal to the given tolerance.
where x(k) and x(k+1) is the iteration and the next iteration of x, respectively. The general formula for xi(k+1) is:
Note: In computing for xi(k+1), each of the elements in x(k) is needed except for itself.
Jacobi Method
Sample Table:
iteration
xi(k)
x2(k)
x3(k)
K=0
K=1
K=2
K=3
rewritten equations:
x1 = 1/a11 (b1 - a12x2 + ...a1nxn)
x2 = 1/a22 (b2 - a21x1 + ...a2nxn)
.
.
xn = 1/ann (bn - an1x1 + ...an,n-1xn-1)
x1, x2 and x3
5x -
+ 2x = 12
x2
3x + 8x -2x =-25
1
x1
x2
+ 4x =6
3
Iteration
x2(k)
x3(k)
k=0
k=1
2.4
-3.125
1.5
k=2
1.175
-3.65
1.68125
k=3
0.9975
-3.1453
1.992575
xi
= 1,
x2
= -3,
x3
=2
2.
gauss-seidel Method
- aka liebmann method
- named after Carl friedrich gauss and
philipp ludwig von seidel
matrix of form:
= [c]nx1
[A]nxn [x]nx1
where :
[A] - quotient matrix
[x] solution vector/unknown
[c] - righthand side
gauss-seidel Method vs
use gauss-seidel method?
gaussianwhyelimination
1.computationally more efficient and easier to use for large n
( n matrices with many rows and columns)
2.round off error can be controlled
nx1
nx1
__________________________________
a11
th
equation in terms of xi
i th eqtn:
(1 i n)
ai j xj
_____________________
*i = 1 , . . . ,
n
___________________________________________
ai i
as you proceed to the next equations, substitute the
most recent values. values get updated after each
substitution, not at the end of every iteration.
Where:
|ai | =
new
0ld
i
_______________________
x 100 ; i = 1 , . . . , n
xinew
choose maximum |a| for each iteration
check if |a| max s
EXAMPLE
Solve for x1 , x2 , and x3 using Gauss-Seidel Method.
Start from [ x1 x2 x3 ] = [ 1 0 1 ]
Tolerance: 1%
STEP 1: REWRITE
EQUATIONS
x = 1 - 3x + 5x
1
12
x2 = 28 - x1 - 3x3
5
x3 = 76 - 3x1 - 7x2
13
STEP 2-3
STEP 4
GAUSS-SEIDEL LIMITATIONS
From previous example:
GAUSS-SEIDEL LIMITATIONS
Interchange eq. 1 and 3:
GAUSS-SEIDEL LIMITATIONS
Apply Step 1:
X1 = 76 - 7X2 - 13X3
3
X2 = 28 - X1 - 3X3
5
X3 = 1 - 12X1 - 3X2
-5
GAUSS-SEIDEL LIMITATIONS
DIVERGES!
GAUSS-SEIDEL METHOD
MAY OR MAY NOT
CONVERGE.
HOWEVER...
Gauss-Seidel method
certainly converges if [A] is
DIAGONALLY DOMINANT
*The absolute value of the coefficients in the main diagonal must be greater than the sum of
the absolute values of the other elements on the same row. Therefore [A] is diagonally
dominant.
REMEMBER...
If A is diagonally dominant, Gauss-Seidel
method will converge. If A is not diagonally
dominant, Gauss-Seidel may or may not
converge.
REFERENCES
Black, Noel and Moore, Shirley. "Gauss-Seidel Method." From
MathWorld--A Wolfram Web Resource, created by Eric W. Weisstein.
http://mathworld.wolfram.com/Gauss-SeidelMethod.html
N. (2010). Gauss-Seidel Method of Solving Simultaneous Linear
Equations: Example [Motion picture on Youtube]. Youtube.