1 / 45

Metode Eliminasi

Metode Eliminasi. Pertemuan – 4, 5, 6. Mata Kuliah : Analisis Numerik Kode : CIV - 208 SKS : 3 SKS. Sub Pokok Bahasan : Eliminasi Gauss Eliminasi Gauss Jordan Dekomposisi LU Iterasi Gauss-Seidel Iterasi Jacobi.

prem
Download Presentation

Metode Eliminasi

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. Metode Eliminasi Pertemuan – 4, 5, 6 Mata Kuliah : Analisis Numerik Kode : CIV - 208 SKS : 3 SKS

  2. Sub Pokok Bahasan : • Eliminasi Gauss • Eliminasi Gauss Jordan • Dekomposisi LU • Iterasi Gauss-Seidel • Iterasi Jacobi

  3. This topic deals with simultaneous linear algebraic equations that can be represented generally as • where the a’s are constant coefficients and the b’s are constants. • The technique described in this chapter is called Gauss elimination because it involves combining equations to eliminate unknowns. a11.x1 + a12.x2 + … + a1n.xn = b1 a21.x1 + a22.x2 + … + a2n.xn = b2 …… an1.x1 + an2.x2 + … + ann.xn = bn

  4. Before proceeding to the computer methods, we will describe several methods that are appropriate for solving small (n≤3) sets of simultaneous equations and that do not require a computer. • These are the graphical method, Cramer’s rule, and the elimination of unknowns.

  5. For example : solve 3x1 + 2x2 = 18 - x1+ 2x2 = 2 • The solution is the intersection of the two lines at x1=4 and x2=3. • This result can be checked by substituting these values into the original equations to yield 3(4)+2(3)=18 −(4)+2(3) =2

  6. Another method is use elimination • The elimination of unknowns by combining equations is an algebraic approach that can be illustrated for a set of two equations: a11x1+a12x2=b1(1) a21x1+a22x2=b2 (2)

  7. Eq. (1) might be multiplied by a21and Eq. (2) by a11to give a11a21x1+a12a21x2=b1a21(3) a21a11x1+a22a11x2=b2a11(4) • Subtracting Eq. (3) from Eq. (4) will, therefore, eliminate the x1 term from the equations to yield a22a11x2−a12a21x2=b2a11−b1a21

  8. which can be solved for • x2 can then be substituted into Eq. (1), which can be solved for • example : Use the elimination to solve 3x1 + 2x2 = 18 - x1 + 2x2 = 2

  9. Gauss Elimination • In the previous section, the elimination of unknowns was used to solve a pair of simultaneous equations. The procedure consisted of two steps: 1. The equations were manipulated to eliminate one of the unknowns from the equations. The result of this elimination step was that we had one equation with one unknown. 2. Consequently, this equation could be solved directly and the result back-substituted into one of the original equations to solve for the remaining unknown. • This basic approach can be extended to large sets of equations by developing a systematic scheme or algorithm to eliminate unknowns and to back-substitute. • Gauss elimination is the most basic of these schemes.

  10. The Gauss Elimination is designed to solve a general set of n equations: • As was the case with the solution of two equations, the technique for n equations consists of two phases: elimination of unknowns and solution through back substitution. a11.x1 + a12.x2 + … + a1n.xn = b1(5.a) a21.x1 + a22.x2 + … + a2n.xn = b2(5.b) …… an1.x1 + an2.x2 + … + ann.xn = bn (5.c)

  11. The initial step will be to eliminate the first unknown, x1, from the second through the nth equations. • To do this, multiply Eq. (5.a) by a21/a11to give • Subtracted from Eq. (5.b) to give • Or :

  12. The procedure is then repeated for the remaining equations. • For instance, Eq. (5.a) can be multiplied by a31/a11and the result subtracted from the third equation. • Repeating the procedure for the remaining equations results in the following modified system:

  13. Eq. (5.a) is called the pivot equation and a11 is called the pivot coefficient or element a11.x1 + a12.x2 + a13.x3 + …. + a1n.xn = b1(6.a) a/22.x2 + a/23.x3 + …. + a/2n.xn = b/2(6.b) a/32.x2 + a/33.x3 + …. + a/3n.xn = b/3(6.c) ……… a/n2.x2 + a/n3.x3 + …. + a/nn.xn = b/n(6.d)

  14. Now repeat the above to eliminate the second unknown from Eq. (6.c) through (6.d). • To do this multiply Eq. (6.b) by a’32/a’22, and subtract the result from Eq. (6.c). • Perform a similar elimination for the remaining equations to yield

  15. The procedure can be continued using the remaining pivot equations. • The final manipulation in the sequence is to use the (n−1)th equation to eliminate the xn−1term from the nth equation. a11.x1 + a12.x2 + a13.x3 + …. + a1n.xn= b1 a/22.x2 + a/23.x3 + …. + a/2n.xn = b/2 a//33.x3 + …. + a//3n.xn = b//3……… a//n3.x3 + …. + a//nn.xn = b//n

  16. now solve for xn : • This result can be back-substituted into the (n−l)th equation to solve for xn−1. a11.x1 + a12.x2 + a13.x3 + …. + a1n.xn = b1 a/22.x2 + a/23.x3 + …. + a/2n.xn = b/2 a//33.x3 + …. + a//3n.xn = b//3 ……… a(n-1)nn.xn = b(n-1)n

  17. The procedure, which is repeated to evaluate the remaining x’s, can be represented by the following formula: • For i =n−1,n−2,...,1

  18. Example 1 Use Gauss elimination to solve x1 − 2x2+ 2x3= 1 2x1 + x2 − 3x3= −3 −3x1+ x2− x3 =4 Carry six significant figures during the computation.

  19. Gauss-Jordan Elimination • The Gauss-Jordan method is a variation of Gauss elimination. • The major difference is that when an unknown is eliminated in the Gauss-Jordan method, it is eliminated from all other equations rather than just the subsequent ones. • In addition, all rows are normalized by dividing them by their pivot elements. • Thus, the elimination step results in an identity matrix rather than a triangular matrix • Consequently, it is not necessary to employ back substitution to obtain the solution.

  20. Example 2 Use Gauss-Jordan elimination to solve x1 − 2x2 + 2x3= 1 2x1 + x2 − 3x3= −3 −3x1 + x2− x3 = 4 Last step in Gauss Elimination :

  21. LU Decomposition • As described in previous lesson, Gauss elimination is designed to solve systems of linear algebraic equations, [A]{X}={B} (1) • Although it certainly represents a sound way to solve such systems, it becomes inefficient when solving equations with the same coefficients [A], but with different right-hand-side constants (the b’s).

  22. LU decomposition methods separate the time-consuming elimination of the matrix [A] from the manipulations of the right-hand side {B}. • Thus, once [A] has been “decomposed,” multiple right-hand-side vectors can be evaluated in an efficient manner. • Interestingly, Gauss elimination itself can be expressed as an LU decomposition

  23. Equation (1) can be rearranged to give [A]{X}−{B}=0 (2) • Suppose that Eq. (2) could be expressed as an upper triangular system: (3) • Equation (3) can also be expressed in matrix notation and rearranged to give [U]{X}−{D}=0 (4)

  24. Assume that there is a lower diagonal matrix with 1’s on the diagonal, (5) • That has the property that when Eq. (4) is premultiplied by it, Eq. (2) is the result. That is, [L]{[U]{X}−{D}} =[A]{X}−{B} (6)

  25. If this equation holds, it follows from the rules for matrix multiplication that [L][U]=[A] (7) • and [L]{D}={B} (8)

  26. Gauss elimination can be used to decompose [A] into [L] and [U]. For example : (9) • The first step in Gauss elimination is to multiply row 1 by the factor • and subtract the result from the second row to eliminate a21.

  27. Similarly, row 1 is multiplied by • And the result subtracted from the third row to eliminate a31 • The final step is to multiply the modified second row by • and subtract the result from the third row to eliminate a’32

  28. The value of f21, f31, f32actually are the element of [L]. • So we can rewrite Eq.(9) into the form of :

  29. Example 1 • Solve the equation below, using LU decomposition method

  30. Crout Decomposition • An alternative approach involves a [U] matrix with 1’s on the diagonal. • This is called Crout decomposition. • The Crout decomposition approach generates [U] and [L] by sweeping through the matrix by columns and rows, as depicted in Fig

  31. Crout Decomposition can be implemented by the following concise series of formulas • li1 = ai1 for i = 1,2,3, …, n • for j = 2,3, …, n • for j = 2,3,……., n1 and : For i = j, j+1, …., n For k = j+1, j+2, …, n

  32. Example 2 • Repeat example 1 using Crout Decomposition method

  33. Gauss-Seidel Iteration • Iterative or approximate methods provide an alternative to the elimination methods • The Gauss-Seidel method is the most commonly used iterative method. • Assume that we are given a set of n equations: [A]{X}={B} (1)

  34. Suppose that for conciseness we limit ourselves to a 3×3 set of equations. • If the diagonal elements are all nonzero, the first equation can be solved for x1, the second for x2, and the third for x3 to yield (2.a) (2.b) (2.c)

  35. 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 all zero. • These zeros can be substituted into Eq. (2.a), which can be used to calculate a new value for x1 = b1/a11. • Then, we substitute this new value of x1 along with the previous guess of zero for x3 into Eq. (2.b) to compute a new value for x2. • The process is repeated for Eq. (2.c) to calculate a new estimate for x3.

  36. Then we return to the first equation and repeat the entire procedure until our solution converges closely enough to the true values. • Convergence can be checked using the criterion

  37. Example 1 Use the Gauss-Seidel method to obtain the solution of the system Recall that the true solution is x1=3, x2=−2.5, and x3=7. 3x1− 0.1x2− 0.2x3 =7.85 0.1x1+ 7x2− 0.3x3 = −19.3 0.3x1− 0.2x2+ 10x3 =71.4

  38. Jacobi Iteration • An alternative approach, called Jacobi iteration, utilizes a somewhat different tactic. • Rather than using the latest available x’s, this technique uses Eq. (2) to compute a set of new x’s on the basis of a set of old x’s. • Thus, as new values are generated, they are not immediately used but rather are retained for the next iteration.

  39. Gauss-Seidel Jacobi

  40. Example 2 Use the Jacobi Iteration method to obtain the solution of the system Recall that the true solution is x1=3, x2=−2.5, and x3=7. 3x1− 0.1x2− 0.2x3 =7.85 0.1x1+ 7x2− 0.3x3 = −19.3 0.3x1− 0.2x2+ 10x3 =71.4

  41. Homework

  42. Homework • Calculate each member force for each system

More Related