Gauss-Seidel method. Dr. Motilal Panigrahi. Dr. Motilal Panigrahi, Nirma University

Similar documents
10.2 ITERATIVE METHODS FOR SOLVING LINEAR SYSTEMS. The Jacobi Method

Solving Linear Systems

A LINEAR SYSTEMS OF EQUATIONS. By : Dewi Rachmatin

Solving Linear Systems of Equations

Solving Linear Systems

3.2 Iterative Solution Methods for Solving Linear

6.3. MULTIVARIABLE LINEAR SYSTEMS

JACOBI S ITERATION METHOD

The Solution of Linear Systems AX = B

COURSE Iterative methods for solving linear systems

Today s class. Linear Algebraic Equations LU Decomposition. Numerical Methods, Fall 2011 Lecture 8. Prof. Jinbo Bi CSE, UConn

Section Gaussian Elimination

NUMERICAL METHODS C. Carl Gustav Jacob Jacobi 10.1 GAUSSIAN ELIMINATION WITH PARTIAL PIVOTING

Numerical Methods for Chemical Engineers

Chapter 12: Iterative Methods

CS 323: Numerical Analysis and Computing

Numerical Analysis: Solutions of System of. Linear Equation. Natasha S. Sharma, PhD

Next topics: Solving systems of linear equations

COURSE Numerical methods for solving linear systems. Practical solving of many problems eventually leads to solving linear systems.

LINEAR SYSTEMS (11) Intensive Computation

Department of Mathematics California State University, Los Angeles Master s Degree Comprehensive Examination in. NUMERICAL ANALYSIS Spring 2015

Review of matrices. Let m, n IN. A rectangle of numbers written like A =

Solution of Matrix Eigenvalue Problem

MA3232 Numerical Analysis Week 9. James Cooley (1926-)

5.7 Cramer's Rule 1. Using Determinants to Solve Systems Assumes the system of two equations in two unknowns

LU Factorization. Marco Chiarandini. DM559 Linear and Integer Programming. Department of Mathematics & Computer Science University of Southern Denmark

Iterative Techniques and Application of Gauss-Seidel Method

UNIT - 2 Unit-02/Lecture-01

Lecture 11. Fast Linear Solvers: Iterative Methods. J. Chaudhry. Department of Mathematics and Statistics University of New Mexico

Fixed Points and Contractive Transformations. Ron Goldman Department of Computer Science Rice University

6: Introduction to Elimination. Lecture

CAAM 454/554: Stationary Iterative Methods

M.SC. PHYSICS - II YEAR

The Triangle Algorithm: A Geometric Approach to Systems of Linear Equations

Jordan Journal of Mathematics and Statistics (JJMS) 5(3), 2012, pp A NEW ITERATIVE METHOD FOR SOLVING LINEAR SYSTEMS OF EQUATIONS

DEN: Linear algebra numerical view (GEM: Gauss elimination method for reducing a full rank matrix to upper-triangular

Lecture 12: Solving Systems of Linear Equations by Gaussian Elimination

CSE 160 Lecture 13. Numerical Linear Algebra

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK

The conjugate gradient method

System of Linear Equations

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

NUMERICAL METHODS C. Carl Gustav Jacob Jacobi 10.1 GAUSSIAN ELIMINATION WITH PARTIAL PIVOTING

Department of Aerospace Engineering AE602 Mathematics for Aerospace Engineers Assignment No. 4

ECON 331 Homework #2 - Solution. In a closed model the vector of external demand is zero, so the matrix equation writes:

Consider the following example of a linear system:

Hence a root lies between 1 and 2. Since f a is negative and f(x 0 ) is positive The root lies between a and x 0 i.e. 1 and 1.

Iterative Methods. Splitting Methods

Chapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations

TMA4125 Matematikk 4N Spring 2017

CS412: Lecture #17. Mridul Aanjaneya. March 19, 2015

MAC1105-College Algebra. Chapter 5-Systems of Equations & Matrices

Linear Algebraic Equations

ANALYTICAL MATHEMATICS FOR APPLICATIONS 2018 LECTURE NOTES 3

BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination December, 2015 BCS-054 : COMPUTER ORIENTED NUMERICAL TECHNIQUES

Lemma 8: Suppose the N by N matrix A has the following block upper triangular form:

Chapter 4. Solving Systems of Equations. Chapter 4

Simultaneous Linear Equations

1 - Systems of Linear Equations

1 Systems of Linear Equations

UNIT II SOLUTION OF NON-LINEAR AND SIMULTANEOUS LINEAR EQUATION

Lecture 12 Simultaneous Linear Equations Gaussian Elimination (1) Dr.Qi Ying

Math 471 (Numerical methods) Chapter 3 (second half). System of equations

Chapter 1 Matrices and Systems of Equations

Computational Methods. Systems of Linear Equations

The purpose of computing is insight, not numbers. Richard Wesley Hamming

LECTURE 12: SOLUTIONS TO SIMULTANEOUS LINEAR EQUATIONS. Prof. N. Harnew University of Oxford MT 2012

Extra Problems: Chapter 1

2.1 Gaussian Elimination

Process Model Formulation and Solution, 3E4

Chapter 2. Systems of Equations and Augmented Matrices. Creighton University

Direct Methods for Solving Linear Systems. Matrix Factorization

7.3 The Jacobi and Gauss-Siedel Iterative Techniques. Problem: To solve Ax = b for A R n n. Methodology: Iteratively approximate solution x. No GEPP.

8.4. Systems of Equations in Three Variables. Identifying Solutions 2/20/2018. Example. Identifying Solutions. Solving Systems in Three Variables

Preliminary/Qualifying Exam in Numerical Analysis (Math 502a) Spring 2012

Lecture 44. Better and successive approximations x2, x3,, xn to the root are obtained from

GAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511)

