Numerical Analysis - MTH603 Handouts Lecture 13
Numerical Analysis - MTH603 Handouts Lecture 13
Relaxation Method
This is also an iterative method and is due to Southwell.To explain the details, consider
again the system of equations
a11 x1 + a12 x2 + " + a1n xn = b1
a21 x1 + a22 x2 + " + a2 n xn = b2
# # # #
an1 x1 + an 2 x2 + " + ann xn = bn
Let
X ( p ) = ( x1( p ) , x2( p ) ,..., xn( p ) )T
be the solution vector obtained iteratively after p-th iteration. If Ri( p ) denotes the
residual of the i-th equation of system given above , that is of ai1 x1 + ai 2 x2 + " + ain xn = bi
defined by
Ri( p ) = bi − ai1 x1( p ) − ai 2 x2( p ) − " − ain xn( p )
we can improve the solution vector successively by reducing the largest residual to zero
at that iteration. This is the basic idea of relaxation method.
To achieve the fast convergence of the procedure, we take all terms to one side and then
reorder the equations so that the largest negative coefficients in the equations appear on
the diagonal.
Ri
dxi =
aii
In other words, we change xi . to ( xi + dxi ) to relax Ri that is to reduce Ri to zero.
Example
6 x1 − 3x2 + x3 = 11
2 x1 + x2 − 8 x3 = −15
x1 − 7 x2 + x3 = 10
by the relaxation method, starting with the vector (0, 0, 0).
Solution
At first, we transfer all the terms to the right-hand side and reorder the equations, so that
the largest coefficients in the equations appear on the diagonal.
Thus, we get
0 = 11 − 6 x1 + 3 x2 − x3
0 = 10 − x1 + 7 x2 − x3
0 = −15 − 2 x1 − x2 + 8 x3
Starting with the initial solution vector (0, 0, 0), that is taking x1 = x2 = x3 = 0,
of which the largest residual in magnitude is R3, i.e. the 3rd equation has more error and
needs immediate attention for improvement.
number R1 R2 R3 Ri dxi x1 x2 x3
number R1 R2 R3 Ü Ü x1 x2 x3
number R1 R2 R3 Ü Ü x1 x2 x3
At this stage, we observe that all the residuals R1, R2 and R3 are small enough and
therefore we may take the corresponding values of xi at this iteration as the solution.
Hence, the numerical solution is given by
Example
Solution
x y z r1 r2 r3
1 0 0 -10 1 1 L1
0 1 0 2 -10 1 L2
0 0 1 2 2 -10 L3
x y z r1 r2 r3
0 0 0 6 7 8 L4
0 0 1 8 9 -2 L5=L4+L3
0 1 0 10 -1 -1 L6=L5+L2
1 0 0 0 0 0 L7=L6+L1
Explanation
(1) In L4 ,the largest residual is 8.to reduce it, To reduce it ,we give an increment of
8 8
= = 0.8 ≅ 1
c3 10
the resulting residulas are obtained by
L4 + (1) L3 , i.e line L5
9 9
Increment= = = 0.9 ≅ 1
b2 10
The resulting residuals (= L6 ) = L5 + 1.L2
(3) In line L6 ,the largest residual is 10
10 10
Increment = = ≅1
a1 10
The resulting residuals (= L6 ) = L5 + 1.L2
Exact solution is arrived and it is x=1,y=1,z=1
Example
Solve the system by relaxation method, the equations
9x − y + 2z = 7
x + 10 y − 2 z = 15
2 x − 2 y − 13z = −17
Solution
The residuals r1 , r2 , r3 are given by
9x − y + 2z = 9
x + 10 y − 2 z = 15
2 x − 2 y − 13 z = −17
here
r1 = 9 − 9 x + y − 2 z
r2 = 15 − x − 10 y + 2 z
r3 = −17 − 2 x + 2 y + 13 z
Operation table
x y z r1 r2 r3
1 0 0 -9 -1 -2
0 1 0 1 -10 2
0 0 1 -2 2 13
Relaxation table is
x y z r1 r2 r3
0 0 0 9 15 -17
0 0 1 7 17 -4
0 1 0 8 7 -2
0.89 0 0 -0.01 6.11 -3.78
0 0.61 0 0.6 0.01 -2.56
0 0 0.19 0.22 0.39 -0.09
0 0.039 0 0.259 0 -0.012
Then x=0.89+0.028=0.918;y=1+0.61+0.039=1.694
And z=1+0.19+0.00523=1.19523
Now substituting the values of x,y,z in (1) ,we get
r1=9-9(0.918)+1.649-2(1.19523)=-0.00346
r2=15-0.918-10(1.649)+2(1.19523)=-0.1754
r3=-17-2(0.918) +2(1.649) +13(1.19523) =-0.00001
Which is agreement with the final residuals.