1 / 22

MATH 175: Numerical Analysis II

MATH 175: Numerical Analysis II. Lecturer: Jomar Fajardo Rabajante 2 nd Sem AY 2012-2013 IMSP, UPLB. Numerical Methods for Linear Systems. Review (Naïve) Gaussian Elimination Given n equations in n variables. Operation count for elimination step : (multiplications/divisions)

leoma
Download Presentation

MATH 175: Numerical Analysis II

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. MATH 175: Numerical Analysis II Lecturer: JomarFajardoRabajante 2ndSem AY 2012-2013 IMSP, UPLB

  2. Numerical Methods for Linear Systems Review (Naïve) Gaussian Elimination Given n equations in n variables. • Operation count for elimination step: (multiplications/divisions) • Operation count for back substitution:

  3. Numerical Methods for Linear Systems Overall (Naïve) Gaussian Elimination takes Take note: we ignored here lower-order terms and we did not include row exchanges and additions/subtractions. WHAT MORE IF WE ADDED THESE STUFFS???!!! KAPOY NA!

  4. Numerical Methods for Linear Systems Example: Consider 10 equations in 10 unknowns. The approximate number of operations is If our computations have round-off errors, how would our solution be affected by error magnification? Tsk… Tsk…

  5. Numerical Methods for Linear Systems Our goal now is to use methods that will efficiently solve our linear systems with minimized error magnification.

  6. 1st Method: Gaussian Elimination with Partial Pivoting • When we are processing column iin Gaussian elimination, the (i,i) position is called the pivot position, and the entry in it is called the pivot entry (or simply the pivot). • Let [A|b] be an nx(n+1) augmented matrix.

  7. 1st Method: Gaussian Elimination with Partial Pivoting STEPS: • Begin loop (i = 1 to n–1): • Find the largest entry (in absolute value) in column i from row i to row n. If the largest value is zero, signal that a unique solution does not exist and stop. • If necessary, perform a row interchange to bring the value from step 2 into the pivot position (i,i).

  8. 1st Method: Gaussian Elimination with Partial Pivoting 4. For j = i+1 to n, perform 5. End loop. 6. If the (n,n) entry is zero, signal that a unique solution does not exist and stop. Otherwise, solve for the solution by back substitution.

  9. 1st Method: Gaussian Elimination with Partial Pivoting Example: Matrix 1 Original matrix (Matrix 0)

  10. 1st Method: Gaussian Elimination with Partial Pivoting Matrix 1 Matrix 2 1 0 4 1 4

  11. 1st Method: Gaussian Elimination with Partial Pivoting Matrix 1 Matrix 2 1 1 4 2 4

  12. 1st Method: Gaussian Elimination with Partial Pivoting Matrix 1 Matrix 2 1 –1 12 2 4

  13. 1st Method: Gaussian Elimination with Partial Pivoting Matrix 1 Matrix 2 1 –2 12 1 4

  14. 1st Method: Gaussian Elimination with Partial Pivoting Matrix 1 Matrix 2 4 0 4 4 4

  15. 1st Method: Gaussian Elimination with Partial Pivoting Matrix 1 Matrix 2 4 4 4 8 4

  16. 1st Method: Gaussian Elimination with Partial Pivoting Matrix 1 Matrix 2 4 0 12 12 4

  17. 1st Method: Gaussian Elimination with Partial Pivoting Matrix 1 Matrix 2 4 –4 12 8 4

  18. 1st Method: Gaussian Elimination with Partial Pivoting Matrix 2 Matrix 3

  19. 1st Method: Gaussian Elimination with Partial Pivoting Final Matrix (Matrix 4) Matrix 3

  20. 1st Method: Gaussian Elimination with Partial Pivoting Back substitution: Final Matrix

  21. 1st Method: Gaussian Elimination with Partial Pivoting a unique solution does not exist

  22. 1st Method: Gaussian Elimination with Partial Pivoting • There are other pivoting strategies such as the complete (or maximal) pivoting. But complete pivoting is computationally expensive.

More Related