1 / 43

Part 3 - Chapter 9 Linear Systems of Equations: Gauss Elimination

Part 3 - Chapter 9 Linear Systems of Equations: Gauss Elimination. Gauss Elimination Chapter 9. Solving Small Numbers of Equations There are many ways to solve a system of linear equations: Graphical method Cramer’s rule Method of elimination

teresaolson
Download Presentation

Part 3 - Chapter 9 Linear Systems of Equations: Gauss Elimination

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. Part 3 - Chapter 9 Linear Systems of Equations: Gauss Elimination

  2. Gauss EliminationChapter 9 Solving Small Numbers of Equations • There are many ways to solve a system of linear equations: • Graphical method • Cramer’s rule • Method of elimination • Computer methods are necessary for large numbers of equations For n ≤ 3

  3. Graphical Method • For two equations: • Solve both equations for x2:

  4. Fig. 9.1 • Plot x2 vs. x1 on rectilinear paper, the intersection of the lines present the solution.

  5. Figure 9.2 No Solutions Infinite Solutions Ill conditioned

  6. Determinants and Cramer’s Rule • Cramer’s rule uses determinants to solve for the vector of unknowns, x.

  7. The technique for calculating a determinant is similar to that for calculating the cross product (chapter 8)

  8. Is the same as:

  9. Cramer’s rule expresses the solution of a system of linear equations in terms of ratios of determinants of the array of coefficients of the equations. For example, x1 would be computed as:

  10. Solve Example 9.2 using the det function in MATLAB

  11. Method of Elimination • The basic strategy is to • successively solve one of the equations of the set for one of the unknowns • and to eliminate that variable from the remaining equations by substitution. • The elimination of unknowns can be extended to systems with more than two or three equations; however, the method becomes extremely tedious to solve by hand.

  12. For example…page 230 3rd edition

  13. Naive Gauss Elimination • Extension of method of elimination to large sets of equations by developing a systematic scheme or algorithm to eliminate unknowns and to back substitute. • As in the case of the solution of two equations, the technique for n equations consists of two phases: • Forward elimination of unknowns • Back substitution

  14. Pivot row

  15. Pivot row

  16. Pivot row

  17. Example 9.3

  18. %% Example 9.3

  19. Pitfalls of Elimination Methods • Division by zero. It is possible that during both elimination and back-substitution phases a division by zero can occur. • Round-off errors. • Ill-conditioned systems. Systems where small changes in coefficients result in large changes in the solution.

  20. Singular systems. When two equations are identical, we would loose one degree of freedom. Use the fact that the determinant of a singular system is zero to test for singular systems.

  21. Techniques for Improving Solutions • Use of more significant figures. • Pivoting. If a pivot element is zero, normalization step leads to division by zero. The same problem may arise, when the pivot element is close to zero. Problem can be avoided: • Partial pivoting. Switching the rows so that the largest element is the pivot element. • Complete pivoting. Searching for the largest element in all rows and columns then switching.

  22. Example 9.4Partial Pivoting Use Gauss elimination with and without partial pivoting to solve:

  23. Multiply the first equation by 1/.0003

  24. Subtract

  25. Back Substitute

  26. The answer is highly dependent on the number of significant figures you carry

  27. Implement Pivoting Make the equation with the largest value of aI,1 the pivot row

  28. Multiply the first equation by .0003/1

  29. Subtract

  30. Back Substitute

  31. The answer is much less dependent on the number of significant figures you carry

  32. Tridiagonal Systems • A tridiagonal system is a banded system with a bandwidth of 3: • Tridiagonal systems can be solved using the same method as Gauss elimination, but with much less effort because most of the matrix elements are already 0.

  33. Tridiagonal System Solver

  34. Summary • For small systems of linear equations we can use • Graphical techniques • Cramer’s rule • Method of elimination • For large systems of linear equations we need a computer technique such as gaussian elimination

  35. Gaussian Elimination • Naïve Gaussian elimination • Pivoting • Partial Pivoting • Complete Pivoting • Left Division implements Gaussian elimination

More Related