SlideShare a Scribd company logo
1 of 15
Download to read offline
Chapter 7.
Iterative Solutions of Systems
         of Equations
         of Equations

       EFLUM – ENAC ‐ EPFL
Contents
1.
1 Introduction
2. First example: Scalar Equation
3.
3 Iterative solutions of a system of equations: 
          i    l i     f             f      i
   Jacobi iteration method
4. Iterative methods for finite difference 
   equations: Back to problem 6.3
5. The Successive Over Relaxation (SOR)
Introduction: The fixed point iteration
                            p




Previous Method (used on previous class)
Uses Gaussian Elimination (or “” in MatLab)
Introduction: The fixed point iteration
                                        p

The main concept:                            xk +1 = g ( xk )
 Example:
                                                                            xk
3x = 6                        2x + x = 6                           xk +1 = − + 3
 X0 = 4
      4
                                                                            2
                3.5

                 3
  Value of xn




                2.5
         f




                 2

                1.5

 X0 = 1
      1

                0.5

 X0 = 00
      0
                      1   2   3   4         5          6   7   8    9   10
                                      Iteration step
Introduction: The fixed point iteration
                           p
                                     xk
The proof of convergence:   xk +1 = − + 3
                                     2



                                           1       2
                                                 =
                                       1 + (1 2 ) 3
Introduction: The fixed point iteration
                                  p

First Iteration method:
                                                 xk
3x = 6        2x + x = 6                xk +1 = − + 3
                                                 2
                                   Always Converges

Generalized iteration method:
G     li d it ti        th d
                                                3 −α          6
3x = 6      (3 − α ) x + α x = 6    xk +1 = −          xk +
                                                 α            α
                                   Converges?
Introduction: The fixed point iteration
                                                                   p
Generalized iteration method:
                                                                                                                  3 −α            6
3x = 6                                               (3 − α ) x + α x = 6                        xk +1 = −                 xk +
                                                                                                                   α              α
       Converges?
         No                                                 Yes
                                    mber




                                            1
                         teration num




                                                       X: 1.5
                                                       Y:
                                                       Y 1

                                           0.8


                                           0.6
         magnitu of the it




                                           0.4
               ude




                                           0.2
                                                                      X: 3
                                                                      Y: 0
                                            0
                                                 1         2      3          4       5       6       7        8        9    10
                                                                         value of the splitting parameter α
Introduction: The fixed point iteration
                                 p
Generalized iteration method:
                                                                             3 −α                   6
                                                             xk +1 = −                      xk +
How fast does it Converges?
                                                                                    α               α


                                            8
                                                                                                         α   = 1.42
                  The smaller                                                                            α   = 1.5
                                            6                                                            α   = 2.0
                  this value is                                                                          α   = 2.5
                                                                                                         α   = 3.0
                The fastest is              4
                                                                                                         α   =40
                                                                                                               4.0
                              value of xn




             the convergence                                                                             α   = 5.0
                                            2


                                            0


                                            -2


                                            -4
                                                 0   1   2     3   4     5          6   7   8   9   10
                                                                   Iteration Step
Iterative solution of a system of equations
                              y         q
                  Jacobi interaction approach
Consider the problem



                                       D: Diagonal elements of A

                                           L: Lower elements of A
                                          +U: Upper elements of A
                                        L+U:             Matrix B




                 and      Q <1
Iterative solution of a system of equations
                         y         q
  Some notes about the vector norm
             The vector norm calculation




  Some notes about the matrix norm
  S      t    b t th     ti

            The matrix norm calculation
Iterative solution of a system of equations
                         y         q
