Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 38

| |

| Suppose we are trying to solve a system of linear equation


Mx = b. If we assume that the diagonal entries are non-
zero (true if the matrix M is positive definite), then we may
rewrite this equation as:

Dx + Moffx = b

Where:
D is the diagonal matrix containing the diagonal entries of M
and Moff contains the off-diagonal entries of M. Because all
the entries of the diagonal matrix are non-zero, the inverse is
simply the diagonal matrix whose diagonal entries are the
reciprocals of the corresponding entries of D.
rhus, we may bring the off-diagonal entries to the right hand
side and multiply by D-1:

x = D-1(b - Moffx)

You will recall from the class on iteration, we now have an


equation of the form  = f(), except in this case, the
argument is a vector, and thus, one method of solving such a
problem is to start with an initial vector x0.
se the Jacobi method to approximate the solution of the
following system of linear equations:

 j 0 j   j j j 0
  j j  j j j G j
 j  j  j  j  j G

With initial values:

  ï 
 º G ï º
 º  º
 º ïº
Dontinue the iterations until two successive
approximations are identical when rounded to three
significant digits.
ro begin, write the system in the form:
   
 G

  0


0  0 


[s a convenient initial approximation. So, the first
approximation is:

0    ï
 0ï ïï


  ï 0 ï
 ï 


0   ï 0  ï
 0ï 

D   
       

       

n 0 1 2 3 4 5 6 7
X1 0.000 -0.200 0.146 0.192 0.181 0.185 0.186 0.186
X2 0.000 0.222 0.203 0.328 0.332 0.329 0.331 0.331
X3 0.000 -0.429 -0.517 -0.416 -0.421 -0.424 -0.423 -0.423
Because the last two columns in table are identical, you can
conclude that to three significant digits the solution is:

 ï 
 ï 
 0ï 

åor the system of linear equations given in example, the


Jacobi method is said ti converge. rhat is, repeated
iterations succeed in producing approximation that is correct
to three significant digits. [s is generally true for iterative
methods, grater accuracy would require more iterations.
| rhe Gauss²Seidel method, also known as the Liebmann
method or the method of successive displacement, is an
iterative method used to solve a linear system of equations.
It is named after the German mathematicians Darl åriedrich
Gauss and Philipp Ludwig von Seidel, and is similar to the
Jacobi method. rhough it can be applied to any matrix with
non-zero elements on the diagonals, convergence is only
guaranteed if the matrix is either diagonally dominant, or
symmetric and positive definite.
åirst solve for the unknowns in order.

rhen we assume an initial value


for ü 
We must remember that I
  ï
 always use the most recent
 º ï value xi. rhis means that
 º 
calculated values apply for
 o º the calculations are in the
 ï º current iteration
  
 º
 ï º
 
Dalculation of relative absolute error approximate
?  ?
  
  G ? 
„ ïï


rhen find the correct answer when the maximum relative


absolute error is approximately less than the specified
tolerance for all unknowns.

›      
Solve the following system of equations:

 j j  j j G j
 j  j   j  j j j
 jj  j  j j 

With initial values: Matrix coefficients:


  ï     
 º ï º [G    ºº
 º  º
 º ïº    º
Let's see if the matrix is diagonally dominant

 G       G   G 
  0 
[    ºº  G       G  G

 0  º
 G        G  G

Satisfy all inequalities, therefore the solution should


converge using the Gauss Seidel.
ùewriting each equation: With initial values:
             ï 
   ºº    ºº G  ºº  º G ï º
  º  º
   º   º  º  º ïº

 0   G
ï  ï G 
 

          ï
G  G G 

 

         G  
G  G
 
     
Iteration 1  º     º
 º  º
  º  κ
r  r xi  rliv s l  rr r:

 
 G  G >
 r  r xi 
  xi rliv
 
G  G > s l  rr r fr  
 firs iri n is 100%.
  
  G  G >
 
Substituting the above values into the equations

 G
     G  


      


 G G  

      G
 G ïï

      
O      º   º
 º  º
  º  ïï º
rhe approximate relative absolute error:
    
 G  G >
  rhe approximate
maximum relative
     absolute error after the
 
G  G  >
  second iteration is
24.7%.
   
  G  G  >

Substituting the above values into the equations

  ïï 0  


  ïïï


 0  ïïï 0  ïï


  


 0  ïïï   
  

   ïïï 
O     º G   º
 º  º
 º  º
rhe approximate relative absolute error:
   
 G  G >
 rhe approximate
maximum relative
    absolute error after
 G  G  >
 the second iteration
is 8.9%.
   
  G  G  >

Substituting the above values into the equations

   0  
  ïïï


 0  ïïï 0  


  ïïïï


 0  ïïï   ïïïï
  

     
O      º   º
 º  º
  º  ŒŒŒŒº
rhe approximate relative absolute error:
  
 G  G 
>
 rhe approximate
maximum relative
   absolute error after
  G  G  >
 the second iteration
is 0.06%.
  
  G  G >

   ïïï     
rhe resulting  º  ïïïïº rhe exact solution is:  º G  º
solution is:  º  º  º  º
 º  º  º  º
| rhe Gauss-Seidel method is a technique for solving the
equations of the linear system of equations [x = b one at a
time in sequence, and uses previously computed results
as soon as they are available,

    
 
  A   A
 
 G

| rhere are two important characteristics of the Gauss-Seidel
method should be noted. åirstly, the computations appear
to be serial. Since each component of the new iterate
depends upon all previously computed components, the
updates cannot be done simultaneously as in the Jacobi
method. Secondly, the new iterate depends upon the order
in which the equations are examined. If this ordering is
changed, the ë   of the new iterates (and not just
their order) will also change.
| In terms of matrices, the definition of the Gauss-Seidel
method can be expressed as

 
   0  0    0



| where the matrices D, -L and - represent the diagonal,


strictly lower triangular, and strictly upper triangular parts
of, respectively.
| rhe Gauss-Seidel method is applicable to strictly diagonally
dominant, or symmetric positive definite matrices .
| rhe relaxation represents a slight modification to the Gauss
Seidel and this improves the convergence. Estimated after
each new value of x, that value is changed by a weighted
average of the results of previous and current iteration.

 ?   ?   ë  
    0  

| Where w is a weighting factor that has a Valors between 0


and 2.
Example.

åigure 5. rhe effect of freezing the boundary on several levels


of a surface.
Solve the following system of equations for ùelaxation
SOù:
   j j  j G jï
 j  j  j  j G j
j j 0 j  j 

With : With initial values:


Ú G ï ï
  ï 
O >  º G ï º
 º  º
 º ïº
ùewriting each equation:
           
   º   º G   º
 º  º  º
  ï  º   º  ï º

0   With initial values X1:




 G
 ï ï G   
  
 G 

ï  
G

     Œ  
Iteration 1   º   Œ Î º
 º  º
?    º  Œ  º
  0 
     0 h  0     0  h
 
  
? 
  G G  

 G   Î    G  Î

 ?      
 G G  r

 G       G   
     
  º G  þ º
Iteration 2  º  º
 þ º  þ þº

?     
   
 G G 

 G ïï      ïï  ï G ï 
?  
 
  G G  


h G

 
 
h G h h

 Ä 
 ? 
  G G Ä 

þ G

  
  
þþ  G þ þ
| [nd we must make the followings iterations y and obtained:

   
 º G  º
 º  º
 º   º
| If [ is symmetric and positive definite, the Gauss-Seidel
method converges.

If [ is symmetric and the matrix is the form:


  0  0 ? 
0   0  ? ºº
 
     º
 º
0  0  ? ?? º
 ?

[nd is positive definite, the Jacobi method is convergent.


| If [ is symmetric and positive definite, the relaxation method
converges if and only if 0 < Ú <2.
| If Ú < 1 the method is named subrelajation and if Ú > 1,
Overrelaxation.
| If [ is symmetric, positive definite and tridiagonal, the optimal
value of Ú for the convergence of the relaxation method is:


ÚG
   u 
where:
he spectral radius of the matrix Jacobi iteration method.
| http://www.google.com.co/imgres?imgurl=http://www.unav
arra.es/personal/victor_dominguez/portMatlab.jpg&imgref
url=http://www.unavarra.es/personal/victor_dominguez/lib
roMatlab.htm&usg=__g0H6VfxnJXinSq932hK[DW-
4mE=&h=423&w=596&sz=61&hl=es&start=19&itbs=1&t
bnid=qcEPr90K9KGOJM:&tbnh=96&tbnw=135&prev=/ima
ges%3åq%3DGauss-
Seidel%2Bcon%2Brelajaci%25D3%25B3n%26hl%3Des%26
sa%3DG%26gbv%3D2%26tbs%3Disch:1
| http://www.ana.iusiani.ulpgc.es/metodos_numericos/docu
ment/apuntes/Parte_4.pdf

You might also like