Professional Documents
Culture Documents
Introduction
Heat Equation
Jacobi Method
Gauss-Seidel Method
Overrelaxation method
Capacitor Problem
Direct methods versus iterative
methods
DIRECT ITERATIVE
• Ax =b • x = Cx + d
• x = A\ b • x(k+1) = Cx(k) + d
• Moderate size • Big size
Alter the structure Zeros preserved
Rounding error Truncation error
Iterative methods compared with direct, we do
not guarantee a better approach, however, are
more efficient when working with large matrices
T1 (T0 T2 ) / 2 2 -1
T2 (T1 T3 ) / 2 - 1 2 - 1
T3 (T2 T4 ) / 2 -1 2
- 1
Tn (Tn-1 Tn+1 ) / 2
-1 2
T0 T1 T2 . . . Tn Tn+1
Jacobi method
• System of linear equations
(k+1)
x
3 (b3 a x(k)
31 1 a32x2 a3nxn )/ a33
(k) (k)
(k+1)
x
n (bn a x(k)
n1 1 an2x2 an,n1xn1)/ ann
(k) (k)
• At each step of the Jacobi iteration yields a vector with n
coordinates
(k+1)
x
3
a x(k+1)
(b3 31 1 a x(k+1)
32 2 a3nxn )/ a33
(k)
(k+1)
x
n (bn a x (k+1)
n1 1 a x (k+1)
n2 2 an,n1xn1 )/ ann
(k+1)
• The Gauss-Seidel method is a modification of the
Jacobi method which accelerates the convergence of
the latter.
Note that the Jacobi method generates a sequence for
each unknown
(X1 (k)), ..., (xn (k)). Since xi (k +1) is probably
better approximated by xi (k) instead of xi (k) in the
calculation of xi +1 (k +1) we use xi (k +1).
Apply this strategy to the example 1 and comprubese
the speed of convergence.
x(k+1)
n (1 )x(k)
n (bn a x(k+1)
n1 1 a x(k+1)
n2 2 an,n1x(k+1)
n1 )/ ann
Summary
• Iterative methods are applied to large
and sparse matrices.
The cost per iteration is O (n2) or less if
you take advantage of the dispersity
Are expected to converge in less than n
steps.
The matrix has to fulfill certain
conditions for the method to converge.