Back to problem 6.3 ( ° case – last class)
               p           (1°
                           (1                   )



Back to Laplace Equation (Last class example)
M_diag=sparse(1:21,1:21,-4,21,21);
L_diag1=sparse(2:21,1:20,1,21,21);
L_diag2=sparse(8:21,1:14,1,21,21);
L_diag1(8,7)=0; L_diag1(15,14)=0;
A=M_diag+L_diag1+L_diag2+L_diag1'+L_diag2';
A M di +L di 1+L di 2+L di 1'+L di 2'
b=zeros(21,1); b(7)=-100; b(14)=-100; b(21)=-100;


                                                    convcrit 1e9;
                                                    convcrit=1e9;
  iteration matrix is Q=-Dinv*LnU                   h_old=ones(21,1);
                                                    kount=0;
 L=L_diag1+L_diag2                                  while convcrit>1e-3 % loop ends when fractional
 U=L‘;
     ;                                                kount=kount+1; % change in h < 10-3
 LnU=L+U;                                             h=Q*h_old+Dinv*b;
                                                      convcrit=max(abs(h-h_old)./h);
 Dinv=inv(M_diag) %D-1
                                                      h_old=h;
                                                    end
Iterative solution of a system of equations
                         y         q
                       convcrit=1e9;
                       h_old=ones(21,1);
                       kount=0;
                       while convcrit>1e-3 % loop ends when fractional
                         kount=kount+1; % change in h < 10-3
                         h=Q*h_old+Dinv*b;
                         convcrit=max(abs(h-h_old)./h);
                         h_old=h;
                       end
Successive over relaxation method
         Before                                Now

Jacobi iteration approach


                                      ρ(Q) = abs(max(eig(Q)))
                                                (   ( g(Q)))
                            Successive Order Relaxation Method
                                            (SOR)
                     S(ω): Iteration matrix.
                     ρ(Q): Magnitude of the largest eigenvalue of the
                           Jacobi iteration matrix.
                     ωopt: Iteration parameter, chosen to accelerate
                           convergence
Iterative solution of a system of equations
                               y         q
                                   wopt=2/(1+sqrt(1-(normest(Q))^2));
                                   y=inv(D*(1/wopt)+L);
                                   S=-y*(U+(1-(1/wopt))*D);
convcrit=1e9;
       it 1 9                             it 1 9
                                   convcrit=1e9;
h_old=ones(21,1);                  h_old=ones(21,1);
kount=0;                           kount=0;
while convcrit > 1e-3              while convcrit > 1e-3
  kount=kount+1;                    kount=kount+1;
  h=Q*h_old+Dinv*b;                 h=S*h_old+y*b;
  convcrit=max(abs(h-h_old)./h);    convcrit=max(abs(h-h_old)./h);
  h_old=h;                          h_old=h;
end                                end




               Slow                               Fast ☺

More Related Content

What's hot

Differential equations
Differential equationsDifferential equations
Differential equations
Charan Kumar
 
Solution of System of Linear Equations
Solution of System of Linear EquationsSolution of System of Linear Equations
Solution of System of Linear Equations
mofassair
 

What's hot (20)

Jacobi method
Jacobi methodJacobi method
Jacobi method
 
Newton divided difference interpolation
Newton divided difference interpolationNewton divided difference interpolation
Newton divided difference interpolation
 
Runge Kutta Method
Runge Kutta MethodRunge Kutta Method
Runge Kutta Method
 
Maths-->>Eigenvalues and eigenvectors
Maths-->>Eigenvalues and eigenvectorsMaths-->>Eigenvalues and eigenvectors
Maths-->>Eigenvalues and eigenvectors
 
Lyapunov stability
Lyapunov stability Lyapunov stability
Lyapunov stability
 
Gaussian elimination method & homogeneous linear equation
Gaussian elimination method & homogeneous linear equationGaussian elimination method & homogeneous linear equation
Gaussian elimination method & homogeneous linear equation
 
Numerical Methods - Power Method for Eigen values
Numerical Methods - Power Method for Eigen valuesNumerical Methods - Power Method for Eigen values
Numerical Methods - Power Method for Eigen values
 
Polynomials and Curve Fitting in MATLAB
Polynomials and Curve Fitting in MATLABPolynomials and Curve Fitting in MATLAB
Polynomials and Curve Fitting in MATLAB
 
Differential equations
Differential equationsDifferential equations
Differential equations
 
Gaussian Elimination Method
Gaussian Elimination MethodGaussian Elimination Method
Gaussian Elimination Method
 
bisection method
bisection methodbisection method
bisection method
 
Gauss Elimination & Gauss Jordan Methods in Numerical & Statistical Methods
Gauss Elimination & Gauss Jordan Methods in Numerical & Statistical MethodsGauss Elimination & Gauss Jordan Methods in Numerical & Statistical Methods
Gauss Elimination & Gauss Jordan Methods in Numerical & Statistical Methods
 
Euler and runge kutta method
Euler and runge kutta methodEuler and runge kutta method
Euler and runge kutta method
 
LINEAR DIFFERENTIAL EQUATION AND BERNOULLIS EQUATIONS
LINEAR DIFFERENTIAL EQUATION AND BERNOULLIS EQUATIONSLINEAR DIFFERENTIAL EQUATION AND BERNOULLIS EQUATIONS
LINEAR DIFFERENTIAL EQUATION AND BERNOULLIS EQUATIONS
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Jacobi and gauss-seidel
Jacobi and gauss-seidelJacobi and gauss-seidel
Jacobi and gauss-seidel
 
Solution of System of Linear Equations
Solution of System of Linear EquationsSolution of System of Linear Equations
Solution of System of Linear Equations
 
Introduction to differential equation
Introduction to differential equationIntroduction to differential equation
Introduction to differential equation
 
False Point Method / Regula falsi method
False Point Method / Regula falsi methodFalse Point Method / Regula falsi method
False Point Method / Regula falsi method
 
Jacobi iterative method
Jacobi iterative methodJacobi iterative method
Jacobi iterative method
 

Viewers also liked

Linear Systems Gauss Seidel
Linear Systems   Gauss SeidelLinear Systems   Gauss Seidel
Linear Systems Gauss Seidel
Eric Davishahl
 
Newton Raphson method for load flow analysis
Newton Raphson method for load flow analysisNewton Raphson method for load flow analysis
Newton Raphson method for load flow analysis
divyanshuprakashrock
 
Agile Metrics
Agile MetricsAgile Metrics
Agile Metrics
nick945
 
On finite differences, interpolation methods and power series expansions in i...
On finite differences, interpolation methods and power series expansions in i...On finite differences, interpolation methods and power series expansions in i...
On finite differences, interpolation methods and power series expansions in i...
PlusOrMinusZero
 
Successive iteration method for reconstruction of missing data
Successive iteration method for reconstruction of missing dataSuccessive iteration method for reconstruction of missing data
Successive iteration method for reconstruction of missing data
IAEME Publication
 
Brief introduction to perturbation theory
Brief introduction to perturbation theoryBrief introduction to perturbation theory
Brief introduction to perturbation theory
Anamika Banerjee
 

Viewers also liked (20)

Linear Systems Gauss Seidel
Linear Systems   Gauss SeidelLinear Systems   Gauss Seidel
Linear Systems Gauss Seidel
 
Gauss sediel
Gauss sedielGauss sediel
Gauss sediel
 
NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)NUMERICAL METHODS -Iterative methods(indirect method)
NUMERICAL METHODS -Iterative methods(indirect method)
 
