9.6 KB · commit a9602da
We have so far discussed some direct methods for the solution of simultaneous linear equations and we have seen that these methods yield the solution after an amount of computation that is known in advance. We shall now describe the iterative or indirect methods, which start from an approximation to the true solution and, if convergent, derive a sequence of closer approximations—the cycle of computations being repeated till the required accuracy is obtained. This means that in a direct method the amount of computation is fixed, while in an iterative method the amount of computation depends on the accuracy required.
In general, one should prefer a direct method for the solution of a linear system, but in the case of matrices with a large number of zero elements, it will be advantageous to use iterative methods which preserve these elements.
Let the system be given by
a11x1+a12x2+a13x3+⋯+a1nxna21x1+a22x2+a23x3+⋯+a2nxna31x1+a32x2+a33x3+⋯+a3nxnan1x1+an2x2+an3x3+⋯+annxn=b1=b2=b3⋮=bn⎭⎬⎫(7.59)in which the diagonal elements aii do not vanish. If this is not the case, then the equations should be rearranged so that this condition is satisfied. Now, we rewrite the system (7.59) as
x1x2x3xn=a11b1−a11a12x2−a11a13x3−⋯−a11a1nxn=a22b2−a22a21x1−a22a23x2−⋯−a22a2nxn=a33b3−a33a31x1−a33a32x2−⋯−a33a3nxn⋮=annbn−annan1x1−annan2x2−⋯−annan,n−1xn−1.⎭⎬⎫(7.60)Suppose x1(1),x2(1),…,xn(1) are any first approximations to the unknowns x1,x2,…,xn. Substituting in the right side of Eq. (7.60), we find a system of second approximations
x1(2)x2(2)x3(2)xn(2)=a11b1−a11a12x2(1)−⋯−a11a1nxn(1),=a22b2−a22a21x1(1)−⋯−a22a2nxn(1),=a33b3−a33a31x1(1)−⋯−a33a3nxn(1),⋮=annbn−annan1x1(1)−⋯−annan,n−1xn−1(1).⎭⎬⎫(7.61)Similarly, if x1(n),x2(n),…,xn(n) are a system of nth approximations, then the next approximation is given by the formula
x1(n+1)x2(n+1)xn(n+1)=a11b1−a11a12x2(n)−⋯−a11a1nxn(n),=a22b2−a22a21x1(n)−⋯−a22a2nxn(n),⋮=annbn−annan1x1(n)−⋯−annan,n−1xn−1(n).⎭⎬⎫(7.62)If we write Eq. (7.60) in the matrix form X=BX+C(7.63) then the iteration formula (7.62) may be written as X(n+1)=BX(n)+C.(7.64)
This method is due to Jacobi and is called the method of simultaneous displacements. It can be shown that a sufficient condition for the convergence of this method is that ∥B∥<1.(7.65)
A simple modification in this method sometimes yields faster convergence and is described below:
In the first equation of Eq. (7.60), we substitute the first approximation (x1(1),x2(1),x3(1),…,xn(1)) into the right-hand side and denote the result as x1(2). In the second equation, we substitute (x1(2),x2(1),x3(1),…,xn(1)) and denote
the result as x2(2). In the third, we substitute (x1(2),x2(2),x3(1),…,xn(1)) and call the result as x3(2). In this manner, we complete the first stage of iteration and the entire process is repeated till the values of x1,x2,…,xn are obtained to the accuracy required. It is clear, therefore, that this method uses an improved component as soon as it is available and it is called the method of successive displacements, or the Gauss–Seidel method.
The Jacobi and Gauss–Seidel methods converge, for any choice of the first approximation xj(1) (j=1,2,…,n), if every equation of the system (7.60) satisfies the condition that the sum of the absolute values of the coefficients aij/aii is almost equal to, or in at least one equation less than unity, i.e. provided that j=1,j=i∑naiiaij≤1,(i=1,2,…,n),(7.66) where the '<' sign should be valid in the case of 'at least' one equation. It can be shown that the Gauss–Seidel method converges twice as fast as the Jacobi method. The working of the methods is illustrated in the following examples:
Table 7.2 Jacobi's Method
n x1 x2 x3 x4 1 0.3 1.5 2.7 -0.9 2 0.78 1.74 2.7 -0.18 3 0.9 1.908 2.916 -0.108 4 0.9624 1.9608 2.9592 -0.036 5 0.9845 1.9848 2.9851 -0.0158 6 0.9939 1.9938 2.9938 -0.006 7 0.9975 1.9975 2.9976 -0.0025 8 0.9990 1.9990 2.9990 -0.0010 9 0.9996 1.9996 2.9996 -0.0004 10 0.9998 1.9998 2.9998 -0.0002 11 0.9999 1.9999 2.9999 -0.0001 12 1.0 2.0 3.0 0.0 From Tables 7.1 and 7.2, it is clear that twelve iterations are required by Jacobi's method to achieve the same accuracy as seven Gauss–Seidel iterations. ◀
X(1)=3.33331.51.4+0−0.25−0.2−0.166700.2−0.16670.2503.33331.51.4=2.84991.01671.0333
X(2)=3.33331.51.4+0−0.25−0.2−0.166700.2−0.16670.2502.84991.01671.0333=2.96471.04581.0656
Proceeding in this way, we obtain X(8)=2.99911.00121.0010andX(9)=2.99951.00051.0004.
We, therefore, conclude that X=311i.e., x=3,y=1 and z=1.
(b) Gauss–Seidel method As before, we obtain the first approximation as X(1)=2.84991.01671.0333
Then
x(2)y(2)z(2)=3.3333−0.1667×1.0167−0.1667×1.0333=2.9916=1.5−0.25×2.9916+0.25×1.0333=1.0104=1.4−0.2×2.9916+0.2×1.0104=1.0038Similarly, we find
x(3)x(4)x(5)=2.9975,=2.9995,=2.9998,y(3)y(4)y(5)=1.0016,=1.0003,=1.0001,z(3)z(4)z(5)=1.0008,=1.0002,=1.0001.At this stage, we can conclude that x=3,y=1,z=1. ◀