Linear Systems Numerical Methods
2 Jacobi Iterative Method Choose an initial guess (i.e. all zeros) and Iterate until the equality is satisfied. No guarantee for convergence! Each iteration takes O(n 2 ) time! Iterative methods provide an alternative to the elimination methods.
Gauss-Seidel Iterative or approximate methods provide an alternative to the elimination methods. The Gauss-Seidel method is the most commonly used iterative method. The system [A]{X}={B} is reshaped by solving the first equation for x 1, the second equation for x 2, and the third for x 3, …and n th equation for x n. For conciseness, we will limit ourselves to a 3x3 set of equations.
4 **here Gauss-Seidel The Gauss-Seidel method is a commonly used iterative method. It is same as Jacobi technique except with one important difference: A newly computed x value (say x k ) is substituted in the subsequent equations (equations k+1, k+2, …, n) in the same iteration. Example: Consider the 3x3 system below: First, choose initial guesses for the x’s. A simple way to obtain initial guesses is to assume that they are all zero. Compute new x 1 using the previous iteration values. New x 1 is substituted in the equations to calculate x 2 and x 3 The process is repeated for x 2, x 3, …
Now we can start the solution process by choosing guesses for the x’s. A simple way to obtain initial guesses is to assume that they are zero. These zeros can be substituted into x 1 equation to calculate a new x 1 =b 1 /a 11.
New x 1 is substituted to calculate x 2 and x 3. The procedure is repeated until the convergence criterion is satisfied: For all i, where j and j-1 are the present and previous iterations.
Fig. 11.4
Convergence Criterion for Gauss- Seidel Method The Gauss-Seidel method has two fundamental problems as any iterative method: –It is sometimes nonconvergent, and –If it converges, converges very slowly. Recalling that sufficient conditions for convergence of two linear equations, u(x,y) and v(x,y) are
Similarly, in case of two simultaneous equations, the Gauss-Seidel algorithm can be expressed as
Chapter 11 Substitution into convergence criterion of two linear equations yield: In other words, the absolute values of the slopes must be less than unity for convergence:
edu Gauss-Seidel Method: Example 1 The upward velocity of a rocket is given at three different times Time,Velocity The velocity data is approximated by a polynomial as: Table 1 Velocity vs. Time data.
Gauss-Seidel Method: Example 1 Using a Matrix template of the form The system of equations becomes Initial Guess: Assume an initial guess of
Gauss-Seidel Method: Example 1 Rewriting each equation
Gauss-Seidel Method: Example 1 Applying the initial guess and solving for a i Initial Guess When solving for a 2, how many of the initial guess values were used?
Gauss-Seidel Method: Example 1 Finding the absolute relative approximate error At the end of the first iteration The maximum absolute relative approximate error is %
Gauss-Seidel Method: Example 1 Iteration #2 Using from iteration #1 the values of a i are found:
Gauss-Seidel Method: Example 1 Finding the absolute relative approximate error At the end of the second iteration The maximum absolute relative approximate error is %
Iteration a1a1 a2a2 a3a − − − − − − − − − −14440 −60072 − Gauss-Seidel Method: Example 1 Repeating more iterations, the following values are obtained Notice – The relative errors are not decreasing at any significant rate Also, the solution is not converging to the true solution of
Gauss-Seidel Method: Example 2 Given the system of equations With an initial guess of The coefficient matrix is: Will the solution converge using the Gauss-Siedel method?
Gauss-Seidel Method: Example 2 Rewriting each equationWith an initial guess of
Gauss-Seidel Method: Example 2 The absolute relative approximate error The maximum absolute relative error after the first iteration is 100%
Gauss-Seidel Method: Example 2 After Iteration #1 Substituting the x values into the equations After Iteration #2
Gauss-Seidel Method: Example 2 Iteration #2 absolute relative approximate error The maximum absolute relative error after the first iteration is % This is much larger than the maximum absolute relative error obtained in iteration #1. Is this a problem?
Iterationa1a1 a2a2 a3a Gauss-Seidel Method: Example 2 Repeating more iterations, the following values are obtained The solution obtained is close to the exact solution of.
Gauss-Seidel Method: Example 3 Given the system of equations With an initial guess of Rewriting the equations
Iterationa1a1 A2A2 a3a − − − ×10 5 −2.0579× − − × − − ×10 5 −4.8653× Gauss-Seidel Method: Example 3 Conducting six iterations, the following values are obtained The values are not converging. Does this mean that the Gauss-Seidel method cannot be used?
Gauss-Seidel Method Observe the set of equations
29 MATRIX INVERSE A. A -1 = I Solve in n=3 major steps Solve each one using A=L. U method e.g.