Numerical method
Numerical methodNumerical method
Numerical method
 
Fixedpoint
FixedpointFixedpoint
Fixedpoint
 
Gauss jordan and Guass elimination method
Gauss jordan and Guass elimination methodGauss jordan and Guass elimination method
Gauss jordan and Guass elimination method
 
Newton Raphson method for load flow analysis
Newton Raphson method for load flow analysisNewton Raphson method for load flow analysis
Newton Raphson method for load flow analysis
 
A common fixed point theorem for two random operators using random mann itera...
A common fixed point theorem for two random operators using random mann itera...A common fixed point theorem for two random operators using random mann itera...
A common fixed point theorem for two random operators using random mann itera...
 
system of algebraic equation by Iteration method
system of algebraic equation by Iteration methodsystem of algebraic equation by Iteration method
system of algebraic equation by Iteration method
 
Agile Metrics
Agile MetricsAgile Metrics
Agile Metrics
 
On finite differences, interpolation methods and power series expansions in i...
On finite differences, interpolation methods and power series expansions in i...On finite differences, interpolation methods and power series expansions in i...
On finite differences, interpolation methods and power series expansions in i...
 
Newton rapson codigos
Newton rapson codigosNewton rapson codigos
Newton rapson codigos
 
02 newton-raphson
02 newton-raphson02 newton-raphson
02 newton-raphson
 
Perturbation methods last
Perturbation methods lastPerturbation methods last
Perturbation methods last
 
Calculus II - 13
Calculus II - 13Calculus II - 13
Calculus II - 13
 
Successive iteration method for reconstruction of missing data
Successive iteration method for reconstruction of missing dataSuccessive iteration method for reconstruction of missing data
Successive iteration method for reconstruction of missing data
 
Numerical analysis using Scilab: Solving nonlinear equations
Numerical analysis using Scilab: Solving nonlinear equationsNumerical analysis using Scilab: Solving nonlinear equations
Numerical analysis using Scilab: Solving nonlinear equations
 
Ch02 7
Ch02 7Ch02 7
Ch02 7
 
Newton method based iterative learning control for nonlinear systems
Newton method based iterative learning control for nonlinear systemsNewton method based iterative learning control for nonlinear systems
Newton method based iterative learning control for nonlinear systems
 
Brief introduction to perturbation theory
Brief introduction to perturbation theoryBrief introduction to perturbation theory
Brief introduction to perturbation theory
 

Similar to METHOD OF JACOBI

Similar to METHOD OF JACOBI (20)

Em06 iav
Em06 iavEm06 iav
Em06 iav
 
