Practical 5 JacobiSeidel
Practical 5 JacobiSeidel
For i = 1, i ≤ n, i ++,
1 n
X[[i]] = B[[i]] + A[[i,i]] Xk[[i]] - A[[i,j]] Xk[[j]] ;
A[[i,i]] j=1
x1 + 5 x2 +2 x3 = -6
x1 + 2 x2 +3 x3 = -4
with the inital vector x (0) = (0.5,-0.5,-0.5). Perform 15 iterations.
Gauss-Seidel Method
Gauss - Seidel Iteration Method: A general linear iterative method for the solution of the system of
equations Ax = b may be defind of the form.
x ( k + 1) = H x ( k ) + C
where x (k+1) and x (k) are approximations of x in the (k+1)th and kth iterations.
H is called the iteration matrix of A and C is called column vector.
Here, H = - D-1 (L+U)
C = (D + L)-1 b
where, D = diagonal matrix
L = lower triangular matrix
U = upper triangular matrix .
- x 1 + 2 x 2 - x3 = 1
0 x1 - x2 +2 x3 = 1
with the inital vector x (0) = (0,0,0).
For i = 1, i ≤ n, i ++,
1 n
X[[i]] = B[[i]] + A[[i,i]] X[[i]] - A[[i,j]] X[[j]] ;
A[[i,i]] j=1
X0 ={0, 0, 0}