linear equation systems iterative methods€¦ · linear equation systems ‐iterative methods ......
TRANSCRIPT
Linear Equation Systems‐Iterative Methods‐
Content
• Iterative Methods• Jacobi Iterative Method• Gauss‐Seidel Iterative Method
Iterative Methods
• Iterative methods are those that produce a sequence of successive approximations which, under specific conditions, converge to the true solution.
• In these methods is necessary to have an initial value for the method begins to iterate and also requires a convergence criterion for reaching settlement.
• Representative methods for this are:• Jacobi method• Gauss‐Seidel Method
Jacobi Iterative Method
A system of linear equations in unknowns
can be solved by the Jacobi iterative methodwhen certain conditions are met.A sufficient but not necessary condition is the condition that guarantees convergence:
Jacobi Iterative Method
Recursion formulas Jacobi method for equations with unknowns are:
If the convergence condition is satisfied then the recursion formulas for Jacobi generate a sequence of successive approximations that converge to the exact solution of the system, starting with an arbitrary approximation
, , , … , .Since the convergence condition is not necessary, this condition can not be satisfied and the method never converge.
Jacobi Iterative Method
Example:• Consider the following system of linear equations with a convergence value of 0.1:
Jacobi Iterative Method
• Note that the order of the equations has been selected so that the main diagonal coefficients predominate over the coefficient off‐diagonal.
• Since the diagonal elements are non‐zero, we can express the variable in the th equation in terms of the remaining variables and
constant.• The result can be expressed in recursion formula as follows:
Jacobi Iterative Method
• This system of equations we can write in matrix form:
• The first iteration of the solution are given below, starting with , , , … , , , as initial approximate solution:
Jacobi Iterative Method
• Evaluate convergence
Jacobi Iterative Method
• Evaluate convergence
Jacobi Iterative Method
• Evaluate convergence
Jacobi Iterative Method
• Evaluate convergence
• If we continue in this way, the approach , , will converge to the exact solution (3, 2, 1)
Gauss‐Seidel Iterative Method
• This iterative method for solving a system of linear equations is a simple modification of the method of Jacobi.
• If the recursion formulas are changed so that every time the value is calculated, it is used for calculations of , , … , ,
then we obtain the following recursion formulas for Gauss‐Sidel:
Gauss‐Seidel Iterative Method
• A sufficient but not necessary condition for converging the Gauss‐Seidel is:
• Note that the condition is the same as the Jacobi method, however, for a rough initial solution, the Gauss‐Seidel method can converge to a true solution while the Jacobi method does not, and vice versa.
• Shown that the Gauss‐Seidel method is twice the rate of convergence of Jacobi.
Recursion Formulas
Jacobi Method• For this method apply matrix multiplication and matrix addition.
1. Input: , number of equations; , maximum number of iterations; , convergence criterion; , coefficients matrix; , constants matrix.
2. Divide the row of the matrices and between ; ; , ; ,
3. Initialize iteration counter . Match zero matrix : . ,
4. Multiply the matrix by and add the matrix for
Recursion Formulas
5. Evaluate convergence:a) If any of , go to step 6b) If all , go to step 7
6. Evaluate the iteration counter:a) If , increase to 1 and return to step 4b) If , go to step 8
7. Exit for convergence. Write the solutions: ,
8. Exit. Writing "The program could not converge on iterations."
Recursion Formulas
Gauss‐Seidel method1. Input: , number of equations; , maximum number of iterations; ,
convergence criterion; augmented matrix , .2. Divide the row of the matrix , between
; ; , ; ,
3. Initialize the iteration counter . Initialize values of. ,
4. Calculate the successive iterations using the following computational formula:
, ; ,
Recursion Formulas
5. Evaluate convergence:a) If any of , go to step 6b) If all , go to step 7
6. Evaluate the iteration counter:a) If , increase to 1 and return to step 4b) If , go to step 8
7. Exit for convergence. Write the solutions: ,
8. Exit. Writing "The program could not converge on iterations."
Homework 3 (Individual)
1. Solve the following system of linear equations manually for each of the following methods:a) Inverse matrixb) Cramer’s Rulec) Gauss‐Jordan Methodd) Montante Method
3 5 6 72 4 3 174 6 2 4
The solution of the system of equations is (2, 1, ‐3)
Homework 3 (Individual)
2. Solve the following system of linear equations manually for each of the following methods, taking as initial values 0, 0, 0 . You can make use of a table in Excel:a) Jacobi Method (convergence error 0.1)b) Gauss‐Seidel Method (convergence error 0.01)
3 132 7 21
4 6 5The solution of the system of equations is (3, 2, 1)
Computer Program 2 (by team)
• Submit a computer program to solve a system of linear equations with unknowns, for each of the following methods:a) Inverse Matrixb) Cramer’s Rulec) Method of Gauss‐Jordand) Montante Methode) Jacobi Methodf) Gauss‐Seidel Method
• Hand over:• Computational algorithm (printed)• Source Code (printed and file)• Executable (file)
Linear Equation Systems‐Iterative Methods‐