Download presentation
Presentation is loading. Please wait.
Published byFelicity Harrell Modified over 8 years ago
1
Linear Systems Numerical Methods
2
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.
3
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
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, …
5
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.
6
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.
7
Fig. 11.4
8
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
9
Similarly, in case of two simultaneous equations, the Gauss-Seidel algorithm can be expressed as
10
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:
12
http://numericalmethods.eng.usf. edu Gauss-Seidel Method: Example 1 The upward velocity of a rocket is given at three different times Time,Velocity 5106.8 8177.2 12279.2 The velocity data is approximated by a polynomial as: Table 1 Velocity vs. Time data.
13
Gauss-Seidel Method: Example 1 Using a Matrix template of the form The system of equations becomes Initial Guess: Assume an initial guess of
14
Gauss-Seidel Method: Example 1 Rewriting each equation
15
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?
16
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 125.47%
17
Gauss-Seidel Method: Example 1 Iteration #2 Using from iteration #1 the values of a i are found:
18
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 85.695%
19
Iteration a1a1 a2a2 a3a3 123456123456 3.6720 12.056 47.182 193.33 800.53 3322.6 72.767 69.543 74.447 75.595 75.850 75.906 −7.8510 −54.882 −255.51 −1093.4 −4577.2 −19049 125.47 85.695 78.521 76.632 76.112 75.972 −155.36 −798.34 −3448.9 −14440 −60072 −249580 103.22 80.540 76.852 76.116 75.963 75.931 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
20
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?
21
Gauss-Seidel Method: Example 2 Rewriting each equationWith an initial guess of
22
Gauss-Seidel Method: Example 2 The absolute relative approximate error The maximum absolute relative error after the first iteration is 100%
23
Gauss-Seidel Method: Example 2 After Iteration #1 Substituting the x values into the equations After Iteration #2
24
Gauss-Seidel Method: Example 2 Iteration #2 absolute relative approximate error The maximum absolute relative error after the first iteration is 240.61% This is much larger than the maximum absolute relative error obtained in iteration #1. Is this a problem?
25
Iterationa1a1 a2a2 a3a3 123456123456 0.50000 0.14679 0.74275 0.94675 0.99177 0.99919 100.00 240.61 80.236 21.546 4.5391 0.74307 4.9000 3.7153 3.1644 3.0281 3.0034 3.0001 100.00 31.889 17.408 4.4996 0.82499 0.10856 3.0923 3.8118 3.9708 3.9971 4.0001 67.662 18.876 4.0042 0.65772 0.074383 0.00101 Gauss-Seidel Method: Example 2 Repeating more iterations, the following values are obtained The solution obtained is close to the exact solution of.
26
Gauss-Seidel Method: Example 3 Given the system of equations With an initial guess of Rewriting the equations
27
Iterationa1a1 A2A2 a3a3 123456123456 21.000 −196.15 −1995.0 −20149 2.0364×10 5 −2.0579×10 5 95.238 110.71 109.83 109.90 109.89 0.80000 14.421 −116.02 1204.6 −12140 1.2272×10 5 100.00 94.453 112.43 109.63 109.92 109.89 50.680 −462.30 4718.1 −47636 4.8144×10 5 −4.8653×10 6 98.027 110.96 109.80 109.90 109.89 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?
28
Gauss-Seidel Method Observe the set of equations
29
29 MATRIX INVERSE A. A -1 = I Solve in n=3 major steps 1 2 3 Solve each one using A=L. U method e.g.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.