|
GAUSS-SEIDEL METHOD OF SOLVING SIMULTANEOUS LINEAR EQUATIONS AN INTERACTIVE EBOOK
|
|
Title |
An interactive e-book for illustrating the Gauss-Seidal Method of Solving Simultaneous Linear Equations |
|
Creator |
Autar K Kaw |
|
Subject and Keywords |
LU Decomposition, Simultaneous Linear Equations, Mathcad, Maple, Mathematica, Matlab, Simulations. |
|
Description |
This is an interactive E-book for illustrating Gauss-Seidal Method of Solving Simultaneous Linear Equations. It includes links to simulations in Mathcad, Maple, Mathematica, and Matlab for the algorithm, multiple-choice quizzes, problem set, and a PowerPoint presentation. |
|
Publisher |
Holistic Numerical Methods Institute, College of Engineering, University of South Florida, Tampa, FL 33620-5350. |
|
Contributors |
Autar Kaw |
|
Format |
Text/HTML |
|
Last Revised |
Monday, December 17, 2007 |
|
Identifier |
http://numericalmethods.eng.usf.edu/ebooks/gaussseidel_04sle_ebook.pdf |
|
Language |
English |
|
Rights |
|
Why do we need another method to solve a set of simultaneous linear equations?The above system of equations does not seem to converge? Why?
PowerPoint Presentation on Gauss Seidal Method SimulationsMethod [MAPLE] [MATHCAD] [MATHEMATICA] [MATLAB] Convergence [MAPLE] [MATHCAD] [MATHEMATICA] [MATLAB] Test your knowledge of Gauss-Seidal Method [HTML] [PDF] [DOC] Why do we need another method to solve a set of simultaneous linear equations?In certain cases, such as when a system of equations is large, iterative methods of solving equations such as Gauss-Seidal method are more advantageous. Elimination methods such as Gaussian elimination are prone to round off errors for a large set of equations. Iterative methods, such as Gauss-Seidal method, allow the user the control of the round-off error. Also if the physics of the problem are well known for faster convergence, initial guesses needed in iterative methods can be made more judiciously. You convinced me, so what is the algorithm for Gauss-Seidel method? Given a general set of n equations and n unknowns, we have
. . . . . .
If the diagonal elements are non-zero, each equation is rewritten for
the corresponding unknown, that is, the first equation is rewritten with
These equations can be rewritten in the summation form as
. . .
Hence for any row i,
Now to find xi’s, one assumes an initial guess for the xi’s and then use the rewritten equations to calculate the new guesses. Remember, one always uses the most recent guesses to calculate xi. At the end of each iteration, one calculates the absolute relative approximate error for each xi as
where When the absolute relative approximate error for each xi is less than the pre-specified tolerance, the iterations are stopped. PowerPoint Presentation on Gauss Seidal Method Simulations on Gauss-Seidal MethodMethod [MAPLE] [MATHCAD] [MATHEMATICA] [MATLAB] Convergence [MAPLE] [MATHCAD] [MATHEMATICA] [MATLAB] Example 1The upward velocity of a rocket is given at three different times in the following table
The velocity data is approximated by a polynomial as
The coefficients a1, a2, a3 for the above expression were found in Chapter 5 to be given by
Find the values of a1, a2,
a3 using Gauss-Seidal Method. Assume an initial guess of
the solution as SolutionRewriting the equations gives
Given the initial guess of the solution vector as
we get
= 3.6720
=
= The absolute relative approximate error for each xi then is
= 72.76%
= 125.47%
= 103.22% At the end of the first iteration, the guess of the solution vector is
The estimate of the solution vector at the end of iteration #1 is
Now we get
= 12.056
=
=
The absolute relative approximate error for
each
= 69.542%
= 85.695%
= 80.54%. At the end of second iteration the estimate of the solution is
and the maximum absolute relative approximate error is 85.695%. Conducting more iterations gives the following values for the solution vector and the corresponding absolute relative approximate errors.
As seen in the above table, the solution is not converging to the true solution of a1 = 0.29048 a2 = 19.690 a3 = 1.0858 The above system of equations does not seem to converge? Why?Well, a pitfall of most iterative methods is that they may or may not converge. However, certain classes of systems of simultaneous equations do always converge to a solution using Gauss-Seidel method. This class of system of equations is where the coefficient matrix [A] in [A][X] = [C] is diagonally dominant, that is
and If a system of equations has a coefficient matrix that is not diagonally dominant, it may or may not converge. Fortunately, many physical systems that result in simultaneous linear equations have diagonally dominant coefficient matrix, which then assures convergence for iterative methods such as Gauss-Seidel method of solving simultaneous linear equations. Example 2Given the system of equations.
find the solution using Gauss-Seidal method. Given
SolutionThe coefficient matrix
is diagonally dominant as
and the inequality is strictly greater than for at least one row. Hence, the solution should converge using Gauss-Seidel method. Rewriting the equations, we get
Assuming an initial guess of
= 0.50000
= 4.9000
= 3.0923 The absolute relative approximate error at the end of first iteration is
= 67.662%
= 100.000%
= 67.662% The maximum absolute relative approximate error is 100.000%
= 0.14679
= 3.7153
= 3.8118 At the end of second iteration, the absolute relative approximate error is
= 240.62%
= 31.887%
= 18.876%. The maximum absolute relative approximate error is 240.62%. This is greater than the value of 67.612% we obtained in the first iteration. Is the solution diverging? No, as you conduct more iterations, the solution converges as follows.
This is close to the exact solution vector of
Example 3Given the system of equations
Find the solution using Gauss-Seidel method.
Use SolutionRewriting the equations, we get
Assuming an initial guess of
the next six iterative values are given in the table below
|