Download presentation

Presentation is loading. Please wait.

Published bySally Carnell Modified about 1 year ago

1
1 Chapter: 3c System of Linear Equations Dr. Asaf Varol asvarol@mail.wvu.edu

2
2 Pivoting Some disadvantages of Gaussian elimination are as follows: Since each result follows and depends on the previous step, for large systems the errors introduced due to round off (or chop off) errors lead to loss of significant figures and hence to in accurate results. The error committed in any one step propagates till the final step and it is amplified. This is especially true for ill-conditioned systems. Of course if any of the diagonal elements is zero, the method will not work unless the system is rearranged so to avoid zero elements being on the diagonal. The practice of interchanging rows with each other so that the diagonal elements are the dominant elements is called partial pivoting. The goal here is to put the largest possible coefficient along the diagonal by manipulating the order of the rows. It is also possible to change the order of variables, i.e. instead of letting the unknown vector {X} T = (x, y, z) we may let it be {X} T = ( y, z, x) When this is done in addition to partial pivoting, this practice is called full pivoting. In this case only the meaning of each variable changes but the system of equations remain the same.

3
3 Example E3.4.2 Consider the following set of equations 0.0003 x + 3.0000 y = 2.0001 1.0000 x + 1.0000 y = 1.0000 The exact solution to which is x = 1/3 and y = 2/3 Solving this system by Gaussian elimination with a three significant figure mantissa yields x = -3.33, y = 0.667 with four significant figure mantissa yields x = 0.0000 and y = 0.6667

4
4 Example E3.4.2 (continued) Partial pivoting (switch the rows so that the diagonal elements are largest) 1.0000 x + 1.0000 y = 1.0000 0.0003 x + 3.0000 y = 2.0001 The solution of this set of equations using Gaussian elimination gives y = 0.667 and x = 0.333 with three significant figure arithmetic y = 0.6667 and x = 0.3333 with four significant figure arithmetic

5
5 Example E3.4.3 Problem: Apply full pivoting to the following system to achieve a well conditioned matrix. 3x + 5y - 5z = 3 2x - 4y - z = -3 6x - 5y + z = 2

6
6 Example E3.4.3 (continued) Solution: First switch the first column with the second column, then switch the first column with the third column to obtain -5z + 3x + 5y = 3 - z + 2x - 4y = -3 z + 6x - 5y = 2 Then switch second row with the third row -5z + 3x + 5y = 3 z + 6x - 5y = 2 -z + 2x - 4y = -3 Yielding finally a well conditioned system given by

7
7 Gauss – Jordan Elimination This method is very similar to Gaussian elimination method. The only difference is in that the elimination procedure is extended to the upper diagonal elements so that a backward substitution is no longer necessary. The elimination process begins with the augmented matrix, and continued until the original matrix turns into an identity matrix, of course with necessary modifications to the right hand side. In short our goal is to start with the general augmented system and arrive at the right side after appropriate algebraic manipulations. Startarrive ===> The solution can be written at once as

8
8 Pseudo Code for Gauss – Jordan Elimination do for k = 1 to n! Important note do for j= k+1 to n+1! a(i,n+1) represents the a kj = a kj /a kk ! the right hand side end do do for i = 1 to n ; i is not equal to k do for j = k+1 to n+1 a ij = a ij - (a ik )(a kj ) end do cc----- The solution vector is saved in a(i,n+1), i=1, to n

9
9 Example E3.4.4

10
10 Example E3.4.4 (continued)

11
11 Finding the Inverse using Gauss-Jordan Elimination

12
12 LU Decomposition

13
13 Example E3.4.5

14
14 Crout Decomposition

15
15 Pseudo Code for LU-Decomposition

16
16 Cholesky Decomposition for Symmetric Matrices

17
17 Tridiagonal Matrix Algorithm (TDMA), also known as Thomas Algorithm

18
18 TDMA Algorithm

19
19 Example E3.4.6

20
20 Iterative Methods for Solving Linear Systems

21
21 Jacobi Iteration

22
22 Example E3.5.1

23
23 Convergence Criteria for Jacobi Iteration

24
24 Gauss - Seidel Iteration

25
25 Gauss - Seidel Iteration (II)

26
26 Example E3.5.2

27
27 Convergence Criteria for Gauss - Seidel Iteration

28
28 Relaxation Concept

29
29 Example E3.5.4

30
30 Example E3.5.4 (continued)

31
31 Case Study - The Problem of Falling Objects

32
32 Case Study - The Problem of Falling Objects

33
33 References 1.Celik, Ismail, B., “Introductory Numerical Methods for Engineering Applications”, Ararat Books & Publishing, LCC., Morgantown, 2001 2.Fausett, Laurene, V. “Numerical Methods, Algorithms and Applications”, Prentice Hall, 2003 by Pearson Education, Inc., Upper Saddle River, NJ 07458 3.Rao, Singiresu, S., “Applied Numerical Methods for Engineers and Scientists, 2002 Prentice Hall, Upper Saddle River, NJ 07458 4.Mathews, John, H.; Fink, Kurtis, D., “Numerical Methods Using MATLAB” Fourth Edition, 2004 Prentice Hall, Upper Saddle River, NJ 07458 5.Varol, A., “Sayisal Analiz (Numerical Analysis), in Turkish, Course notes, Firat University, 2001 6.http://mathonweb.com/help/backgd3e.htm

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google