1 / 29

Linear Systems

Linear Systems. Numerical Methods. Jacobi Iterative Method. Iterative methods provide an alternative to the elimination methods. 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!.

mbenard
Download Presentation

Linear Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Linear Systems Numerical Methods

  2. Jacobi Iterative Method Iterative methods provide an alternative to the elimination methods. Choose an initial guess (i.e. all zeros) and Iterate until the equality is satisfied. No guarantee for convergence! Each iteration takes O(n2) time!

  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 x1, the second equation for x2, and the third for x3, …and nth equation for xn. 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 xk) 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 x1using the previous iteration values. • New x1is substituted in the equations to calculate x2 and x3 • The process is repeated for x2, x3, …

  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 x1equation to calculate a new x1=b1/a11.

  6. New x1 is substituted to calculate x2 and x3. 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. 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: Chapter 11

  11. Gauss-Seidel Method: Example 1 The upward velocity of a rocket is given at three different times Table 1 Velocity vs. Time data. The velocity data is approximated by a polynomial as: http://numericalmethods.eng.usf.edu

  12. Gauss-Seidel Method: Example 1 Using a Matrix template of the form The system of equations becomes Initial Guess: Assume an initial guess of

  13. Gauss-Seidel Method: Example 1 Rewriting each equation

  14. Gauss-Seidel Method: Example 1 Applying the initial guess and solving for ai Initial Guess When solving for a2, how many of the initial guess values were used?

  15. 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%

  16. Gauss-Seidel Method: Example 1 Iteration #2 Using the values of ai are found: from iteration #1

  17. 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%

  18. 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

  19. Gauss-Seidel Method: Example 2 Given the system of equations The coefficient matrix is: With an initial guess of Will the solution converge using the Gauss-Siedel method?

  20. Gauss-Seidel Method: Example 2 Rewriting each equation With an initial guess of

  21. Gauss-Seidel Method: Example 2 The absolute relative approximate error The maximum absolute relative error after the first iteration is 100%

  22. Gauss-Seidel Method: Example 2 After Iteration #1 Substituting the x values into the equations After Iteration #2

  23. 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?

  24. Gauss-Seidel Method: Example 2 Repeating more iterations, the following values are obtained The solution obtained is close to the exact solution of .

  25. Gauss-Seidel Method: Example 3 Given the system of equations Rewriting the equations With an initial guess of

  26. 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?

  27. Gauss-Seidel Method Observe the set of equations

  28. 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.

More Related