Add maths 2
Add maths 2Add maths 2
Add maths 2
 
Add Maths 2
Add Maths 2Add Maths 2
Add Maths 2
 
Q2
Q2Q2
Q2
 
Rational Exponents
Rational ExponentsRational Exponents
Rational Exponents
 
Emat 213 midterm 2 winter 2006
Emat 213 midterm 2 winter 2006Emat 213 midterm 2 winter 2006
Emat 213 midterm 2 winter 2006
 
Day 01
Day 01Day 01
Day 01
 
Integrated Math 2 Section 3-2
Integrated Math 2 Section 3-2Integrated Math 2 Section 3-2
Integrated Math 2 Section 3-2
 
Linear law
Linear lawLinear law
Linear law
 
Nov. 17 Rational Inequalities
Nov. 17 Rational InequalitiesNov. 17 Rational Inequalities
Nov. 17 Rational Inequalities
 
Module 5 Inequalities
Module 5  InequalitiesModule 5  Inequalities
Module 5 Inequalities
 
MODULE 5- Inequalities
MODULE 5- InequalitiesMODULE 5- Inequalities
MODULE 5- Inequalities
 
Problems 2
Problems 2Problems 2
Problems 2
 
Chapter 1 straight line
Chapter 1 straight lineChapter 1 straight line
Chapter 1 straight line
 
Varian, microeconomic analysis, solution book
Varian, microeconomic analysis, solution bookVarian, microeconomic analysis, solution book
Varian, microeconomic analysis, solution book
 
2 senarai rumus add maths k1 trial spm sbp 2010
2 senarai rumus add maths k1 trial spm sbp 20102 senarai rumus add maths k1 trial spm sbp 2010
2 senarai rumus add maths k1 trial spm sbp 2010
 
2 senarai rumus add maths k2 trial spm sbp 2010
2 senarai rumus add maths k2 trial spm sbp 20102 senarai rumus add maths k2 trial spm sbp 2010
2 senarai rumus add maths k2 trial spm sbp 2010
 
Nov. 17 Rational Inequalities
Nov. 17 Rational InequalitiesNov. 17 Rational Inequalities
Nov. 17 Rational Inequalities
 
Classzone Chapter 4
Classzone Chapter 4Classzone Chapter 4
Classzone Chapter 4
 
fauvel_igarss.pdf
fauvel_igarss.pdffauvel_igarss.pdf
fauvel_igarss.pdf
 

More from jorgeduardooo

Cholesky method and Thomas
Cholesky method and ThomasCholesky method and Thomas
Cholesky method and Thomas
jorgeduardooo
 
Basic concepts. Systems of equations
Basic concepts. Systems of equationsBasic concepts. Systems of equations
Basic concepts. Systems of equations
jorgeduardooo
 
Busqueda de una raiz-Metodos numericos
Busqueda de una raiz-Metodos numericosBusqueda de una raiz-Metodos numericos
Busqueda de una raiz-Metodos numericos
jorgeduardooo
 

More from jorgeduardooo (8)

Cholesky method and Thomas
Cholesky method and ThomasCholesky method and Thomas
Cholesky method and Thomas
 
Lu decomposition
Lu decompositionLu decomposition
Lu decomposition
 
Gauss jordan
Gauss jordanGauss jordan
Gauss jordan
 
Basic concepts. Systems of equations
Basic concepts. Systems of equationsBasic concepts. Systems of equations
Basic concepts. Systems of equations
 
NUMERICAL METHODS
NUMERICAL METHODSNUMERICAL METHODS
NUMERICAL METHODS
 
NUMERICAL METHODS
NUMERICAL METHODSNUMERICAL METHODS
NUMERICAL METHODS
 
METHOD
METHOD METHOD
METHOD
 
Busqueda de una raiz-Metodos numericos
Busqueda de una raiz-Metodos numericosBusqueda de una raiz-Metodos numericos
Busqueda de una raiz-Metodos numericos
 

Recently uploaded

Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 