y b where U. matrix inverse A 1 ( L. 1 U 1. L 1 U 13 U 23 U 33 U 13 2 U 12 1

12. Stresses and Strains

DM559 Linear and Integer Programming. Lecture 2 Systems of Linear Equations. Marco Chiarandini

10. HAFTA BLM323 NUMERIC ANALYSIS. Okt. Yasin ORTAKCI.

AIMS Exercise Set # 1

Exponential Family and Maximum Likelihood, Gaussian Mixture Models and the EM Algorithm. by Korbinian Schwinger

CPE 310: Numerical Analysis for Engineers

Solving Linear Systems of Equations

Chapter 1: Systems of Linear Equations and Matrices

Introduction Linear system Nonlinear equation Interpolation

Math/Phys/Engr 428, Math 529/Phys 528 Numerical Methods - Summer Homework 3 Due: Tuesday, July 3, 2018

Up to this point, our main theoretical tools for finding eigenvalues without using det{a λi} = 0 have been the trace and determinant formulas

Lectures on Linear Algebra for IT

4 Elementary matrices, continued

Solving Linear Systems Using Gaussian Elimination

Chapter 4 No. 4.0 Answer True or False to the following. Give reasons for your answers.

Ack: 1. LD Garcia, MTH 199, Sam Houston State University 2. Linear Algebra and Its Applications - Gilbert Strang

APPM 3310 Problem Set 4 Solutions

EBG # 3 Using Gaussian Elimination (Echelon Form) Gaussian Elimination: 0s below the main diagonal

Iterative Methods for Ax=b

Math 1314 Week #14 Notes

7.3 The Jacobi and Gauss-Seidel Iterative Methods

Numerical Linear Algebra

Transcription:

Gauss-Seidel method Dr. Motilal Panigrahi

Solving system of linear equations We discussed Gaussian elimination with partial pivoting Gaussian elimination was an exact method or closed method Now we will discuss an open method or iteration method

Gauss Seidel method Gauss Seidel method, also known as the Liebmann method or the method of successive displacement It is an iterative method It is named after the German mathematicians Carl Friedrich Gauss and Philipp Ludwig von Seidel, and is similar to the Jacobi method.

Gauss Seidel method First we discuss the method and then we will discuss when the solution converges or diverges. As noted in the previous slide, method of successive displacement means first we assume with an initial solution and then we displace the values successively.

Gauss Seidel method We are given a system of equation Ax = b Say x = x 1, x 2,, x n T First we make two assumptions, (i) the diagonal of the matrix is nonzero, that is a ii 0, For i = 1,2,, n (ii) The system has a solution.

Gauss Seidel method We write the given system Ax = b (1) in the following way x 1 = b 1 a 12 x 2 a 1n x n a 11 2.1 x 2 = b 2 a 21 x 1 a 23 x 3 a 2n x n a 22 2.2 x n = b n a n1 x 1 a n2 x 2 a nn 1 x n 1 a nn 2. n

Gauss Seidel method We start with an initial values x 1 = 0, x 2 = 0,, x n = 0 Then we use the equations (2.1) to (2.n) successively. That in the first iteration Eqn (2.1) will give the value of x 1 (1), we use this value of x 1, and the other previous values of x i s, in Eqn(2.2) to get x 2 (1). Then values x1 (1), x2 (1) and the other previous values of x i s, in Eqn(2.3) to get x 3 (1) and so on till we get xn (1).

After first iteration We have got x 1 (1), x2 (1),, xn (1). Then we start the second iteration. And so on.

But when should we stop? Again as we were doing previously, calculate the percentage relative error for each variable and find the maximum among them which should be less than a tolerance values.

Does the Method always converge? No. It depends whether the system is diagonally dominant or not? If diagonally dominant then it converges.

Diagonally Dominant A system a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2 a n1 x 1 + a n2 x 2 + + a nn x n = b n is said to be diagonally dominant if it satisfy a ii > a i1 + a i2 + + a i,i 1 + a i,i+1 + + a in For each i = 1,2,, n

That is a ii n > j=1,j i a ij For i = 1,2,, n Then we say that system is diagonally dominant.

Example 1 Solve using Gauss-Seidel method 8x 3y + 2z = 20 4x + 11y z =33 6x + 3y + 12z = 35

Answer The system in the given example is diagonally dominant, as 8x 3y + 2z = 20 8 > 3 + 2 = 5 4x + 11y z =33 11 > 4 + 1 = 5 6x + 3y + 12z = 35 12 > 6 + 3 = 9

Rewriting the equations, we get 8x 3y+2z=20 x = 20+3y 2z 8 4x+11y z=33 y = 33 4x+z 11 6x+3y+12z=35 z = 35 6x 3y 12 (1.a) (1.b) (1.c)

Initial values assigned x (0) = 0, y (0) = 0, z (0) = 0 Now use equation (1.a), which gives

First iteration x (1) = 20+3y(0) 2z (0) y (1) = 33 4x 1 +z (0) 2.090909 8 11 z (1) = 35 6x 1 3y (1) 12 = 20 8 = 2.5 = 33 4 2.5+0 11 = = 35 6 2.5 3 2.090909 12 = 1.1439394

Second iteration x (2) = 20+3 2.090909 2 1.1439394 y (2) = z (2) = 8 33 4 2.998106 +1.1439394 11 35 6 2.998106 3 2.013774 12 =2.998106 = 2.013774 = 0.91417

i=0 i=1 i=2 i=3 i=4 i=5 i=6 x (i) = 0 2.5 2.998106 3.026623 3.016512 3.0166 3.016768 y (i) = 0 2.090909 2.013774 1.982516 1.985607 1.985964 1.985891 z (i) = 0 1.143939 0.91417 0.907726 0.912009 0.911875 0.91181

Percentage error calculation i=2 i=3 i=4 i=5 i=6 %ea(x) 16.61402 0.942195 0.335179 0.00293 0.005546 %ea(y) 3.830369 1.576674 0.155661 0.017986 0.003675 %ea(z) 25.13419 0.709894 0.469584 0.014639 0.007174

Example 2 Solve using Gauss-Seidel method 10x 2y + z = 12 3x + 9y z =21 2x + 3y + 8z = 30

Answer The system in the given example is diagonally dominant, as 10x 2y + z = 12 10 > 2 + 1 = 3 3x + 9y z =21 9 > 3 + 1 = 4 2x + 3y + 8z = 30 8 > 2 + 3 = 5

Rewriting the equations, we get 10x 2y + z = 12 x = 12+2y z 10 3x+9y z=21 y = 21 3x+z 9 2x+3y+8z=30 z = 30 2x 3y 8 (2.b) (2.c) (2.a)

Initial values assigned x (0) = 0, y (0) = 0, z (0) = 0 Now use equation (2.a), (2.b), (2.c), which gives

i=0 i=1 i=2 i=3 i=4 i=5 i=6 x (i) = 0 1.2 1.314167 1.379892 1.372959 1.373259 1.373268 y (i) = 0 1.933333 2.198056 2.161946 2.163935 2.163945 2.163933 z (i) = 0 2.725 2.597188 2.594297 2.595284 2.595206 2.595208

Percentage error calculation i=2 i=3 i=4 i=5 i=6 %ea(x) 8.687381 4.763103 0.504966 0.021792 0.000716 %ea(y) 12.04347 1.670253 0.091956 0.000458 0.000555 %ea(z) 4.921189 0.111406 0.038032 0.003026 7.87E-05