On Some Iterative Methods for Solving Systems of Linear Equations
Total Page:16
File Type:pdf, Size:1020Kb
Computational and Applied Mathematics Journal 2015; 1(2): 21-28 Published online February 20, 2015 (http://www.aascit.org/journal/camj) On Some Iterative Methods for Solving Systems of Linear Equations Fadugba Sunday Emmanuel Department of Mathematical Sciences, Ekiti State University, Ado Ekiti, Nigeria Email address [email protected], [email protected] Citation Fadugba Sunday Emmanuel. On Some Iterative Methods for Solving Systems of Linear Equations. Computational and Applied Mathematics Journal. Vol. 1, No. 2, 2015, pp. 21-28. Keywords Abstract Iterative Method, This paper presents some iterative methods for solving system of linear equations Jacobi Method, namely the Jacobi method and the modified Jacobi method. The Jacobi method is an Modified Jacobi Method algorithm for solving system of linear equations with largest absolute values in each row and column dominated by the diagonal elements. The modified Jacobi method also known as the Gauss Seidel method or the method of successive displacement is useful for the solution of system of linear equations. The comparative results analysis of the Received: January 17, 2015 two methods was considered. We also discussed the rate of convergence of the Jacobi Revised: January 27, 2015 method and the modified Jacobi method. Finally, the results showed that the modified Accepted: January 28, 2015 Jacobi method is more efficient, accurate and converges faster than its counterpart “the Jacobi Method”. 1. Introduction In computational mathematics, an iterative method attempts to solve a system of linear equations by finding successive approximations to the solution starting from an initial guess. This approach is in contrast to direct methods, which attempt to solve the problem by a finite sequence of some operations and in the absence of rounding errors. These direct methods lead to exact solution. Iterative methods are usually the only choice for nonlinear problems involving a large number of variables where there is no closed form solution or where the problems cannot be solved analytically. Probably the first iterative method for solving a linear system appeared in a letter of Gauss to his student. He proposed a method of solving a 4x4 system of equations. The theory of stationary iterative methods was established with the work of D.M. Young starting in the 1950s. The most well-known and accepted method for solving a system of linear equations is the so called “The Cramer’s Rule”. However, there are other direct methods for solving systems of linear equations such as the Gauss Elimination, the Gauss Jordan method, LU Decomposition and Tridiagonal matrix algorithm. But, when solving a system of linear equations with more than four unknown variables (that is, when dealing with a higher order matrix) all these methods become very lengthy and tedious to solve by hand. Therefore there is need for the use of a dedicated coding language like MATLAB. The paper is structured as follows: Section 2 gives a brief overview of iterative methods for solving systems of linear equations. Section 3 presents some numerical experiments, discussion of results and conclusion. Computational and Applied Mathematics Journal 2015; 1(2): 21-28 22 n 2. Iterative Methods for Solving = = ⋯ ∑axbiij j i , 1,2 , n (2.1) Systems of Linear Equations j=1 An iterative method is a mathematical procedure that The following are the assumptions of the Jacobi method: generates a sequence of improving approximate solutions for • The system given by (2.1) has a unique solution a class of problems. A specific implementation of an iterative (consistent and independent) method, including the termination criteria, is an algorithm of • The coefficient matrix A has no zeros on its main the iterative method. diagonal. An iterative method is said to be convergent if the If any of the diagonal entries aaa, , ,..., a is zero, corresponding sequence converges for some given initial 11 22 33 nn approximations. A rigorous convergence analysis of an then rows or columns must be interchanged to obtain a iterative method is usually performed; however, heuristic coefficient matrix that has non zero entries on the main diagonal. In Jacobi method, each equation of the system is based iterative methods are also common. solved for the component of the solution vector associated In this paper we shall consider the system of linear with the diagonal element, that is , x as follows: equations of the form i 1 Ax= b (1.1) x=() bax − −−... ax 1a 1122 1 n n 11 Equation (1.1) can also be written as =1 () − −− x2 bax 2 21 1... ax 2 n n + ++ = a (2.2) axax111 122... ax 1n n b 1 22 + ++ = ⋮ axax211 222... ax 2n n b 2 (1.2) ⋮ ⋮ ⋮ ⋮ =1 () − −− xn bax n n11... ax nn− 11 n − + ++ = a nn axaxn11 n 22 ... ax nn n b n Equation (2.2) can also be written as where a11, a 12, ..., a nn are constant coefficients and 1 n−1 bbb1, 2 , 3 ,..., b n are given real constants in the system of n- = − = ⋯ xi b i∑ axi ij j , 1,2 n linear algebraic equations in n-unknown variables a ii j=1 xxx, , ,..., x . The solution to (1.1) can be classified in 1 2 3 n Setting the initial estimates xxxx=0, = 0 ,..., x = x 0 . the following ways: 1122n− 1 n − 1 Then (2.2) becomes • If a system of linear equations is solved and unique values xxx, , ,..., x are obtained, then the system is 1 1 2 3 n 1=() − 0 −− 0 x1 bax 1 12 2... ax 1 n n said to be consistent and independent. a 11 • If on the other hand when the system has no definite 1=1 − 0 −− 0 solution, it is said to be inconsistent. x2() bax 2 21 1... ax 2 n n a (2.3) • If the system has infinitely many solutions, then it is 22 ⋮ said to be consistent and dependent. In the sequel we shall consider two iterative methods for 1 x1=() bax − 0 −−... ax 0 solving system of linear equations namely; the Jacobi method n n n11 nn− 11 n − a nn and the modified Jacob method. Equation (2.3) is called the first approximation. In the 2.1. The Jacobi Iterative Method same way, the second approximation is obtained by In numerical linear algebra, the Jacobi method is an substituting the first approximation ( x-values) into the right algorithm for determining the solutions of system of linear hand side of (2.3), and then we have equations with largest absolute values in each row and 1 column dominated by the diagonal element. Each diagonal x2=() bax − 1 −−... ax 1 1a 1 12 2 1 n n element is solved for, and approximate values are substituted, 11 the process is then iterated until it converges. This algorithm 2=1 − 1 −− 1 is a stripped-down version of the Jacobi transformation x2() bax 2 21 1... ax 2 n n a (2.4) method of matrix diagonalization. This method is named 22 ⋮ after Carl Gustav Jakob Jacobi (1804-1851). Let us consider the general system of linear equations given by (1.1) which 1 2=() − 1 −− 1 can be written in the form: xn bax nn11... ax nnn− 11 − a nn 23 Fadugba Sunday Emmanuel: On Some Iterative Methods for Solving Systems of Linear Equations (1) (1) By repeated iterations, a sequence of approximations that When solving for x2 , insert the just computed value for x 1 . often converges to the actual solution is formed. In other words, for each calculation, the most current In general, the Jacobi iterative method is given by estimate of the parameter value is used. The Gauss-Seidel method (Modified Jacobi Method) converges about twice as n−1 fast as Jacobi, but may still be very slow. k=1 − k −1 = ⋯ xi baxi i∑ ijj , 1,2, n In the Jacobi method, all values of x(k) are based on x(k-1). a ii j=1 (2.5) The modified Jacobi method is similar to the Jacobi method, = k 1,2,3,... except that the most recently computed values of all x 1 are used in all computations. Like the Jacobi method, the The summation is taken over all j’s except j=i . The initial (0) modified Jacobi method requires diagonal dominance to estimate or vector x can be chosen to be zero unless we ensure convergence. Thus, in the modified Jacobi method, have a better a-priori estimate for the true solution. This each equation of the system is solved for the component of procedure is repeated until some convergence criterion is the solution vector associated with the diagonal element, that satisfied. The Jacobi method is sometimes called the method is , x i as follows: of simultaneous iteration because all the values of xi are (k ) iterated simultaneously. That is, all values of xi depend 1 (k-1) x=() bax − −−... ax only on the values of xi . 1a 1122 1 n n Remark 1: The Jacobi iterative method in (2.6) can also be 11 =1 () − −− written as x2 bax 2 21 1... ax 2 n n a 22 (2.8) n−1 ⋮ k+1 =1 − k = ⋯ xi baxi i∑ ij j , 1,2, , n 1 a = (2.6) =() − −− ii j 1 xn bax n n11... ax nn− 11 n − a nn k = 0,1,2, ⋯ Equation (2.2) can also be written as The following result summarizes the convergence property of the Jacobi method. n−1 =1 − = ⋯ xi b i∑ axi ijj , 1,2 n Theorem 1 a ii j=1 Suppose that A is diagonal dominant, i.e. 0 0 0 Setting the initial estimates xxxx=, = ,..., x− = x − > ∀ 1122n 1 n 1 aii∑ a ij , i (2.7) be the initial values.