ES 40: Scientific and Engineering Computation. Uchechukwu Ofoegbu Temple University Chapter : Iterative Methods
ES 40: Scientific and Engineering Computation. Gauss-Seidel Method The Gauss-Seidel method is the most commonly used iterative method for solving linear algebraic equations [A]{}={b}. The method solves each equation in a system for a particular variable, and then uses that value in later equations to solve later variables. For a system with nonzero elements along the diagonal, for eample, the j th iteration values are found from the j- th iteration using: j = b a j j a a j = b a j j a a j = b a j a j a
ES 40: Scientific and Engineering Computation. Gauss-Seidel Method The Gauss-Seidel method is the most commonly used iterative method for solving linear algebraic equations [A]{}={b}. The method solves each equation in a system for a particular variable, and then uses that value in later equations to solve later variables. For a system with nonzero elements along the diagonal, for eample, the j th iteration values are found from the j- th iteration using: a a a + a + a + a + a + a + a = = = c c c = ( c = ( c = ( c a a a a a a ) / a ) / a ) / a
ES 40: Scientific and Engineering Computation.. Select an initial guess: 0 0 [,,. Update each variable = ( c = ( c = ( c a. Continue to update the variables 4. Stop when the tolerance is met a a 0 ] a a a Applying the Gauss-Seidel Method ) / a ) / a ) / a ( t) i ε a, i = 00% < ε s ( t ) i ( t) i
ES 40: Scientific and Engineering Computation. Convergence. Sometimes this method diverges. If the magnitude of each diagonal term is greater than the sum of the magnitudes of the other terms in the same row, the method will certainly converge n a ii a ij i=, j i. Rows could be rearranged to ensure convergence 4. Sometimes convergence is attained even when the condition is not met
ES 40: Scientific and Engineering Computation. Eample Solve the following using the Gauss Seidel method + 8 0 = + + 5 = 5 = 4 Now use the GaussSeidel function
ES 40: Scientific and Engineering Computation. Jacobi Iteration The Jacobi iteration is similar to the Gauss- Seidel method, ecept the j-th information is used to update all variables in the jth iteration: a) Gauss-Seidel b) Jacobi
ES 40: Scientific and Engineering Computation. Eample Solve the following using the Jacobi Iteration method + 8 0 = + + 5 = 5 = 4 Compare with GaussSeidel
ES 40: Scientific and Engineering Computation. Eigenvalues and Eigenvectors Nonhomogeneous system: [A]{} = {b} Homogeneous system: [A]{} = 0 Nontrivial solutions eist but are not unique The solution of A satisfies the eigenvalue equation: λ = eigenvalue of A A=λ [A- λ I] = 0 = eigenvector of A Nontrivial solutions eist iff characteristic polynomial, det(a - λi) = 0 The size of A determines the number of eigenvalues
ES 40: Scientific and Engineering Computation. Polynomial method for eigenvalues Root of the characteristic polynomial = λ Eample: + = 0 + 4 = 0 A = 4 λ 4 λ Characteristic poly = f(λ) = det = λ 5λ 5 roots of f(λ) = -0.854, 5.854 In Matlab: p = ploy(a); e = roots(p)
ES 40: Scientific and Engineering Computation. Power method for eigenvalues and eigenvectors Iterative method Determines the largest eigenvalue most of the time Method Set A = λ Choose initial value for Factor out highest element as λ Continue until desired accuracy Eample: A = 4
ES 40: Scientific and Engineering Computation. Eig(A) [v e] = eig(a) Matlab eigenvalues and eigenvectors How would you find the minimum eigenvalue using the power method?
ES 40: Scientific and Engineering Computation. Lab Problem.,. Use the power method to find the minimum eigenvalue of the matri B = [ ; ];