METHOD OF JACOBI

  • 1. Chapter 7. Iterative Solutions of Systems of Equations of Equations EFLUM – ENAC ‐ EPFL
  • 2. Contents 1. 1 Introduction 2. First example: Scalar Equation 3. 3 Iterative solutions of a system of equations:  i l i f f i Jacobi iteration method 4. Iterative methods for finite difference  equations: Back to problem 6.3 5. The Successive Over Relaxation (SOR)
  • 3. Introduction: The fixed point iteration p Previous Method (used on previous class) Uses Gaussian Elimination (or “” in MatLab)
  • 4. Introduction: The fixed point iteration p The main concept: xk +1 = g ( xk ) Example: xk 3x = 6 2x + x = 6 xk +1 = − + 3 X0 = 4 4 2 3.5 3 Value of xn 2.5 f 2 1.5 X0 = 1 1 0.5 X0 = 00 0 1 2 3 4 5 6 7 8 9 10 Iteration step
  • 5. Introduction: The fixed point iteration p xk The proof of convergence: xk +1 = − + 3 2 1 2 = 1 + (1 2 ) 3
  • 6. Introduction: The fixed point iteration p First Iteration method: xk 3x = 6 2x + x = 6 xk +1 = − + 3 2 Always Converges Generalized iteration method: G li d it ti th d 3 −α 6 3x = 6 (3 − α ) x + α x = 6 xk +1 = − xk + α α Converges?
  • 7. Introduction: The fixed point iteration p Generalized iteration method: 3 −α 6 3x = 6 (3 − α ) x + α x = 6 xk +1 = − xk + α α Converges? No Yes mber 1 teration num X: 1.5 Y: Y 1 0.8 0.6 magnitu of the it 0.4 ude 0.2 X: 3 Y: 0 0 1 2 3 4 5 6 7 8 9 10 value of the splitting parameter α
  • 8. Introduction: The fixed point iteration p Generalized iteration method: 3 −α 6 xk +1 = − xk + How fast does it Converges? α α 8 α = 1.42 The smaller α = 1.5 6 α = 2.0 this value is α = 2.5 α = 3.0 The fastest is 4 α =40 4.0 value of xn the convergence α = 5.0 2 0 -2 -4 0 1 2 3 4 5 6 7 8 9 10 Iteration Step
  • 9. Iterative solution of a system of equations y q Jacobi interaction approach Consider the problem D: Diagonal elements of A L: Lower elements of A +U: Upper elements of A L+U: Matrix B and Q <1
  • 10. Iterative solution of a system of equations y q Some notes about the vector norm The vector norm calculation Some notes about the matrix norm S t b t th ti The matrix norm calculation
  • 11. Iterative solution of a system of equations y q
  • 12. Back to problem 6.3 ( ° case – last class) p (1° (1 ) Back to Laplace Equation (Last class example) M_diag=sparse(1:21,1:21,-4,21,21); L_diag1=sparse(2:21,1:20,1,21,21); L_diag2=sparse(8:21,1:14,1,21,21); L_diag1(8,7)=0; L_diag1(15,14)=0; A=M_diag+L_diag1+L_diag2+L_diag1'+L_diag2'; A M di +L di 1+L di 2+L di 1'+L di 2' b=zeros(21,1); b(7)=-100; b(14)=-100; b(21)=-100; convcrit 1e9; convcrit=1e9; iteration matrix is Q=-Dinv*LnU h_old=ones(21,1); kount=0; L=L_diag1+L_diag2 while convcrit>1e-3 % loop ends when fractional U=L‘; ; kount=kount+1; % change in h < 10-3 LnU=L+U; h=Q*h_old+Dinv*b; convcrit=max(abs(h-h_old)./h); Dinv=inv(M_diag) %D-1 h_old=h; end
  • 13. Iterative solution of a system of equations y q convcrit=1e9; h_old=ones(21,1); kount=0; while convcrit>1e-3 % loop ends when fractional kount=kount+1; % change in h < 10-3 h=Q*h_old+Dinv*b; convcrit=max(abs(h-h_old)./h); h_old=h; end
  • 14. Successive over relaxation method Before Now Jacobi iteration approach ρ(Q) = abs(max(eig(Q))) ( ( g(Q))) Successive Order Relaxation Method (SOR) S(ω): Iteration matrix. ρ(Q): Magnitude of the largest eigenvalue of the Jacobi iteration matrix. ωopt: Iteration parameter, chosen to accelerate convergence
  • 15. Iterative solution of a system of equations y q wopt=2/(1+sqrt(1-(normest(Q))^2)); y=inv(D*(1/wopt)+L); S=-y*(U+(1-(1/wopt))*D); convcrit=1e9; it 1 9 it 1 9 convcrit=1e9; h_old=ones(21,1); h_old=ones(21,1); kount=0; kount=0; while convcrit > 1e-3 while convcrit > 1e-3 kount=kount+1; kount=kount+1; h=Q*h_old+Dinv*b; h=S*h_old+y*b; convcrit=max(abs(h-h_old)./h); convcrit=max(abs(h-h_old)./h); h_old=h; h_old=h; end end Slow Fast ☺