0% found this document useful (0 votes)
4 views

ilovepdf_merged (4)

The document covers numerical analysis, focusing on iterative methods for solving equations, including concepts like rate of convergence and fixed point theorem. It explains linear iteration methods and Aitken's Δ² method to improve convergence rates. An example illustrates the application of these methods to find the root of a specific equation.

Uploaded by

acpatil88033
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

ilovepdf_merged (4)

The document covers numerical analysis, focusing on iterative methods for solving equations, including concepts like rate of convergence and fixed point theorem. It explains linear iteration methods and Aitken's Δ² method to improve convergence rates. An example illustrates the application of these methods to find the root of a specific equation.

Uploaded by

acpatil88033
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 113

Numerical analysis

Unit – 1

Numerical Analysis: Numerical analysis is the area of mathematics and computer science that
creates, analyzes, and implements algorithms for solving numerically the problems of continuous
mathematics.

Iterative method:

In computational mathematics, an iterative method is a mathematical procedure that uses an initial


value to generate a sequence of improving approximate solutions for a class of problems, in which
the nth approximation is derived from the previous ones.

Rate of convergence:

An iterative method is said to be of order p or has the rate of convergence p, If p is the largest
positive real number for which there exists a finite constant c (c ≠ 0), such that

 k 1
p
c (1)
k

Where  k  xk   is the error in kth iterate. The constant c is called the asymptotic error and usually
depends on the derivative of f(x) at x   .

The equation (1) tells us the rate of which the iteration method converges if the initial
approximation to the root is sufficiently close to the desired root.

Linear iteration method:

To find the roots of the equation f ( x)  0 (1) by successive approximation we get equation
(1) as x  (x) (2) the roots of equation (1) are the same as points of intersection of the straight
line y  x and the curve representing y  (x) .

Above figures illustrate the working of the iteration method which provides spiral (or) staircase.
Let x  x0 be an initial approximation to the desired root x   , then 1st approximation is x1   ( x0 )
, 2nd approximation is x2   ( x1 ) proceeding in this way, the (n+1)th approximation is xn 1   ( xn )
n  0,1,2,3,........

1
Fixed Point Theorem:

Let x   be the root of the equation f ( x)  0 and I be the interval containing the point x   .
Let (x) and  ( x) be continuous functions in I, where (x) is defined as x  (x) , which is
equivalent to f ( x)  0 and if  ( x )  k  1,  x  I , then the sequence of approximations
x0 , x1 , x2 ,.....xn defined by  ( xn ) converges to the root x   provided that the initial
approximation x0 is chosen in I.

Let x   be an exact root of f(x) = 0 (1)

Now equation (1) can be expressed as x  (x) (2)

where (x) is continuous and differentiable function in I.

Since x   is a root of the equation (1)

 x   is also a root of the equation (2)

  () (3)

If x0 is the initial approximation by iteration method we get the first approximation

x1    x 0  (4)

(3) – (4)    x1   ( )   ( x0 ) (5)

By Lagrange’s mean value theorem, we have

 ( )   ( x0 )
 (0 )  where  0   x0 ,  
  x0

Equation (5) becomes

  x1    x0   ( 0 ) ,  0   x0 ,  

Similarly,

  x 2    x1   (1 ) , 1   x1 ,  

  x3     x2   ( 2 ) ,  2   x2 ,  

……………………………………………..

2
………………………………………………

  x n     x n 1    (  n  1 ) ,  n 1   x n 1 ,  

  x n  1     x n    ( n ) ,  n   xn ,   (6)

Combining all the above equations, we get

  x n 1    x0   ( 0 ) (1 )........ ( n )

  xn1    x0   (0 ) (1 )........(n )

  xn1    x0  (0 ) (1 ) ................. (n )

Since  ( n )  k  1,  n  N

  xn1    x0  k.k.k.......k (n 1) times

  xn1    x0  k n1

Since k  1 then RHS of above equation tends to ‘0’ as n become large.

Hence, sequence of approximation  x n    (k converges)

Rate of convergence of iteration method:

Let n 1 & n be the errors of the approximations of xn1 & xn respectively, then n 1    xn 1 ,
n    xn .

Using (6) we write

  xn1    xn .   n 

n 1 n .k

n1
  k 1
n

By definition of rate of convergence p = 1. This shows that rate of convergence of iteration method
is linear.

3
The linear convergence of an iteration method can be improved with the help of Aitken’s 
2

method.

Aitken’s  method:
2

Let xn , xn 1 , xn  2 be three successive approximations to the desired root of the equation x  (x)

We know that

  x n  1     x n    ( n )

  x n  2     x n  1    ( n  1 )

We assume that error in each iteration is equal to the constant time in the previous error, so we
write

  x n 1   k   x n 

  x n  2   k    x n 1 

We write

  x n 1  k    x n 

  x n  2  k   x n 1 

Eliminating k we get

  xn1     xn 
  xn  2    xn1 
  xn 1   xn 1     x n  2   xn 

 2  xn21  2 xn 1   2   xn  2   xn  xn xn  2

 2  xn21  2 xn1   2   xn2   xn  xn xn2

xn xn  2  xn21   xn  2  2 xn 1   xn

x n x n  2  x n21    x n  2  2 x n 1  x n 

4
xn xn  2  xn21

xn  2  2 xn 1  xn

Add and subtract xn2  2 x n x n 1

xn xn  2  xn21  xn2  2 xn xn 1  xn2  2 xn xn 1



xn  2  2 xn 1  xn



xn  xn2  2 xn1  xn   xn21  2 xn xn1  xn2 
xn2  2 xn1  xn

xn  xn2  2xn1  xn    xn1  xn 


2


xn2  2xn1  xn

 xn1  xn 
2

  xn 
xn2  2xn1  xn

We know that

xn  xn 1  xn

 2 x n    x n 1  x n 

 2 xn  xn 1   xn

 2 x n   x n  2  x n 1    x n 1  x n 

 2 x n  x n  2  2 x n 1  x n

 xn 
2

Therefore x    xn  , n  1,2,3,4......
*
n
2 xn

5
Example: Perform two iterations of the linear iteration method followed by one Aitken’s 
2

method to find the root of the equation, repeat the process two times in each case,
f ( x)  x3  5 x  1, x0  0.5 .

Solution: Let f ( x)  x3  5 x  1, x0  0.5

f (0)  1  0, f (1)  3  0

Therefore root lies between (0, 1).

x3  1
We write f ( x)  x  5 x  1 as x 
3
  ( x)
5

3x 2
 ( x) 
5

3x 2 3(0.5) 2
 ( x )    0.15  1
5 5

By linear iteration method, we have

xn 1   ( xn )

xn3 1
xn1  , n  0,1,2,3.........
5

Given x0  0.5

x03  1 (0.5)3  1
x1    0.225
5 5

x13  1 (0.225)3  1
x2    0.20228
5 5

Aitken’s  method
2

 xn   xn1  xn 
2 2

x  xn
*
n   xn  , n  0,1, 2,3,4.......
2 xn xn2  2xn1  xn

6
 x1  x0   0.225  0.5
2 2

For n = 0, x  x0   0.5 
*
0
x2  2x1  x0 0.20228  2(0.225)  0.5

x0*  0.2002

Using linear iteration method,

x1*   ( x0* )

x0*3  1 (0.2002)3  1
x1*    0.2016
5 5

x1*3 1 (0.2016)3 1
x2*    0.20164
5 5

Aitken’s  method
2

x 
2
*
n 1  xn*
xn**  xn* 
xn* 2  2 xn*1  xn*

x 
2
 x0*  0.2016  0.2002 
* 2
1
For n = 0, x  x  **
0
*
0  0.2002 
x2*  2 x1*  x0* 0.20164  2(0.2016)  0.2002

x0**  0.20164

Therefore the approximate real root is 0 .2 0 1 6 4  0 .2 0 1 6 .

Example: Perform two iteration of the linear iterations method followed by one Aitken’s 
2

method to find the root of the equation, repeat the process two times in each case, f ( x )  x  e x

Solution: Let f ( x )  x  e x

f (0)  1  0, f (1)  0.6321  0

Therefore root lies between (0, 1).

We write f ( x )  x  e x as x  e  x   ( x )

Since the root lies between (0, 1), choose x0  1

 ( x)  e  x

7
( x)  e1  0.3678  1

By linear iteration method, we have

xn 1   ( xn )

x n 1  e  xn , n  0,1, 2, 3.........

Given x0  1

x1  e  x0  e 1  0.3678

x2  e  x1  e 0.3678  0.6922

Aitken’s  method
2

 xn   xn1  xn 
2 2

x  xn
*
n   xn  , n  0,1, 2,3,4.......
2 xn xn2  2xn1  xn

 x1  x0   0.3678 1
2 2

For n = 0, x  x0   1  0.5821
*
0
x2  2 x1  x0 0.6922  2(0.3678)  1

x0*  0.5821

Using linear iteration method,

x1*   ( x0* )

*
x1*  e x0  e0.5821  0.5587
*
x2*  e x1  e0.5587  0.5719

Aitken’s  method
2

x 
2
*
n 1  xn*
xn**  xn* 
xn* 2  2 xn*1  xn*

x 
2
 x0*  0.5587  0.5821
* 2
1
For n = 0, x  x  **
0
*
0  0.5821   0.5970
x2*  2 x1*  x0* 0.5719  2(0.5587)  0.5821

8
x0**  0.5970

Therefore the approximate real root is 0.5970 .

Example: Perform two iterations of the linear iteration method followed by one Aitken’s 
2

method to find the root of the equation, repeat the process two times in each case, 2 x  log10 x  7

Solution: Let f ( x)  2 x  log10 x  7

f (3)  1.4  0, f (4)  0.39  0

Therefore root lies between (3, 4).

Choose x0  4

1 7
We write f ( x)  2 x  log10 x  7 as x  log10 x    ( x )
2 2

1 loge x 7
 ( x)  
2 loge 10 2

1
 ( x) 
2 x log e 10

1 1 1
 ( x )     0.05428  1
2 x log e 10 2 x0 log e 10 2(4) log e 10

By linear iteration method, we have

xn 1   ( xn )

1 7
xn 1  log10 xn  , n  0,1, 2, 3.........
2 2

1 7 1 7
x1  log10 x0   log10 (4)   3.8010
2 2 2 2

1 7 1 7
x2  log10 x1   log10 (3.8010)   3.7899
2 2 2 2

Aitken’s  method
2

9
 xn   xn1  xn 
2 2

x  xn
*
n   xn  , n  0,1, 2,3,4.......
2 xn xn2  2xn1  xn

 x1  x0   3.8010  4
2 2

For n = 0, x  x0   4  3.7892
*
0
x2  2x1  x0 3.7899  2(3.8010)  4

x0*  3.7892

Using linear iteration method,

x1*   ( x0* )

1 7 1 7
x1*  log10 x0*   log10 (3.7892)   3.7892
2 2 2 2

1 7 1 7
x2*  log10 x1*   log10 (3.7892)   3.7892
2 2 2 2

Here x1* , x 2* are identical

Hence the approximate real root is 3.7892 .

Example: Find the smallest root of the equation by linear iteration method
2 3 4
x x x
1 x      0.
 2!  3!  4!
2 2 2

Solution: writing the given equation as

x2 x3 x4
x  1   
 2!  3!  4!
2 2 2

6
Neglecting x and higher powers of x, we get

x2 x3 x4 x5
x  1      ( x)
 2!  3!  4!  5!
2 2 2 2

Taking x0  1

By linear iteration method, we have

xn 1   ( xn )

10
xn2 x n3 x n4 xn5
x n 1  1     , n  0,1, 2, 3.........
 2!  3!  4!  5!
2 2 2 2

x02 x03 x04 x05 1 1 1 1


x1  1      1     1.2238  1.2239
 2!  3!  4!  5!  2!  3!  4!  5!
2 2 2 2 2 2 2 2

x12 x13 x14 x15


x2  1    
 2!  3!  4!  5!
2 2 2 2

1.2239  1.2239  1.2239  1.2239 


2 3 4 5

 1     1.3273
 2!  3!  4!  5!
2 2 2 2

x 22 x 23 x 24 x 25
x3  1    
 2!  3!  4!  5!
2 2 2 2

1.3273 1.3273 1.3273 1.3273


2 3 4 5

 1     1.3807
 2!  3!  4!  5!
2 2 2 2

x32 x33 x34 x35


x4  1    
 2!  3!  4!  5!
2 2 2 2

1.3807  1.3807  1.3807  1.3807 


2 3 4 5

 1     1.408
 2!  3!  4!  5!
2 2 2 2

x 42 x43 x 44 x 45
x5  1    
 2!  3!  4!  5!
2 2 2 2

1.408 1.408  1.408  1.408 


2 3 4 5

 1     1.424
 2!  3!  4!  5!
2 2 2 2

x52 x53 x54 x55


x6  1    
 2!  3!  4!  5!
2 2 2 2

1.424  1.424  1.424  1.424 


2 3 4 5

 1     1.433
 2!  3!  4!  5!
2 2 2 2

x62 x63 x64 x65


x7  1    
 2!  3!  4!  5!
2 2 2 2

11
1.433 1.433 1.433 1.433 
2 3 4 5

 1     1.438  1.44
 2!  3!  4!  5!
2 2 2 2

x72 x73 x74 x75


x8  1    
 2!  3!  4!  5!
2 2 2 2

1.438 1.438  1.438  1.438 


2 3 4 5

 1     1.44
 2!  3!  4!  5!
2 2 2 2

 x7  x8  1.44

The approximate root is 1.44.

Examples:

1. Perform two iterations of the linear iteration method followed by one Aitken’s  method to
2

find the root of the equation, repeat the process two times in each case, f ( x)  x 3  3 x  1 .

12
Newton Raphson method [ N-R method]

Let x0 be an approximate value of the root of the equation f ( x)  0 where f ( x) is algebraic and
transcendent. Let h be a number sufficiently small, if x1  x0  h be the exact root of the equation
f ( x)  0 then f ( x1 )  0 or f ( x0  h)  0 .

Expanding f ( x0  h) using Taylor’s series, we get

h2 h3
f ( x0  h)  f ( x0 )  hf ( x0 )  f ( x0 )  f ( x0 )        0
2! 3!

Since h is very small, so neglecting the terms containing h 2 , h3 ,.......

f ( x0 )  hf ( x0 )  0

f ( x0 )
h , f ( x0 )  0
f ( x0 )

Thus, the first approximation to the root is given by

f ( x0 )
x1  x0  , f ( x0 )  0
f ( x0 )

f ( x1 )
x2  x1  , f ( x1 )  0
f ( x1 )

……………………………

……………………………

f ( xn )
xn1  xn  , f ( xn )  0, n  1,2,3, 4.........
f ( xn )

This is known as Newton Rapson iteration formula.

Geometrical interpretation of N-R method:

Let x0 be an approximation very near to the exact root x   of the equation f ( x)  0 .

Let  x0 , f ( x0 ) be the point on y  f ( x) then the equation of the tangent at the point  x0 , f ( x0 ) is
given by

13
y  f ( x0 )  f ( x0 )  x  x0  this line cuts the X – axis at x  x1

f ( x0 ) f ( x0 )
So that    x1  x0   x1  x0 
f ( x0 ) f ( x0 )

The point  x1 , f ( x1 ) be the point on y  f ( x) corresponding to x  x1 , then the equation of the


tangent at the point  x1 , f ( x1 ) cuts the X – axis at x  x2 , which is the second approximation to
the root x  

f ( x1 )
x2  x1 
f ( x1 )

Repeating this process we approach the root x   very rapidly.

Rate of convergence of N-R method:

Let xn be the nth approximation to the root  if f ( x)  0 and n be its error then

xn    n 
 (1)
xn 1    n 1 

By N-R method we have

f ( xn )
xn1  xn  , f ( xn )  0 (2)
f ( xn )

Substituting (1) in (2)

f (  n )
  n1    n 
f (  n )

f ( n )
n1 n 
f ( n )

Using Taylor’s theorem

2n 3
f ( ) n f ( )  f ( )  n f ( )     
n 1 n  2! 3!
2n
f ( ) n f ( )  f ( )     
2!

14
Since x   be the root of the equation f ( x)  0 , so we have f ( )  0

2n 3
n f ( )  f ( )  n f ( )     
n 1 n  2! 3!
2n
f ( ) n f ( )  f ( )     
2!

 3n   2 3 
 n f ( )  n f ( )  f ( )         n f ( )  n f ( )  n f ( )     
2

2! 2! 3!
n 1     
n2
f ( )  n f ( )  f ( )     
2!

 2 2n   3n 3n 



 n   f ( )     f ( )     
 2!   2! 3! 
n 1 
 f ( ) 2n f ( ) 
f ( ) 1 n      
 f ( ) 2! f ( ) 

Ignoring the terms containing 3n and higher powers of n , we get

 2 2n 
n   f ( )
 2! 
n 1 
 f ( ) 2n f ( ) 
f ( ) 1 n      
 f ( ) 2! f ( ) 
1
2 f ( )   f ( ) 2n f ( )  
n 1  n 1   n       
2 f ( )   f ( ) 2! f ( )  

1  x 
1
Using Binomial theorem, we get  1  x  x2      

2n f ( )   
2
f ( ) 2n f ( )   f ( ) 2n f ( ) 
n 1  1 
  n        
  n             
2 f ( )   f ( ) 2! f ( )   f ( ) 2! f ( )  

Ignoring the terms containing 3n , 4n ,……, we get

2n f ( )
n 1 
2 f ( )

n 1 1 f ( )

2n 2 f ( )

15
n1
 2
c
n

1 f ( )
Where c  is the asymptotic error constant, here p = 2, this shows that the subsequent
2 f ( )
error is proportional to the square of previous error. Hence N-R method has quadratic i.e., second
order rate of convergence.

Example: Using N-R method find the root that lies near x = 4.5 of the equation tan x  x correct
to 4 decimal places.

Solution: For the N-R method we have

f ( xn )
xn1  xn  , n  1,2,3, 4.........
f ( xn )

Given x0 = 4.5,

f (x)  tan x  x

f ( x )  Sec 2 x  1  tan 2 x

tan xn  xn
xn1  xn  , n  1,2,3,......
tan 2 xn

tan x0  x0 tan  4.5    4.5 


x1  x0   4.5   4.4936
2
tan x0 tan 2  4.5 

tan x1  x1 tan  4.4936    4.4936 


x2  x1   4.4936   4.4934
2
tan x1 tan 2  4.4936 

tan x2  x2 tan  4.4934    4.4934 


x3  x2   4.4934   4.4934
2
tan x2 tan 2  4.4934 

Here x2  x3  4.4934 , hence the real root of the given equation tan x  x is 4.4934.

16
Example: Find the value of (17)1/3 near x0  2 . Carryout 4 iterations.

Solution: Let x  (17)1/3

 x3  17

 x3 17  0

Hence f ( x)  x 3  17 f ( x )  3 x 2

For the N-R method we have

f ( xn )
xn1  xn  , n  1,2,3, 4.........
f ( xn )

Given x0 = 2,

xn3  17
xn 1  xn  , n  1, 2, 3,......
3 xn2

3 xn3  xn3  17 2 xn3  17


xn 1  
3 xn2 3 xn2

2 xn3  17
xn1 
3xn2

2 x 3  17 2  2   17
3

x1  0 2   2.75
3  2
2
3 x0

2 x 3  17 2  2.75   17
3

x2  1 2   2.5826
3  2.75 
2
3 x1

2 x 3  17 2  2.5826   17
3

x3  2 2   2.5713
3  2.5826 
2
3 x2

2 x 3  17 2  2.5713  17
3

x4  3 2   2.5712
3  2.5713 
2
3 x3

17
2 x43  17 2  2.5712   17
3

x5    2.5712
3  2.5712 
2
3 x42

Here x4  x5  2.5712 , hence the approximate value of (17)1/3 is 2.5712.

1
Example: Find the value of correct up to four decimals.
31

1
Solution: Let x 
31

1
  31
x

1
  31  0
x

1 1
Hence f ( x )   31 f ( x )  
x x2

To find interval of root

f (0.03)  2.3333  0& f (0.04)  6  0

1
Hence one of the root of the equation f ( x )   31 lies between (0.03, 0.04)
x

Choose x0  0.03

For the N-R method we have

f ( xn )
xn1  xn  , n  1,2,3, 4.........
f ( xn )

1
 31
xn
xn 1  xn 
1
 2
xn

xn 1  xn  xn  31xn2

x n 1  2 xn  31x n2

18
x1  2x0  31x02  2(0.03)  31 0.03  0.0321
2

x2  2 x1  31x12  2(0.0321)  31 0.0321  0.0322


2

x3  2x2  31x22  2(0.03225)  31 0.03225  0.03225


2

x4  2x3  31x32  2(0.03225)  31 0.03225  0.03225


2

1
Here x3  x4  0.03225 , hence the approximate value of is 0.03225.
31

Example: Find the value of 5 using N-R method.

Solution: Let x  5

 x2  5

 x2  5  0

Hence f ( x)  x 2  5 f ( x)  2x

f (2)  2, f (3)  4

Hence one of the root of the equation f ( x)  x 2  5 lies between (2, 3)

Choose x0  2

For the N-R method we have

f ( xn )
xn1  xn  , n  1,2,3, 4.........
f ( xn )

xn2  5
xn 1  xn 
2 xn

2 xn2  xn2  5
xn 1 
2 xn

xn2  5
xn 1  , n  1, 2,3,......
2 xn

19
x02  5  2   5
2

x1    2.25
2 x0 2  2

x 2  5  2.25  5
2

x2  1   2.2361
2 x1 2  2.25

x22  5  2.2361  5
2

x3    2.2360
2 x2 2  2.2361

x 2  5  2.2360  5
2

x4  3   2.2360
2 x3 2  2.2360

Here x3  x4  2.236 , hence the approximate value of 5 is 2.236.

1
Example: Find the value of using N-R method.
14

1
Solution: Let x 
14

1
 x2 
14

14x2 1  0

Hence f ( x )  14 x 2  1 f ( x)  28x

f (0)  1, f (1)  13

Hence one of the root of the equation f ( x )  14 x 2  1 lies between (0, 1)

Choose x0  0.5

For the N-R method we have

f ( xn )
xn1  xn  , n  1,2,3, 4.........
f ( xn )

14 xn2  1
xn 1  xn 
28 xn

20
28 xn2  14 xn2  1
xn 1 
28 xn

14 xn2  1
xn 1  , n  1, 2,3,......
28 xn

14 x02  1 14  0.5  1
2

x1    0.3214
28x0 28  0.5

14 x12  1 14  0.3214   1
2

x2    0.2718
28x1 28  0.3214 

14 x22  1 14  0.2718  1
2

x3    0.2672
28x2 28  0.2718

14 x32  1 14  0.2672   1
2

x4    0.2672
28x3 28  0.2672

1
Here x3  x4  0.2672 , hence the approximate value of is 0.2672.
14
3
Example: Find the value of 24 using N-R method.

Solution: Let x  3 24

 x3  24

 x3  24  0

Hence f ( x)  x3  24 f ( x )  3 x 2

f (2)  16  0, f (3)  3  0

Hence one of the root of the equation f ( x)  x3  24 lies between (2, 3)

Choose x0  3

For the N-R method we have

21
f ( xn )
xn1  xn  , n  1,2,3, 4.........
f ( xn )

xn3  24
xn 1  xn 
3 xn2

3 xn3  xn2  24
xn 1 
3 xn2

2 xn3  24
xn 1  , n  1, 2,3,......
3xn2

2 x03  24 2  3  24
3

x1    2.8888
3  3
2
3x02

2 x3  24 2  2.8888   24
3

x2  1 2   2.8845
3  2.8888 
2
3 x1

2 x23  24 2  2.8845   24
3

x3    2.8844
3  2.8845 
2
3 x22

2 x 3  24 2  2.8844   24
3

x4  3 2   2.8844
3  2.8844 
2
3 x3

Here x3  x4  2.8844 , hence the approximate value of 3


24 is 2.8844.

Example: Find the value of  30


1/5
using N-R method.

Solution: Let x   30


1/5

1
x
 30 
1/5

1
 x5 
30

 30x5 1  0

22
Hence f ( x )  30 x 5  1 f ( x)  150 x4

f (0)  1, f (1)  29

Hence one of the root of the equation f ( x )  30 x 5  1 lies between (0, 1)

Choose x0  0.5

For the N-R method we have

f ( xn )
xn1  xn  , n  1,2,3, 4.........
f ( xn )

30 xn5  1
xn 1  xn 
150 xn4

150 xn5  30 xn5  1


xn 1 
150 xn4

120 xn5  1
xn 1  , n  1, 2, 3,......
28 xn4

120 x05  1 120  0.5   1


5

x1    0.5066
150  0.5 
4
150 x04

120 x15  1 120  0.5066   1


5

x2    0.5064
150  0.5066 
4
150 x14

120 x25  1 120  0.5064   1


5

x3    0.5064
150  0.5064 
4
150 x24

Here x2  x3  0.5064 , hence the approximate value of  30


1/5
is 0.5064.

Example: Find the real root of the equation x  5x  1  0 using N-R method.
3

Solution:

Here f ( x)  x3  5x  1 f ( x)  3x 2  5

f (2)  1, f (3)  13

23
Hence one of the root of the equation f ( x)  x3  5x  1 lies between (2, 3)

Choose x0  2

For the N-R method we have

f ( xn )
xn1  xn  , n  1,2,3, 4.........
f ( xn )

xn3  5 xn  1
xn 1  xn 
3 xn2  5

xn  3xn2  5   xn3  5xn  1


xn1 
3xn2  5

2 xn3  1
xn 1  , n  1, 2,3,......
3 xn2  5

2 x03  1 2  2   1
3

x1  2   2.1428
3 x0  5 3  2 2  5

2 x 3  1 2  2.1428   1
3

x2  12   2.1285
3 x1  5 3  2.1428 2  5

2 x23  1 2  2.1285   1
3

x3  2   2.1284
3 x2  5 3  2.1285 2  5

2 x 3  1 2  2.1284   1
3

x4  23   2.1284
3 x4  5 3  2.1284 2  5

Here x3  x4  2.1284 , hence the approximate root of x  5x  1  0 is 2.1284.


3

24
Modified generalized N-R method for multiple roots:

The root x  of f ( x)  0 is said to be of order (multiplicity) m if


f ( )  0, f ( )  0, f ( )  0,......... f ( m 1) ( )  0 but f ( m ) ( )  0 .

For Example:

f ( x)   x 1 ,
3
x   1 is a root of f ( x)

f (1)   1 1  0
3

f ( x)  3  x  1
2

f (1)  3 1  1  0
2

f ( x )  6  x  1

f (  1)  6   1  1  0

f (x)  6

f (1)  6  0

Therefore x   1 is a root with multiplicity m = 3. If the multiplicity of root is known, then we


modify the N-R method by introducing some parameter on multiplicity of root to the order of
convergence.

Modified Newton-Rapson Method:

Let the modified form of N-R method be

f ( xn )
xn1  xn   (1)
f ( xn )

Let x   be a multiple root of order m,


f ( )  0, f ( )  0, f ( )  0,...... f ( m 1) ( )  0, f ( m ) ( )  0 (2)

If n be the error of xn , then

xn    n , xn 1    n 1

25
Expanding f ( xn ) and f ( xn1 ) by using Taylor’s series, we get

2n 3n
f ( xn )  f (  n )  f ( ) n f ( )  
f ( )  f ( )     
2! 3!
m1 m m1
 n f ( m 1) ( )  n f ( m ) ( )  n f ( m 1) ( )      
(m  1)! (m)! (m  1)!

2n 3n (4)


f ( xn )  f (  n )  f ( ) n f ( )  
f ( )  f ( )     
2! 3!
mn 1 m m1
 f ( m ) ( )  n f ( m1) ( )  n f ( m 2) ( )      
(m  1)! (m)! (m  1)!

Using equation (2) we get

mn ( m) m1
f ( xn )  f ( )  n f ( m1) ( )      
(m)! (m  1)!

mn 1 m m1
f ( xn )  f (  n )  f ( m) ( )  n f ( m1) ( )  n f ( m2) ( )      
(m  1)! (m)! (m  1)!

Substituting above values in (1), we get

 mn ( m ) mn 1 
 f ( )  f ( m1) ( )       
(m)! (m  1)!
  n1    n     m1 
 n nm ( m1) mn 1
f ( ) 
( m)
f ( )  f ( m  2)
( )     
 (m  1)! (m)! (m  1)! 

mn  ( m ) n 
 f ( )  f ( m1) ( )       
(m)!  (m  1) 
n1 n  m1
n  ( m) n ( m1) n 2

 f ( )  f ( )  f ( m 2) ( )     
(m  1)!  m m  m  1 

n  ( m ) n 
 f ( )  f ( m1) ( )       
m (m  1) 
n 1 n 
 (m) n ( m1) n 2

 f ( )  f ( )  f ( m 2) ( )     
 m m  m  1 

26
 2n ( m 1) 3n    (m) n 
n f ( ) 
(m)
f ( )  f ( m  2) ( )        n  f ( )  f ( m 1) ( )       
m m  m  1 m (m  1) 
n 1   
 (m) n ( m 1) n2

 f ( )  f ( )  f ( m  2) ( )     
 m m  m  1 

Since n is small, Ignoring the terms containing 3n and higher powers of n , we get

    f ( m) ( )   1    2 ( m1)
1   n   f
 m  m m(m  1)  n
n 1 
  f ( m1) ( ) 2n f ( m 2) ( ) 
f ( m) ( ) 1  n ( m)  
 m f ( ) m  m  1 f ( ) 
( m)

1
   1   2 f ( m 1)   n f ( m 1) ( ) 2n f ( m  2) ( ) 
n 1  1   n    
 n ( m)   1   
 m   m m( m  1)  f ( )    m f ( m ) ( ) m  m  1 f ( m ) ( ) 

   1   2 f ( m 1) 
n 1   1   n     n ( m ) 
 m   m m( m  1)  f ( ) 
  f ( m 1) ( ) 2n f ( m  2) ( )  n f ( m 1) ( ) n2 f ( m  2) ( ) 
2

1   n
 
        
  m f ( ) m  m  1 f ( )   m f ( ) m  m  1 f ( ) 
(m) (m) (m) (m)


Again neglecting the terms containing 3n and higher powers of n , we get

   1      1  2 f ( m 1)
n 1   1   n        1    n ( m )
 m   m m ( m  1)   m  m f ( )

   f ( m1)
n 1  1   n  2 n2 ( m) (3)
 m m (m  1) f ( )

If the modified N-R equation (1) is having quadratic rate of convergence, then the co-efficient of
n must vanish, which gives


1 0
m


1   m
m

Thus equation (1) can be written as

27
f ( xn )
xn1  xn  m (4)
f ( xn )

This is known as modified N-R method.

Consider equation (3)

   f ( m1)
n 1  1   n  2 n2 ( m)
 m m (m  1) f ( )

Put   m

1 f ( m1)
n1  2n ( m )
m(m  1) f ( )

n 1 1 f ( m 1)

2n m(m  1) f ( m ) ( )

n 1 1 f ( m 1)
c, where c  This shows that modified N-R method also a
n
2
m(m  1) f ( m ) ( )
quadratic rate of convergence.

Note 1: Modified N-R method may have linear rate of convergence if m  1 ,   1 then from
equation (3) we have

 1
n1  1   n , m  1
 m

n1  1 
 1  
n  m 

n 1  1
 c , where c  1  , m 1
n  m

p = 1 this shows that modified N-R method has linear rate of convergence when m  1(m  1) .

28
Note 2: If the multiplicity of root is not known, then we use the following procedure.

It is known that f ( x)  0 has a root of order m, then f ( x)  0 has the same root of order (m – 1),
f ( x)
hence g ( x)  has a simple root (of order 1)  .
f ( x)

f ( x) f ( x )  f ( x) f ( x)
and g ( x) 
 f ( x)
2

Using N-R method

g( xn )
xn1  xn 
g( xn )

To find the approximate value of multiple root  on simplifying we get

f ( xn )
f ( x n )
x n 1  xn 
f ( xn ) f ( xn )  f ( xn ) f ( xn )
 f ( xn )
2

f ( xn ) f ( xn )
xn 1  xn  (5)
 f ( xn )
2
 f ( xn ) f ( xn )

Which is the generalized N-R method when multiplicity is unknown.

Generalized N-R method for multiple roots when multiplicity is unknown also has a quadratic rate
of convergence.

Example: Find root of x  3x  4  0 near x = 1.5 using following method


3 2

(i) N-R method


(ii) N-R method for multiple roots.
(iii) Modified N-R method for m = 2.

Solution:

(i)N-R Method

Here f ( x )  x 3  3 x 2  4 f ( x )  3 x 2  6 x

Given x0  1.5

29
For the N-R method we have

f ( xn )
xn1  xn  , n  1,2,3, 4.........
f ( xn )

xn3  3xn2  4
xn 1  xn  , n  1, 2,3,......
3 xn2  6 xn

x03  3x02  4 1.53  3 1.52  4


x1  x0   1.5    1.7777
3 x02  6 x0 3 1.5 2  6 1.5

x13  3x12  4 1.7777 3  3 1.7777 2  4


x2  x1   1.7777    1.8934
3x12  6 x1 3 1.7777 2  6 1.7777 

x23  3x22  4 1.8934 3  3 1.8934 2  4


x3  x2   1.8934    1.9477
3 x22  6 x2 3 1.8934 2  6 1.8934 

x33  3x32  4 1.9477 3  3 1.9477 2  4


x4  x3   1.9477    1.9988
3 x32  6 x3 3 1.9477 2  6 1.9477 

x43  3x42  4 1.9988 3  3 1.9988 2  4


x5  x4   1.9988    1.9994
3 x42  6 x4 3 1.9988 2  6 1.9988 

x53  3x52  4 1.9994 3  3 1.9994 2  4


x6  x5   1.9994    1.9997
3x52  6 x5 3 1.9994 2  6 1.9994 

x63  3 x62  4 1.9997 3  3 1.9997 2  4


x7  x6   1.9997    1.9998
3 x62  6 x6 3 1.9997 2  6 1.9997 

x73  3x72  4 1.9998 3  3 1.9998 2  4


x8  x7   1.9998    1.9999
3 x72  6 x7 3 1.9998 2  6 1.9998 

x83  3x82  4 1.9999 3  3 1.9999 2  4


x9  x8   1.9999    1.9999
3 x82  6 x8 3 1.9999 2  6 1.9999 

Here x8  x9  1.9999 , hence the approximate root of x  3x  4  0 is 1.9999.


3 2

(ii) Using N-R method for multiple roots formula:

30
f ( x) f ( x)
xn 1  xn 
 f ( x)
2
 f ( x) f ( x)

Here f ( x )  x 3  3 x 2  4

f ( x )  3 x 2  6 x

f ( x)  6x  6

Given x0  1.5

( xn3  3xn2  4)(3xn2  6 xn )


xn1  xn 
3x  6xn   ( xn  3xn  4)(6xn  6)
2 23 2
n

(3 xn5  15 xn4  18 xn3  12 xn2  24 xn )


xn 1  xn 
 3 xn4  12 xn3  18 xn2  24 xn  24 
xn  3xn4  12 xn3  18xn2  24 xn  24  (3xn5 15xn4  18xn3  12 xn2  24 xn )
xn1 
 3x 4
n  12 xn3  18xn2  24 xn  24

3 xn4  36 xn2  48 xn
xn 1 
3 xn4  12 xn3  18 xn2  24 xn  24

xn4  12 xn2  16 xn
xn 1  , n  0,1, 2,3........
xn4  4 xn3  6 xn2  8 xn  8

x04  12 x02  16 x0 1.54  12 1.5 2  16 1.5 


x1    1.9412
x04  4 x03  6 x02  8 x0  8 1.5 4  4 1.5 3  6 1.5 2  8 1.5   8

x14  12 x12  16 x1 1.9412 4  12 1.9412 2  16 1.9412 


x2    1.9994
x14  4 x13  6 x12  8 x1  8 1.9412 4  4 1.9412 3  6 1.9412  2  8 1.9412   8

x24  12 x22  16 x2 1.9994 4  12 1.9994 2  16 1.9994 


x3    1.9999
x24  4 x23  6 x22  8 x2  8 1.9994 4  4 1.9994 3  6 1.9994 2  8 1.9994   8

x34  12 x32  16 x3 1.9999 4  12 1.9999 2  16 1.9999 


x4    1.9999
x34  4 x33  6 x32  8 x3  8 1.9999 4  4 1.9999 3  6 1.9999 2  8 1.9999   8

Here x3  x4  1.9999 , hence the approximate root of x  3x  4  0 is 1.9999.


3 2

31
(iii)Modified N-R method for m = 2.

For the Modified N-R method we have

f ( xn )
xn1  xn  m , n  1, 2,3, 4.........
f ( xn )

 x3  3x 2  4 
x n 1  x n  2  n 2 n 
 3 xn  6 xn 

2 x03  6 x02  8 2 1.5 3  6 1.5 2  8


x1  x0   1.5    2.05555
3 x02  6 x0 3 1.5 2  6 1.5 

2 x13  6 x12  8 2  2.05555 3  6  2.05555 2  8


x2  x1    2.05555    2.0005
3 x12  6 x1 3  2.05555 2  6  2.05555 

2 x23  6 x22  8 2  2.0005 3  6  2.0005 2  8


x3  x2    2.0005    2.0000
3 x22  6 x2 3  2.0005 2  6  2.0005 

2 x33  6 x32  8 2  2 3  6  2  2  8
x4  x3    2  2
3 x32  6 x3 3  2 2  6  2 

Here x3  x4  2 , hence the approximate root of x  3x  4  0 is 2.


3 2

1 x
Example: Show that 1 xe  0 has a double root at x = 1, obtain the approximate root by using
modified N-R method, taking x0  0 .

Solution: For the Modified N-R method for m = 2, we have

f ( xn )
xn1  xn  m , n  1, 2,3, 4.........
f ( xn )

Here f ( x )  1  xe1 x

f ( x)  0  x(1)e1 x  e1 x  ( x  1)e1 x

f ( x)  ( x  1)(1)e1 x  e1 x (1)  (2  x)e1 x

Since f (1)  0, f (1)  0, f (1)  0

Hence x = 1 is a double root of f(x).

32
Given x0  0

2 1  xn e1 xn 
xn1  xn 
 xn 1 e1x n

2 1  x0e1 x0  2 1  0e10 
x1  x0   0   0.73576
 x0 1 e1x0  0 1 e10

2 1  x1e1x1  21   0.73576 e10.73576 


x2  x1   0.73576   0.97818
 x1 1 e1x 1
 0.73576 1 e10.73576

2 1  x2e1 x2  21   0.97818 e10.97818


x3  x2   0.97818   0.99984
 x2 1 e1x2  0.97818 1 e10.97818

2 1  x3e1 x3  21   0.99984 e10.99984 


x4  x3   0.99984   0.99999
 x3 1 e1x 3
 0.99984 1 e10.99984

2 1  x4e1x4  21   0.99999 e10.99999


x5  x4   0.0.99999   0.99999
 x4 1 e1x 4
 0.99999 1 e10.99999

1 x
Here x4  x5  0.99999 , hence the approximate root of 1 xe  0 is 0.99999.

Example: Show that x  7x 16x 12  0 has a double root at x = 2, starting with initial
3 2

approximation x0  1 find the approximate root by using modified N-R method, correct to three
decimal places.

Solution: For the Modified N-R method for m = 2, we have

f ( xn )
xn1  xn  m , n  1, 2,3, 4.........
f ( xn )

Here f ( x)  x3  7 x 2  16 x  12

f ( x )  3 x 2  14 x  16

f ( x)  6x 14

Since f (2)  0, f (2)  0, f (2)  0

33
Hence x = 2 is a double root of f(x).

Given x0  1

2  xn3  7 xn2  16 xn 12 


xn1  xn  , n  0,1, 2,3,......
 3x 2
n  14 xn  16 

2  x03  7 x02  16 x0  12 213  7 12  16 1 12


x1  x0   1   1.8
 3x 2
0  14 x0  16  312 14 1  16
2  x13  7 x12  16x1 12 21.83  7 1.82 16 1.8 12
x2  x1   1.8   1.9846
 3x12 14x1 16 31.82 14 1.8 16
2  x23  7 x22  16x2  12 21.98463  7 1.98462  16 1.9846 12
x3  x2   1.9846   1.9999
 3x22 14x2 16 31.98462 14 1.9846 16
2  x33  7 x32  16 x3  12  21.99993  7 1.9999 2  16 1.9999 12
x4  x3   1.9999    1.9999
 3x 2
3  14 x3  16  31.99992 14 1.9999  16
Here x3  x4  1.99999 , hence the approximate root of x  7x 16x 12  0 is 1.99999.
3 2

Example: Find the multiple root of 27x  27x  36x  28x  9x 1  0 starting with initial
5 4 3 2

approximation x0  0 .

Solution: Using N-R method for multiple roots formula:

f ( x) f ( x)
xn 1  xn 
 f ( x)
2
 f ( x) f ( x)

Here f ( x)  27 x5  27 x 4  36 x3  28 x 2  9 x  1

f ( x)  135 x 4  108 x 3  108 x 2  56 x  9

f ( x)  540 x3  324 x 2  216 x  56

Given x0  0

(27 xn5  27 xn4  36xn3  28xn2  9xn  1)(135xn4 108xn3 108xn2  56xn  9)
xn1  xn 
135x 108xn3 108xn2  56xn  9  (27 xn  27 xn  36xn  28xn  9xn  1)(540xn  324xn  216xn  56)
4 2
5 4 3 2 3 2
n

34
At x = 0

f (0)  1

f (0)  9

f (0)  56

f ( x0 ) f ( x0 ) f (0) f (0) (1)(9)


x1  x0   0   0.36
 f ( x0 )  f (0) (9)  (1)(56)
2 2 2
 f ( x0 ) f ( x0 )  f (0) f (0)

f (0.36)  0.00057

f (0.36)  0.06543

f (0.36) 4.96384

f ( x1 ) f ( x1 ) f (0.36) f (0.36)
x2  x1    0.36  
 f ( x1 )  f (0.36)  f (0.36) f (0.36)
2 2
 f ( x1 ) f ( x1 )
(0.00057)(0.06543)
  0.36    0.3343
(0.06543) 2  ( 0.00057)( 4.96384)

f (0.3343)  0.0000000271

f (0.3343)  32.0694

f (0.3.43) 0.1742

f ( x2 ) f ( x2 ) f (0.3343) f (0.3343)
x3  x2    0.3343 
 f ( x2 )  f (0.3343)  f (0.3343) f (0.3343)
2 2
 f ( x2 ) f ( x2 )
(0.0000000271)( 32.0694)
  0.3343   0.33429
(32.0694) 2  (0.0000000271)( 0.1742)
Here x2  x3  0.3342 , hence the approximate root of 27x  27x  36x  28x  9x 1  0 is -
5 4 3 2

0.3342.

35
Bairstow’s Method: This method is used in determining a quadratic factor of a polynomial.

Example: (i) Consider a polynomial x  2x  4x  4  0


3 2

p ( x )   x 2  x  1  x  1  2 x  3

(ii) Consider a polynomial x  x  3x  5x  3  0


4 3 2

p ( x)   x 2  x  2  x 2  1  6 x  1

Bairstow’s method extracts a quadratic factor of the form x 2  px  q from the polynomial

p ( x )  a0 x n  a1 x n 1  a 2 x n  2       an 1 x  an  0, a0  0 and a0 , a1 , a2 ,.........an 1 , an   which


may give a pair of complex roots (or) real roots.

This p n ( x )   x 2  px  q  Q n  2 ( x )  Rx  S

Where Qn  2 ( x )  b0 x n  2  b1 x n  3  b2 x n  4       bn 3 x  bn  2

Let p 0 and q0 be the initial approximation, with these p 0 and q0 we find the improved value
(corrected value or corrections) as p1  p0  p , q1  q0  q

 bn cn  3  bn 1cn  2 
Where  p    
 c  cn  3  c n 1  bn 1  
2
n2

 b  c  b   bncn2 
q    n21 n1 n1 
 cn2  cn3  cn1  bn1  

Computing bk ’s and ck ’s by using the following scheme

a0 a1 a2 a3    an 1 an
 p0 0  p0b0  p0b1  p0b2     p0bn  2  p0bn 1
 q0 0 0  q0b0  q0b1     q0bn 3  q0bn  2
b0 b1 b2 b3    bn 1 bn
 p0 0  p0 c0  p0 c1  p0 c2     p0 cn  2  p0 cn 1
 q0 0 0  q0 c0  q0c1     q0 cn 3  q0 cn  2
c0 c1 c2 c3    cn 1 cn

36
Example: Perform two iterations of Bairstow’s method to obtain quadratic factor from the
polynomial x  x  x  2  0 , with initial approximation p0  0.9, q0  0.9 .
3 2

Solution: Given p3 ( x )  x 3  x 2  x  2 , n  3, p0  0.9, q0  0.9

First iteration:

1 1 1 2
 p0  0.9 0 0.9 1.71 1.71
q0  0.9 0 0  0.9 1.71
1 1.9 0.19 0.119
b0 b1 b2 b3
 p0  0.9 0 0.9 2.52 1.287
q0  0.9 0 0 0.9 2.5
1 2.8 1.43  1.114
c0 c1 c2 c3

Consider

 b c  bn 1cn  2 
p    2 n n 3 
c
 n2  c n  3  n 1
c  bn 1  

 b  c  b   bncn2 
q    n21 n1 n1 
 cn2  cn3  cn1  bn1  

Put n = 3

 b c  b2 c1 
p    2 3 0 
 c1  c0  c2  b2  

 b  c  b2   b3c1 
q    2 2 2 
 c1  c0  c2  b2  

  0.119  1   0.19  2.8  


p      0.1047
  2.8  2
 1 1.43    0.19  

  0.19  1.43    0.19    0.119  2.8  


q      0.103054  0.1031
  2.8 2  1 1.43    0.19  

37
p1  p0  p  0.9   0.1047   1.0047 ,

q1  q0  q  0.9  0.1031  1.0031

Second iteration:

1 1 1 2
 p1  1.0047 0 1.0047 2.0141 0.01105
q1  1.0031 0 0  1.0031 2.0109
1 2.0047 0.011 0.00013
b0 b1 b2 b3
 p1  1.0047 0 1.0047 3.0235 2.0409
q1  1.0031 0 0 1.0031 3.0187
1 3.0094 2.0314  0.9776
c0 c1 c2 c3

 b c  b2 c1 
p    2 3 0 
 c1  c0  c2  b2  

 b  c  b2   b3c1 
q    2 2 2 
 c1  c0  c2  b2  

  0.00013 1   0.011 3.0094  


p      0.00468
  3.0094   1 2.0314   0.011 
2

  0.011 2.0314    0.00013  3.0094  


q      0.0031
  3.0094   1 2.0314   0.011 
2

p2  p1  p  1.0047  0.00468  1.00002  1 ,

q2  q1  q  1.0031  0.0031  1

Therefore, one of the quadratic factor is x 2  px  q that is x 2  p 2 x  q2  x 2  x  1

Second quadratic factor is obtained as the quotient if x  x  x  2 is divided by x  x  1.


3 2 2

38
x2
x2  x  1 x3  x 2  x  2
x3  x 2  x
( ) (  ) ( )
2 x2  2x  2
2 x2  2x  2
( ) (  ) (  )
0

Therefore, second factor is (x+2).

Hence x 3  x 2  x  2   x 2  x  1  x  2 

Example: Perform two iterations of Bairstow’s method to obtain quadratic factor from the
polynomial x  x  2x  x 1  0 , with initial approximation p0  0.5, q0  0.5 .
4 3 2

Solution: Given p3 ( x )  x 4  x 3  2 x 2  x  1 , n  4, p0  0.5, q0  0.5

First iteration:

1 1 2 1 1
 p0  0.5 0 0.5 0.25 0.625 0.0625
q0  0.5 0 0 0.5 0.25 0.625
1 0.5 1.25 0.125 0.3125
b0 b1 b2 b3 b4
 p0  0.5 0 0.5 0 0.375 0.125
q0  0.5 0 0 0.5 0  0.375
1 0 0.75 0.25 0.0625
c0 c1 c2 c3 c4

Consider

 b c  bn 1cn  2   b  c  b   bncn2 
p    2 n n 3  q    n21 n1 n1 
 cn  2  cn  3  c n 1  bn 1    cn2  cn3  cn1  bn1  

Put n = 4

39
 b c b c 
p    2 4 1 3 2 
 c2  c1  c3  b3  

 b  c  b   b4c2 
q    3 2 3 3 
 c2  c1  c3  b3  

  0.3125  0    0.125  0.75  


p      0.1666  0.17
  0.75    0 0.25  0.125 
2

  0.125 0.25  0.125   0.3125  0.75  


q      0.5
  0.75 2   0 0.25  0.125 

p1  p0  p  0.5  0.17  0.67 ,

q1  q0  q  0.5  0.5  1

Second iteration:

1 1 2 1 1
 p1  0.67 0 0.67 0.23 0.52 0.099
 q1  1 0 0 1 0.33 0.778
1 0.33 0.77 0.148 0.123
b0 b1 b2 b3 b4
 p1  0.67 0 0.67 0.227 0 0.32
 q1  1 0 0 1 0.34 0
1 0.34 0 0.48 0.21
c0 c1 c2 c3 c4

 b c b c 
p    2 4 1 3 2 
 c2  c1  c3  b3  

  0.07  0.34    0.44  0.45  


p      0.3079
  0.45    0.34  0.78  0.44  
2

 b  c  b   b4c2 
q    3 2 3 3 
 c2  c1  c3  b3  

40
  0.44  0.75  0.44    0.77  0.45  
q      0.32
  0.45    0.34  0.78  0.44  
2

p2  p1  p  0.67  0.3079  0.9779  1 ,

q2  q1  q  1  0.32  0.68  1

Therefore one of the quadratic factor is x 2  px  q that is x 2  p 2 x  q2  x 2  x  1

Second quadratic factor is obtained as the quotient if x  x  2x  x 1is divided by x  x  1.


4 3 2 2

x2  1
x2  x  1 x 4  x3  2 x2  x  1
x 4  x3  x 2
(  ) ( ) (  )
x2  x  1
x2  x  2
( ) () ( )
0

Therefore, second factor is x  1


2

Hence x 4  x 3  2 x 2  x  1   x 2  x  1 x 2  1

Example: Perform two iterations of Bairstow’s method to obtain quadratic factor from the
polynomial x  8x  39x  62x  50  0 , with initial approximation p0  1.5, q0  1.5 .
4 3 2

Solution: Given p3 ( x )  x 4  8 x 3  39 x 2  62 x  50 , n  4, p0  1.5, q0  1.5


First iteration:

1 8 39 62 50
 p0  1.5 0 1.5 9.75 41.1625 15.9375
q0  1.5 0 0 1.5 9.75 41.625
1 6.5 27.75 10.625 7.5625
b0 b1 b2 b3 b4
 p0  1.5 0 1.5  7.5 28.125 37.5
q0  1.5 0 0 1.5 7.5  28.125
1 5 18.75 25 1.8125
c0 c1 c2 c3 c4

41
Consider

 b c  bn 1cn  2 
p    2 n n 3 
 cn  2  cn  3  c n 1  bn 1  

 b  c  b   bncn2 
q    n21 n1 n1 
 cn2  cn3  cn1  bn1  

Put n = 4

 b c b c 
p    2 4 1 3 2 
 c2  c1  c3  b3  

 b  c  b   b4c2 
q    3 2 3 3 
 c2  c1  c3  b3  

  7.5625  5    10.625 18.75  


p      0.447  0.45
 18.75    5 25  10.625  
2

  10.625  25  10.625    7.5625 18.75  


q      0.44  0.45
 18.75 2   5  25  10.625  

p1  p0  p  1.5  0.45  1.95  2 ,

q1  q0  q  1.5  0.45  1.95  2

Second iteration:

1 8 39 62 50
 p1  2 0 2 12 78 56
q1  2 0 0 12 12 78
1 6 39 28 28
b0 b1 b2 b3 b4
 p1  2 0 2 8 90 252
 q1  2 0 0 2 8  90
1 4 45 126 190
c0 c1 c2 c3 c4

42
 b c b c 
p    2 4 1 3 2 
 c2  c1  c3  b3  

  28   4    28  45  
p      0.567
  45    4  126  28  
2

 b  c  b   b4c2 
q    3 2 3 3 
 c2  c1  c3  b3  

  28 126  28    28  45  
q      0.6139
  45    4  126  28  
2

p2  p1  p  2  0.567  2.567  2 ,

q2  q1  q  2  0.6139  1.3861  2

Therefore one of the quadratic factor is x 2  px  q that is x 2  p2 x  q2  x 2  2 x  2

Second quadratic factor is obtained as the quotient if x  8x  39x  62x  50 is divided by


4 3 2

x2  2x  2 .

x 2  6 x  25
x2  2 x  2 x 4  8 x3  39 x 2  62 x  50
x 4  2 x3  2 x 2
( ) (  ) ( )
 6 x 3  37 x 2  62 x
 6 x 3  12 x 2  12 x
(  ) ( ) ( )
25 x 2  50 x  50
25 x 2  50 x  50
( ) () (1)
0

Therefore, second factor is x  6x  25


2

Hence x 4  8 x 3  39 x 2  62 x  50   x 2  2 x  2  x 2  6 x  25

43
Solution of system of linear algebraic equation:

Simultaneous linear equations is quite often in engineering and science. The analysis of electronic
circuit, analysis of a network under sinusoidal, study state condition, determination of output of a
chemical plant (or) some of the problem which depend on the solution of simultaneous linear
algebraic equations. The solution of such equations can be obtained by direct method (or) iterative
method.

Direct Method: This method produces exact solution after a finite number of steps.

Iterative Method: This method gives a sequence of approximate solution which converges when
large number of iterations are performed.

Direct Method:

1) Gauss Elimination Method:

In Gauss elimination method the unknowns are eliminated successively and the system is reduced
to an upper triangular system, from which the unknowns are found by back substitution.

This method is quite general and is well adopted computer for operations.

Consider the equations

a11 x1  a12 x2  a13 x3  b1 



a21 x1  a 22 x2  a23 x3  b2  (1)
a31 x1  a32 x2  a33 x3  b3 

Matrix form of system of equation (1) is

 a11 a12 a13   x1   b1 


A   a 21 a22 a23  , X   x2  , B  b2 
 
 a31 a32 a33   x3  b3 

Augmented matrix is given by

 a11 a12 a13 : b1 


 A : B    a21 a 22 a23 : b2 
 a31 a32 a33 : b3 

44
Reduce the augmented matrix into triangular matrix using row operations

 a11 a12 a13 : b1 


 A : B    0 
a22  : b2 
a23 
 0 0  : b3
a33

Reduce the above matrix to system of equations form

a11 x1  a12 x2  a13 x3  b1

 x2  a23
a22  x3  b2

 x3  b2
a33

Solve above system by back substitution method.

 , a33
Note: 1) The elements a11 , a22  are called Pivot elements.

 , a33
2) This method fails if one of the pivot elements a11 , a22  is zero. In this case the equations are
arranged properly.

3) If the coefficient matrix A is singular the solution does not exist.

4) Use only row operations in the elimination process.

Example: Solve the following system of equations using Gauss elimination method
x + y + z = 6, x – y + 2z = 5, 3x + y + z =8

Solution:

x + y + z = 6, x – y + 2z = 5, 3x + y + z =8 (1)

Augmented matrix for the given system of equations is

1 1 1 : 6 
 A : B   1 1 2 : 5 
 
3 1 1 : 8 

Operating R2  R2  R1 , R3  R3  3R1

1 1 1 : 6 
 A : B   0 2 1 :  1 

 
 0 2 2 : 10 

45
Operating, R3  R3  R2

1 1 1 : 6
 A : B   0  2 1 :  1

 
 0 0 3 : 9 

The reduced form of the given system (1) is

x+y+z=6 (2)

-2y + z = -1 (3)

-3z = -9 (4)

From (4)

-3z = -9

z = -9/-3

z=3

From (3)

-2y + z = -1

-2y + 3 = -1

-2y = -4

y=2

From (2)

x+2+3=6

x=1

Hence the solution of the given system is x = 1, y = 2, z = 3.

46
Example: Solve Using Gauss elimination method 3x  y  2z  3 , 2x  3y  z  3, x  2y  z  4
Solution: The given system of equation is

3x  y  2z  3 , 2x  3y  z  3, x  2y  z  4 . (1)

Augmented matrix for the given system of equations is

3 1 2 : 3 
 A : B    2 3 1 : 3
 
 1 2 1 : 4 

Operating R2  3R2  2 R1 , R3  3R3  R1

3 1 2 : 3 
 A : B   0 11 7 : 15 

 
 0 5 1 : 9 

Operating, R3  11R3  5 R2

3 1 2 : 3 
 A : B   0 11 7 : 15

 
 0 0 24 : 24 

The reduced form of the given system (1) is

3x  y  2z  3 (2)

11y  7 z  15 (3)

 24 z  24 (4)

From (4)

 2 4 z  24  z   1

From (3)

11y  7 1  15

11y  22  y  2

47
From (2)

3x  2  2  1  3

3x  3  x  1

Hence the solution of the given system is x = 1, y = 2, z = -1.

Example: Solve Using Gauss elimination method 2x  2 y  4z  7 , 2x  y  z  7 ,


x  3y  5z  2 .

Solution: The given system of equation is

2x  2 y  4z  7 , 2x  y  z  7 , x  3y  5z  2 (1)

Augmented matrix for the given system of equations is

2 2 4 : 7
 A : B  2 1 1 : 7
 
1 3 5 : 2 

Operating R2  R2  R1 , R3  2 R3  R1

2 2 4 7:
 A : B   0 1 3 : 0 

 0 4 6 :  3 

Operating, R3  R3  4 R2

2 2 4 7:
 A : B   0 1 3 : 0 

 0 0 6 :  3 

The reduced form of the given system (1) is

2x  2 y  4z  7 (2)

 y  3z  0 (3)

6 z  3 (4)

48
From (4)

1
 6 z  3  z 
2

From (3)

3
 y  3    0  y  
1
2 2

From (2)

2 x  2     4    7
3 1
 2 2

2x  3  2  7  2x  8  x  4

3 1
Hence the solution of the given system is x  4, y   , z  .
2 2

49
Pivoting:

 , a33
In the elimination process, if any one of the pivot elements a11 , a22  vanishes (or) becomes very
small compared to other elements in that column, then we attempt to rearrange the remaining rows,
so as to obtain a non-vanishing pivot (or) to avoid multiplication by a large number. This process
is called pivoting.

There are two types of pivoting

(i)Partial pivoting

(ii) Complete pivoting

Partial Pivoting:

In the first stage of elimination, the first column is searched for largest element in magnitude and
brought as the first pivot by interchanging the first equation with the equation having the largest
element in magnitude.

In the second stage of elimination, the second column is searched for the largest element in
magnitude among the (n – 1) elements leaving the first element and this element is brought as
second pivot by interchanging of the second equation with the equation having the largest in
magnitude. This process is continued until we arrive at equation the single variable. This modified
procedure is called partial pivot.

Complete Pivoting:

We search the matrix for the largest element in magnitude and bring it as the first pivot, this
requires not only interchanging of equations but also interchanging of the position of the variables.
This method of elimination is called complete pivoting.

Example: Solve x1  x2  x3  6 , 3 x1  3 x2  4 x3  20 , 2 x1  x2  3 x3  13 , using Gauss elimination


method (Partial pivoting method).

Solution: Augmented matrix for the given system of equations is

1 1 1 : 6 
 A : B    3 3 4 : 20 
 
 2 1 3 : 13 

Since in C1 3 is the largest number, interchanging first and second row, we get

Operating, R1  R2

50
 3 3 4 : 20 
 A : B   1 1 1 : 6 
 
 2 1 3 : 13 

Operating, R2  3R2  R1 , R3  3R3  2 R1

 3 3 4 : 20 
 A : B    0 0 1 : 2 
 
0 3 1 : 1

Operating, R2  R3

 3 3 4 : 20 
 A : B   0 3 1 : 1
 
0 0 1 : 2 

The reduced form of the given system (1) is

3 x1  3 x2  4 x3  20 (2)

3 x2  x3  1 (3)

 x3   2 (4)

From (4)  x3  2  x3  2

From (3) 3x2  2  1

3 x2  3  x2  1

From (2) 3 x1  3 1  4  2   20

3x1  9  x1  3

Hence the solution of the given system is x1  3, x2  1, x3  2

51
Example: Solve by Gauss elimination method using Partial pivoting method.

x1  4 x2  2 x3  4 , 3x1  2 x2  4 x3  6 , 4 x1  x2  x3  4 ,

Solution: Augmented matrix for the given system of equations is

 1 4 2 : 4 
 A : B    3 2 4 : 6 
 
 4 1 1 : 4 

Since in C1 , 4 is the largest number, interchanging first and third row, we get

Operating, R1  R3

4 1 1 : 4
 A : B    3 2 4 : 6 
 
1 4 2 : 4 

Operating, R2  4 R2  3R1 , R3  4 R3  R1

4 1 1 : 4
 A : B   0 5 19 : 12 

 
 0 15 9 : 12 

Operating, R2  R3

4 1 1 : 4
 A : B   0 15 9 : 12 

 
 0 5 19 : 12 

Operating R3  15 R3  5R2

4 1 1 : 4 
 A : B   0 15 9 : 12 

 
 0 0 240 : 120 

The reduced form of the given system (1) is

4 x1  x2  x3  4 (2)

15 x2  9 x3  12 (3)

52
240 x3  120 (4)

1
From (4) 240 x3  120  x3  
2

From (3) 15 x 2  9   1   12
 2

9 15
15 x2  12  
2 2

15 1
15 x2   x2 
2 2

From (2) 4 x1   1     1   4
2  2

4 x1  4  x1  1

1 1
Hence the solution of the given system is x1  1, x2  , x3  
2 2

Example: Solve by Gauss elimination method using Partial pivoting method.

x1  x2  x3  2 , 2 x1  3 x2  3 x3  3 , 3 x1  2 x2  3 x3  6 ,

Solution: Augmented matrix for the given system of equations is

 1 1 1 : 2 
 A : B   2 3 5 : 3
 
 3 2 3 : 6 

Since in C1 , 3 is the largest number, interchanging first and third row, we get

Operating, R1  R3

 3 2 3 : 6 
 A : B   2 3 5 : 3
 
1 1 1 : 2 

Operating, R2  3R2  2 R1 , R3  3R3  R1

53
 3 2 3 : 6 
 A : B    0 5 21 : 3
 
 0 1 0 : 0 

Operating R3  5 R3  R2

 3 2 3 : 6 
 A : B    0 5 21 : 3
 
 0 0 21 : 3 

The reduced form of the given system (1) is

3 x1  2 x2  3 x3  6 (2)

5 x2  21x3  3 (3)

21x3  3 (4)

1
From (4) 21x3  3  x3  
7

 1
From (3) 5x2  21    3
 7

5 x2  3  3  5 x2  0  x2  0

 1
From (2) 3x1  2  0  3     6
 7

3
3 x1  6 
7

39 13
3 x1   x1 
7 7

13 1
Hence the solution of the given system is x1  , x2  0, x3  
7 7

54
Example: Solve by Gauss elimination method using Partial pivoting method.

2 x1  x2  x3  2 x4  10 , 4 x1  2 x3  x4  8 , 3x1  2 x2  2 x3  7 , x1  3 x2  2 x3  x4  5

Solution: Augmented matrix for the given system of equations is

2 1 1 2 : 10
4 0 2 1 : 8 
 A : B  
3 2 2 0 : 7 
 
1 3 2 1 : 5 

Since in C1 , 4 is the largest number, interchanging first and third row, we get

Operating, R1  R2

4 0 2 18  :
2 1 1 2 : 10
 A : B  
3 2 2 0 : 7 
 
1 3 2 1 : 5 

Operating, R2  2 R2  R1 , R3  4 R3  3R1 , R4  4 R4  R1

4 0 2 1 8  :
0 2 0 5 : 28
 A : B  
0 8 2 3 : 4 
 
 0 12 6 5 : 28

Operating, R2  R4

4 0 2 1 : 8 
 0 12 6 5 : 28
 A : B  
 0 8 2 3 : 4 
 
 0 2 0 5 : 28

Operating, R3  3R3  2 R2 , R4  6 R4  R2

4 0 2 1 : 8 
0 12 6 5 : 28 
 A : B  
0 0 24 4 : 272 
 
0 0 12 50 : 280

55
Operating R4  2 R4  R3

4 0 2 1 : 8 
0 12 6 5 : 28 
 A : B  
0 0 24 4 : 272 
 
0 0 0 104 : 832

The reduced form of the given system (1) is

4 x1  2 x3  x4  8 (2)

12 x2  6 x3  5 x4  28 (3)

24 x3  4 x4  272 (4)

104 x4  832 (5)

From (5) 104 x4  832  x  8

From (4) 24 x3  4  8   272

24 x3  240  x3  10

From (3) 12 x2  6  10   5  8  28

12 x2  28  100

12 x2  72  x2  6

From (2) 4 x1  2  10   8  8

4 x1  20  x1  5

Hence the solution of the given system is x1  5, x2  6, x3  10, x4  8

56
Example: Solve by Gauss elimination method using Partial pivoting method.

13 x1  5 x2  3 x3  x4  18 , 2 x1  12 x2  x3  4 x4  13 , x1  4 x2  10 x3  x4  29 ,
2 x1  x2  3x3  9 x4  31

Solution: Augmented matrix for the given system of equations is

13 5 3 1 : 18 
 2 12 1 4 : 13 
 A : B  
 1 4 10 1 : 29 
 
 2 1 3 9 : 31

Operating, R2  13R2  2 R1 , R3  13 R3  R1 , R4  13R4  2 R1

13 5 3 1 : 18 
 0 146 19 54 : 133 
 A : B  
 0 57 133 12 : 359 
 
0 3 33 115 : 367 

Operating, R3  146 R3  57 R2 , R4  146 R4  3R2

13 5 3 1 : 18 
 0 146 19 54 : 133 
 A : B  
0 0 20501 1326 : 59995
 
0 0 4875 16952 : 53183

Operating, R3  R4

13 5 3 1 : 18 
 0 146 19 54 : 133 
 A : B  
0 0 4875 16952 : 53183
 
0 0 20501 1326 : 59995

Operating R4  4875 R4  20501R3

13 5 3 1 : 18 
 0 146 19 54 : 133 
 A : B   
0 0 4875 16952 : 53183 
 
0 0 0 341068702 : 1382785183

57
The reduced form of the given system (1) is

13 x1  5 x2  3 x3  x4  18 (2)

146 x2  7 x3  54 x4  133 (3)

4875 x3  16952 x4  53183 (4)

341068702 x4  1382785183 (5)

1382785183
From (5) 341068702 x4  1382785183  x4   4.05
341068702

From (4) 4875 x3  16952  4.05   53183  x3  3.17

From (3) 146 x2  7  3.17   54  4.05   133  x2  2.25

From (2) 13 x1  5  2.25   3  3.17    4.05   18  x1  0.93

Hence the solution of the given system is x1  0.93, x2  2.25, x3  3.17, x4  4.05

58
LU Decomposition (or) Factorization Method:

Consider the system of equations

a11 x1  a12 x2  a13 x3        a1n xn  b1 


a21 x1  a22 x2  a23 x3        a2 n xn  b2 
a31 x1  a32 x2  a33 x3        a3n xn  b3 
 (1)
 
 

an1 x1  an 2 x2  an 3 x3        ann xn  bn 

System (1) can be written in the matrix form as

AX  B (2)

where

 a11 a12 a13   a1n   x1   b1 


a a22 a23   a2 n  x  b 
 21  2  2
 a31 a32 a33   a3n   x3   b3 
A  X   B 
        
        
     
 an1 an 2 an 3   ann   xn   bn 

In this method the coefficient matrix A of the system (1) is decomposed (or) factorized in to the
product of lower triangular matrix (L) and upper triangular matrix (U).

We write A  L U (3)

where

 l11 0 0   0 u11 u12 u13   u1n 


l l22 0   0  0 u22 u 23   u 2 n 
 21 
l31 l32 l33   0 0 0 u33   u3 n 
L  U  
           
           
   
ln1 ln 2 ln 3   lnn   0 0 0   u nn 

to produce unique solution it is convenient to choose either uii  1 (or) lii  1 , i  1,2,3,..........n .

59
when we choose

(i) lii  1 the method is called Dolittle’s method.

(ii) uii  1 the method is called Crout’s method.

The system (2) becomes

(LU ) X  B (4)

We write (4) as the following two system of equations

UX  Z  LZ  B

The unknowns z1 , z2 , z3 ,........zn are determined by the equation LZ  B . x1 , x2 , x3 ,........xn are


1 1
obtained from the equation U X  Z by back substitution, (or) we find L and U to get Z  L B
1

1
and X  U Z .

Note: The inverse of A can also be determined by

A1   LU  1

A1  U 1L1
LU-Factorization method/ LU- Decomposition method:

Let AX = B be the system of n linear equations in n unknowns. In this method we decompose the
square matrix in to product of lower triangular matrix L and upper triangular matrix U.

i.e. A = LU

AX = B  (LU)X = B

 L(UX) = B

 z1 
z 
 2
Let UX = Z where Z   . 
 
 . 
 z n 

Then LZ = B

By forward substitution we find Z

60
i.e. z1, z2, z3……… zn

Then from UX = Z with known Z we get X (x1, x2, x3……….xn) with back substitution.

Example: Solve using Crout’s method x1  x2  x3  1 , 4 x1  3 x2  x3  6 , 3 x1  5 x2  3 x3  4

Solution: From Crout’s method uii  1

 1 1 1   l11 0 0   1 u12 u13 


A   4 3 1   l21 l22 0   0 1 u 23 
 3 5 3   l31 l32 l33   0 0 1 

 1 1 1   l11 l11u12 l11u13 


A   4 3 1   l21 l21u12  l22 l21u13  l22 u 23 
 3 5 3   l31 l31u12  l32 l31u13  l32 u 23  l33 

Equating L.H.S and R.H.S. we get

l11u12  1 l11u13  1
l11  1
u12  1 u13  1

l21u12  l22  3 l21u13  l22u23  1


l21  4 (4)(1)  l22  3 (4)(1)  (1)u23  1
l22  1 u23  5
l31u12  l32  5 l31u13  l32u23  l33  3
l31  3 (3)(1)  l32  5 (3)(1)  (2)(5)  l33  3
l32  2 l33  10

1 1 1  1 0 0  1 1 1 
A   4 3 1   4 1 0   0 1 5 
  
 3 5 3   3 2 10   0 0 1 

 x1  0
AX = B where X  x2 and B   3 
 
   
 x3   2 

(LU)X = B

L(UX) = B

61
 z1 
Put UX = Z where Z   z 2 
 
 z 3 

LZ = B

1 0 0   z1   1 
4 1 0   z 2    6 

 3 2 10   z3   4 

z1  1 (1)

4 z1  z 2  6 (2)

3 z1  2 z 2  10 z3  4 (3)

From (1) z1  1

From (2) 4 1  z2  6  z2  2

From (3) 3 1  2  2   10 z3  4

1
 10 z3  5  z3  
2

1
z1  1, z2  2, z3  
2

Now consider

UX  Z

 1 1 1   x1   1 
 0 1 5   x    2 
  2  
 0 0 1   x3   1 / 2 

x1  x2  x3  1 (4)

x2  5 x3  2 (5)

1
x3   (6)
2

62
1
From (6) x3  
2

From(5) x2  5   1   2
 2

5 1 1
x2   2    x2 
2 2 2

From (4) x1   1     1   1  x1  1
2  2

1 1
Hence the solution of the given system is x1  1, x2  , x3  
2 2

Example: Solve the system of equations using Dolittle’s method 2x + 3y +z = 9, x + 2y + 3z =


6, 3x + y + 2z = 8

Solution: From Dolittle’s method lii  1 .

2 3 1  1 0 0  u11 u12 u13 


A   1 2 3    l21 1 0   0 u22 u23 
 3 1 2   l31 l32 1   0 0 u33 

2 3 1   u11 u12 u13 


A   1 2 3    l21u11 l21u12  u 22 l21u13  u 23 

 3 1 2   l31u11 l31u12  l32 u 22 l31u13  l32 u 23  u33 

Equating L.H.S and R.H.S. we get

u11  2 u12  3 u13  1

l21u11  1 l21u12  u22  2 l21u13  u23  3


l21 (2)  1 (1/ 2)(3)  u 22  2 (1/ 2)(1)  u23  3
l21  1/ 2 u 22  1/ 2 u23  5 / 2

l31u11  3 l31u12  l32 u22  1 l31u13  l32 u23  u33  2


l31 (2)  3 (3/ 2)(3)  l32 (1/ 2)  1 (3/ 2)(1)  (7)(5 / 2)  u33  2
l31  3 / 2 l32  7 u33  18

63
2 3 1  1 0 0 2 3 1 
 1 2 3   1/ 2 1 0   0 1/ 2 5 / 2 
    
 3 1 2  3 / 2 7 1   0 0 18 

x 9 
AX =B where X  y and B   6 
 
   
 z   8 

(LU)X =B

L(UX) =B

 z1 
Put UX=Z where Z   z 2 
 
 z 3 

LZ = B

 1 0 0   z1   9 
1/ 2 1 0   z    6 
  2  
3 / 2 7 1   z3   8 

z1 = 9

1/2z1 + z2 = 6

3/2z1-7z2+z3=8

Solving above equations we get

z1 = 9, z2 = 3/2, z3 = 5

Now consider

UX = Z

2 3 1   x  9 
 0 1/ 2 5 / 2   y   3 / 2 
    
 0 0 18   z   5 

2x+3y+z=9

1/2y + 5/2z = 3/2

64
18z = 5

Solving above equations we get

x = 35/18, y = 29/18, z= 5/18

Example: Solve the system of equations using Crout’s method x1  2 x2  x3  0 ,


2 x1  2 x2  3 x3  3 ,  x1  3x2  2 .

Solution:

1 2 1   l11 0 0   1 u12 u13 


A   2 2 3    l21
 l22 0   0 1 u 23 
 1 3 0   l31 l32 l33   0 0 1 

1 2 1   l11 l11u12 l11u13 



A2 2 3   l21 l21u12  l22 l21u13  l22 u 23 
  1 3 0   l31 l31u12  l32 l31u13  l32 u 23  l33 

Equating L.H.S and R.H.S. we get

l11u12  2 l11u13  1
l11  1
u12  2 u13  1

l21u12  l22  2 l21u13  l22 u23  3


l21  2 (2)(2)  l22  2 (2)(1)  (2)u23  3 l31   1
l22  2 u23  1/ 2
l31u12  l32  3 l31u13  l32 u23  l33  0
(1)(2)  l32  3 ( 1)(1)  ( 1)(1/ 2)  l33  0
l32  1 l33  1/ 2

1 2 1  1 0 0  1 2 1 
 2 2 3    2 2 0   0 1 1/ 2 
    
 1 3 0   1 1 1/ 2   0 0 1 

 x1  0
AX =B where X  x2 and B   3 
 
   
 x3   2 

(LU)X =B

65
L(UX) =B

 z1 
Put UX=Z where Z   z 2 
 
 z 3 

LZ = B

1 0 0   z1   0 
 2 2 0   z    3 
  2  
 1 1 1/ 2   z3   2 

z1 = 0

2z1 – 2z2 = 3

-z1-z2-(1/2)z3=3

Solving above equations we get

z1 = 0, z2 = -3/2, z3 = 1

Now consider

UX = Z

1 2 1   x1   0 
 0 1 1/ 2   x    3 / 2 
  2  
 0 0 1   x3   1 

x1+2x2+x3=0

x2+(-1/2)x3= -3/2

x3 = 1

Solving above equations we get

x1= 1, x2= -1, x3= 1

66
Example: Solve the system of equations using Dolittle’s method x + 3y = 1, 2x + y = 2,
3x + 4y + z = 0.

Solution:

1 3 0   1 0 0   u11 u12 u13 


A   2 1 0    l21 1 0   0 u 22 u 23 
 3 4 1   l31 l32 1   0 0 u33 

1 3 0   u11 u12 u13 


A   2 1 0    l21u11 l21u12  u 22 l21u13  u 23 

 3 4 1   l31u11 l31u12  l32 u 22 l31u13  l32 u 23  u33 

Equating L.H.S and R.H.S. we get

u11  1 u12  3 u13  0

l21u11  2 l21u12  u22  1 l21u13  u23  0


l21 (1)  2 (2)(3)  u22  1 (2)(0)  u 23  0
l21  2 u22  5 u 23  0

l31u11  3 l31u12  l32 u 22  4 l31u13  l32 u 23  u33  1


l31 (1)  3 (3)(3)  l32 ( 5)  4 (3)(0)  (1)(0)  u33  1
l31  3 l32  1 u33  1

1 3 0  1 0 0  1 3 0 
 2 1 0    2 1 0   0 5 0 
    
 3 4 1   3 1 1   0 0 1 

x 1 
AX =B where X  y and B   2 
 
   
 z   0 

(LU)X =B

L(UX) =B

 z1 
Put UX=Z where Z   z 2 
 
 z 3 

67
LZ = B

 1 0 0   z1   1 
2 1 0  z   2
  2  
 3 1 1   z3   0 

z1 = 1

2z1 + z2 = 2

3z1+z2+z3=0

Solving above equations we get

z1 = 1, z2 = 0, z3 = -3

Now consider

UX = Z

1 3 0   x   1 
 0 5 0   y    0 
    
 0 0 1   z   3

 x+3y=1

-5y = 0

z = -3

Solving above equations we get x = 1, y = 0, z = -3

Example: Solve the system of equations using Crout’s method 2 x  3 y  2 z  2 ,


10 x  3 y  4 z  16 , 3 x  6 y  z  6 .
Solution:

 2 3 2   l11 0 0   1 u12 u13 


A  10 3 4   l21 l22 0   0 1 u 23 
 3 6 1   l31 l32 l33   0 0 1 

 2 3 2   l11 l11u12 l11u13 


A  10 3 4    l21 l21u12  l22 l21u13  l22 u 23 
 3 6 1   l31 l31u12  l32 l31u13  l32 u 23  l33 

68
Equating L.H.S and R.H.S. we get

l11u12  3 l11u13  2
l11  2 2u12  3 2u13  2
u12  3/ 2 u13  1

l21u12  l22  3 l21u13  l22 u23  4


l21  10 (10)(3 / 2)  l22  3 (10)(1)  (12)u 23  4
l22  12 u 23  1/ 2

l31u12  l32  6 l31u13  l32 u23  l33  1


l31  3 (3)(3/ 2)  l32  6 (3)(1)  (3 / 2)(1/ 2)  l33  1
l32  3/ 2 l33  11/ 4
 2 3 2 2 0 0  1 3 / 2 1 
10 3 4   10 12 0   0 1 1/ 2 
  
 3 6 1   3 3 / 2 11/ 4  0 0 1 

 x1  2
AX =B where X  x2 and B  16 
 
   
 x3   6 

(LU)X =B

L(UX) =B

 z1 
Put UX=Z where Z   z 2 
 
 z 3 

LZ = B

2 0 0   z1   2 
10 12 0   z 2   16 

 3 3 / 2 11/ 4   z3   6 

2z1 = 2

10z1 –12z2 = 16

3z1+(3/2)z2-(11/4)z3=-6

69
Solving above equations we get

z1 = 1, z2 = -1/2, z3 = 3

Now consider

UX = Z

 1 3 / 2 1   x1   1 
0 1 1/ 2   x2    1/ 2 

 0 0 1   x3   3 

x1+(3/2)x2+x3=1

x2+(1/2)x3= -1/2

x3 = 3

Solving above equations we get x1= 1, x2= -2, x3= 3

Example: Solve the system of equations using Crout’s method x + 2y + 3z =1, 2x + 3y + 8z =2,
x + y + z = 3.

Solution:

 1 2 3  l11 0 0   1 u12 u13 


A   2 3 8   l
 21 l22 0   0 1 u 23 
 1 1 1   l31 l32 l33   0 0 1 

 1 2 3  l11 l11u12 l11u13 


A   2 3 8   l21 l21u12  l22 l21u13  l22 u23 
 1 1 1   l31 l31u12  l32 l31u13  l32 u23  l33 

Equating L.H.S and R.H.S. we get

l11u12  2 l11u13  3
l11  1
u12  2 u13  3

l21u12  l22  3 l21u13  l22 u23  8


l21  2 (2)(2)  l22  3 (2)(3)  (1)u23  8
l22  1 u23  2

70
l31u12  l32  1 l31u13  l32 u23  l33  1
l31  1 (1)(2)  l32  1 (1)(3)  (1)(2)  l33  1
l32  1 l33  4

 1 2 3  1 0 0  1 2 3 
 2 3 8    2 1 0   0 1  2 
    
 1 1 1   1 1 4   0 0 1 

 x 1 
AX =B where X  y and B   2 
 
   
 z   3 

(LU)X =B

L(UX) =B

 z1 
Put UX=Z where Z   z 2 
 
 z 3 

LZ = B

1 0 0   z1   1 
 2 1 0   z    2 
  2  
 1 1 4   z3   3 

z1 = 1

2z1 – z2 = 2

z1 - z2 - 4z3=3

Solving above equations we get

z1 = 1, z2 = 0, z3 = - 1/2

Now consider

UX = Z

1 2 3  x  1 
0 1 2   y    0 

 0 0 1   z   1/ 2 

71
x + 2y + 3z = 1

y – 2z = 0

z = -1/2

Solving above equations we get

x = 9/2, y = -1, z = -1/2

Example: Solve the system of equations using Crout’s method 4x 1 + x2 + x3 = 4, x1-3x2 -2x3 = 4,
3x1+2x2-4x3 = 6.

Solution:

4 1 1   l11 0 0   1 u12 u13 


A   1 3  2    l21 l22 0   0 1 u 23 
 3 2  4   l31 l32 l33   0 0 1 

4 1 1   l11 l11u12 l11u13 


A   1 3 2   l21 l21u12  l22 l21u13  l22 u 23 
 3 2 4   l31 l31u12  l32 l31u13  l32 u 23  l33 

Equating L.H.S and R.H.S. we get

l11u12  1 l11u13  1
l11  4 4u12  1 4u13  1
u12  1/ 4 u13  1/ 4

l21u12  l22  3 l21u13  l22 u23  2


l21  1 (1)(1/ 4)  l22  3 (1)(1/ 4)  ( 13 / 4)u23  2
l22  13 / 4 u23  9 /13

l31u12  l32  2 l31u13  l32 u23  l33  4


l31  3 (3)(1/ 4)  l32  2 (3)(1/ 4)  (5 / 4)(9 /13)  l33  4
l32  5 / 4 l33  73 /13

4 1 1  4 0 0  1 1/ 4 1/ 4 
 1 3 2    1 13 / 4 0   0 1 9 /13
  
 3 2 4   3 5 / 4 73 /13  0 0 1 

72
 x1  4
AX =B where X  x2 and B   4 
 
   
 x3   6 

(LU)X =B

L(UX) =B

 z1 
Put UX=Z where Z   z 2 
 
 z 3 

LZ = B

4 0 0   z1   4 
 1 13 / 4 0   z 2    4 

 3 5/4 73 /13  z3   6 

4z1 = 4

z1 –(13/4)z2 = 4

3z1+(5/4)z2-(73/13)z3=6

Solving above equations we get

z1 = 1, z2 = -12/13, z3 = -54/73

Now consider

UX = Z

 1 1/ 4 1/ 4   x1   1 
 0 1 9 /13  x    12 /13 
  2  
 0 0 1   x3   54 / 73

x1+(1/4)x2+(1/4)x3=1

x2+(9/13)x3= -12/13

x3= -54/73

Solving above equations we get

x1= 94/73, x2= -30/73, x3= -54/73

73
Example: Solve the system of equations using Dolittle’s method x  y  z  1 , 3 x  y  3 z  5 ,
x  2 y  5 z  10 .

Solution: The given system of equations is written as

x + y +z = 1, 3x + y-3z =5, x -2y-5z = 10

1 1 1  1 0 0   u11 u12 u13 


A   3 1 3    l21
 1 0   0 u 22 u 23 
1 2 5   l31 l32 1   0 0 u33 

1 1 1   u11 u12 u13 


A   3 1  3    l21u11 l21u12  u 22 l21u13  u 23 

1 2  5   l31u11 l31u12  l32 u 22 l31u13  l32 u 23  u33 

Equating L.H.S and R.H.S. we get

u11  1 u12  1 u13  1

l21u11  3 l21u12  u22  1 l21u13  u23  3


l21 (1)  3 (3)(1)  u22  1 (3)(1)  u23  3
l21  3 u22  2 u23  6

l31u11  1 l31u12  l32 u22  2 l31u13  l32 u23  u33  5


l31 (1)  1 (1)(1)  l32 (2)  2 (1)(1)  (3 / 2)( 6)  u33  5
l31  1 l32  3/ 2 u33  3

1 1 1  1 0 0  1 1 1
 3 1 3    3 1 0   0 2 6 
 
  
1 2 5  1 3 / 2 1   0 0 3 

x 1
AX =B where X  y and B   5 
 
   
 z  10 

(LU)X =B

L(UX) =B

74
 z1 
Put UX=Z where Z   z 2 
 
 z 3 

LZ = B

1 0 0   z1   1 
3 1 0   z 2    5 

1 3 / 2 1   z3  10 

 z1 = 1

3z1 + z2 = 5

z1+(3/2)z2+z3=10

Solving above equations we get

z1 = 1, z2 = 2, z3 = 6

Now consider

UX = Z

1 1 1   x  1 
0 2 6   y    2 

 0 0 3   z   6 

x + y + z =1

-2y-6z = 2

3z = 6

Solving above equations we get x = 6, y = -7, z= 2

75
Example: Solve the system of equations using Dolittle’s method

6x1-2x2 -4x3+4x4 = 2, 3x1-3x2 -6x3+x4= -4, -12x1+8x2 +21x3-8x4 = 8 , -6x1-10x3 +7x4 = 43.

Solution:

 6 2 4 4 1 0 0 0  u11 u12 u13 u14 


 3 3 6 1  l21 1 0 0  0
 u22 u23 u24 
Let A   
 12 8 21 8   l31 l32 1 0  0 0 u33 u34 
    
 6 0 10 7  l41 l42 l43 1  0 0 0 u44 

 6  2 4 4   u11 u12 u13 u14 


 3
  3 6 1  u11l21 u12 l21  u22 u13 l21  u23 u14 l21  u24 

A 
 12 8 21 8   u11l31 u12 l31  u22 l32 u13 l31  u23 l32  u33 u14 l31  u 24 l32  u34 
   
 6 0 10 7  u11l41 u12 l41  u 22 l42 u13 l41  u23 l42  u33 l43 u14 l41  u 24 l42  u34 l43  u44 
Equating L.H.S and R.H.S. we get

u11  6 u12  2 u13  4 u14  4

u11l21  3 u12 l21  u22  3 u13 l21  u23  6 u14 l21  u24  1
(6)l21  3 ( 2)(1/ 2)  u22  3 (4)(1/ 2)  u23  6 (4)(1/ 2)  u24  1
l21  1/ 2 u 22  2 u23  4 u24  1

u11l31  12 u12 l31  u22 l32  8 u13l31  u23l32  u33  21 u14 l31  u24 l32  u34  8
(6)l31  12 (2)(2)  (2)l32  8 (4)(2)  (4)(2)  u33  21 (4)(2)  (1)(2)  u34  8
l31  2 l32  2 u33  5 u34  2

u11l41  6
u12 l41  u22 l42  0 u13l41  u23l42  u33l43  10 u14 l41  u24 l42  u34 l43  u 44  7
(6)l41  6 (2)(1)  (2)l42  0 (4)(1)  (4)(1)  (5)l43  10 (4)( 1)  ( 1)(1)  ( 2)( 2)  u 44  7
l41  1 l42  1 l43  2 u44  8

 6 2 4 4   1 0 0 0 6 2 4 4 
 3 3 6 1  1/ 2 1 0 0 0 2 4 1
A 
 12 8 21 8  2 2 1 0   0 0 5 2 
    
 6 0 10 7   1 1 2 1 0 0 0 8 
 x1  2
x   4 
AX =B where X   2
and B   
 x3  8
   
 x4   43 

76
(LU)X =B

L(UX) =B

 z1 
Put UX=Z where Z   z 2 
 
 z3 
 
 z4 

LZ = B

 1 0 0 0   z1   2 
1/ 2 1
 0 0   z 2   4 

 2 2 1 0   z3   8 
    
 1 1 2 1   z 4   43 

 z1 = 2

(1/2)z1 + z2 = -4

-2z1 - 2z2+z3=8

-z1 +z2-2z3+z4=43

Solving above equations we get

z1 = 2, z2 = -5, z3 = 2, z4=54

Now consider

UX = Z

6 2 4 4   x1   2 
0 2 4 1  x   5
  2   
0 0 5 2   x3   2 
    
0 0 0 8   x4   54 

6x1-2x2-4x3+4x4=2

-2x2-4x3-x4=-5

5x3-2x4=2

8x4=54

77
Solving above equations we get

x1 = -107/24, x2 = -283/40, x3 = 31/10, x4 = 27/4

Examples:

1.Solve the system of equations using Dolittle’s method 4 x1  x2  x3  4 , x1  4 x2  2 x3  4 ,


3x1  2 x2  4 x3  6

2. Solve the system of equations using Dolittle’s method 10x  y  z  12 , 2x 10 y  z  13 ,


2x  2 y 10z  14 .

3. Solve the system of equations using Dolittle’s method x  2 y  3z  14 , 2x  3y  4z  20 ,


3x  4 y  z  14

4. Solve the system of equations using Crout’s method 3x  2y  7z  4 , 2x  3y  z  5 ,


3x  4y  z  7

3 2 1
Example: Find the inverse of the matrix A   2 3 2  using LU decomposition method,
 
 1 2 2 
taking uii  1 .

Solution:

 3 2 1   l11 0 0   1 u12 u13 


A   2 3 2    l21 l22 0   0 1 u 23 
 1 2 2   l31 l32 l33   0 0 1 

3 2 1   l11 l11u12 l11u13 


A   2 3 2    l21 l21u12  l22 l21u13  l22 u 23 
 1 2 2   l31 l31u12  l32 l31u13  l32 u 23  l33 

Equating L.H.S and R.H.S. we get

l11u12  2 l11u13  1
l11  3 3u12  2 3u13  1
2 1
u12  u13 
3 3

78
l21u12  l22  3 l21u13  l22u23  2
2 1 5
(2)    l22  3 (2)      u23  2
3 3  3
l21  2 4 5 2 4
l22  3    u23  2  
3 3 3 3
5 4
l22  u23 
3 5
l31u12  l32  2 l31u13  l32u23  l33  2
 2  1   4  4 
(1)    l32  2 (1)        l33  2
 3  3   3  5 
l31  1 2 1 8
l32  2  l33  2  
3 3 15
4 3
l32  l33 
3 5

3 2 1 3 0 0  1 2 / 3 1 / 3 
  
A  2 3 2  2 5 / 3 0   0 1 4 / 5 
 1 2 2   1 4 / 3 3 / 5   0 0 1 

3 0 0  1 2 / 3 1 / 3 
L   2 5 / 3 0 
 U   0 1 4 / 5 
 1 4 / 3 3 / 5  0 0 1 

 1/ 3 0 0   1 2 / 3 1 / 5 
L1   2 / 5 3 / 5 0  U 1   0 1 4 / 5 
 1/ 3 4 / 3 5 / 3  0 0 1 

A1  U 1L1

 1 2 / 3 1 / 5   1 / 3 0 0 
1
A  0 1  
4 / 5    2 / 5 3 / 5 0 
 0 0 1   1 / 3 4 / 3 5 / 3

1/ 3  4 / 15  1/ 15 0  6 /15  4 / 15 0  0  5 /15 


A   0  2 / 5  4 / 15
1
0  3 / 5  16 / 15 0  0  20 / 15
 0  0 1/ 3 004/3 0  0  5 / 3 

79
 2 / 3 2 / 3 1 / 3  3 2 1
A  2 / 3 5 / 3 4 / 3 A   2 3 2 

1 
   
 1/ 3 4 / 3 5 / 3   1 2 2 

Example: Show that LU decomposition method fails to solve the system of equation
x  y  z  2 , 2x  2 y  5z  3 , 3x  2 y  3z  6

Solution:

x  y  z  2 , 2x  2 y  5z  3 , 3x  2 y  3z  6 (1)

Taking lii  1

1 1 1   1 0 0  u11 u12 u13 


A   2 2 5   l21 1 0   0 u22 u 23 
 3 2 3  l31 l32 1   0 0 u33 

 1 1 1   u11 u12 u13 


A   2 2 5   l21u11 l21u12  u22 l21u13  u 23 

 3 2 3 l31u11 l31u12  l32u 22 l31u13  l32 u23  u33 

Equating L.H.S and R.H.S. we get

u11  1 u12  1 u13  1

l21u11  2 l21u12  u22  2 l21u13  u23  5


l21 (1)  2 (2)(1)  u22  2 (2)(1)  u23  5
l21  2 u22  0 u23  3

l31u11  1 l31u12  l32 u22  2


l31 (1)  1 (1)(1)  l32 (0)  2 l31u13  l32u23  u33  5
l31  1 l32  3 / 0

Therefore, LU decomposition method as the pivot u22  0 fails to solve the system of equation
(1).

Taking uii  1

80
 1 1 1   l11 0 0   1 u12 u13 
A   2 2 5    l21 l22 0   0 1 u 23 
 3 2 3   l31 l32 l33   0 0 1 

1 1 1   l11 l11u12 l11u13 


A   2 2 5    l21 l21u12  l22 l21u13  l22 u 23 
 3 2 3   l31 l31u12  l32 l31u13  l32 u 23  l33 

Equating L.H.S and R.H.S. we get

l11u12  1 l11u13  1
l11  1 1u12  1 1u13  1
u12  1 u13  1

l21u12  l22  2 l21u13  l22u23  5


l21  2 (2)1  l22  2 (2)(1)  0u23  5
l22  0 u23  3 / 0
l31  3

Therefore, LU decomposition method as the pivot l22  0 fails to solve the system of equation
(1).

Note: We note that the matrix A is not a positive definite and hence the LU decomposition is not
guaranteed.

Positive definite Matrix:

If A is any n×n matrix, let (r)A denote the r×r submatrix in the upper left corner of A; that is, (r)A
is the matrix obtained from A by deleting the last n−r rows and columns. The matrices (1)A, (2)A,
(3)
A, ..., (n)A = A are called the principal submatrices of A.

A square matrix is called positive definite if it is symmetric and all its eigenvalues λ are positive,
that is λ > 0.

The following conditions are equivalent for a symmetric n×n matrix A:

1. A is positive definite.

2. det((r)A) > 0 for each r = 1, 2, ..., n.

3. A = UTU where U is an upper triangular matrix with positive entries on the main diagonal.

81
1 1 1 
Example: If A   2 2 5 
 
 3 2 3

Then the determinant of principal submatrices of A are

1 1 0

1 1
 22  0
2 2

1 1 1
2 2 5 30
3 2 3

Therefore, the matrix A is not a positive definite.

Note:

(i)The method fails if any of the diagonal elements lii  0 (or) u ii  0 .

(ii) LU decomposition method guaranteed when A is positive definite.

82
Cholesky Method:

This method is also known as square root method. In this method if the coefficient matrix A is
symmetric and positive definite then matrix A can be decomposed as

A  LLT (1)

A  UU T (2)

where L is lower triangular matrix and U is upper triangular matrix.

The system of equations which has the form AX  B can be written as

LLT X  B (3)

Then the solution becomes

LZ  B (4)

Where LT X  Z (5)

The values zi , i  1, 2, 3, 4..... are obtained from equation (4) by forward substitution method, and
the values xi , i  1, 2,3, 4..... are obtained from equation (5) by back substitution method.

1
Alternatively, we can find only one inverse L and obtain

Z  L1 B

X   LT  Z
1

X   L 1  Z
T

Note: The inverse of A may be obtained from A  1   L 1 T L 1 .

Example: Solve x1  2 x2  3 x3  5 , 2 x1  8 x2  22 x3  6 , 3 x1  22 x2  82 x3  10 , using square


root method.

Solution: The given system of equation written in matrix form as AX = B (1)

1 2 3  x1   5 
where A   2    
8 22  , X  x2 , B   6 

  
 3 22 82   x3   10 

By Choleskey method we have A  LL


T

83
1 2 3   l11 0 0   l11 l21 l31 
A   2 8 22    l21 l22 0   0 l22 l32 
 3 22 82   l31 l32 l33   0 0 l33 

1 2 3   l11 l11l31 
2
l11l21
   
A  2 8 22  l21l11 l21  l22
2 2
l21l31  l22l32 
3 22 82  l31l11 l31l21  l32l22 l312  l322  l332 

Equating L.H.S and R.H.S. we get

l11l21  2 l11l31  3
l112  1  l11  1 1l21  2 1l31  3
l21  2 l31  3

l212  l222  8 l21l31  l22l32  22 l312  l322  l332  82


(2)2  l222  8  2   3   2  l32  22  32   82  l332  82
l222  4  l22  2 2l32  16  l32  8 l332  9  l33  3

1 0 0 1 2 3
L   2 2 0  LT   0 2 8 
 3 8 3   0 0 3

Consider,

LZ  B

 1 0 0   z1   5 
2 2 0  z    6 
  2  
 3 8 3   z3   10 

 z1  5 (2)

2 z1  2 z 2  6 (3)

3 z1  8 z2  3 z3  10 (4)

From (2) z1  5

From (3) 2(5)  2 z 2  6

84
2 z2  4  z2  2

From (4) 3  5   8  2   3z3  10

3 z3  9  z3  3

Now consider,

LT X  Z
1 2 3   x1   5 
0 2 8   x2    2 
  
 0 0 3   x3    3 

x1  2 x2  3 x3  5 (5)

2 x2  8 x3  2 (6)

3x3  3 (7)

From (7) x3  1

From (6) 2 x2  8  1  2

2 x2  6  x2  3

From (5) x1  2  3   3  1  5

 x1  2

Hence the solution of the given system (1) is x1  2, x2  3, x3  1 .

85
Solution of Tri-diagonal System of Equations (or) Thomas Algorithm

In tridiagonal system all the non-zero elements in the co-efficient matrix must be on the main
diagonal (or) just below and above the main diagonal.

The tridiagonal has the system of the form AX  B .

 1 1 0 0    0 0 0   x1   b1 
 2  2 0    0 0 0   x2   b2 
 2
0  3 3  3    0 0 0   x3   b3 
    
             (1)
             
    
0 0 0 0     n 1  n 1  n 1   xn 1  bn 1 
0 0 0 0    0 n  n   xn   bn 

To find the solution of this system we need to find the unknowns  x2 , x2 , x3 ,.........xn  from
T

equation (1)

1 x1   1 x2  b1 (2)

 2 x1   2 x2   2 x3  b2

---------------------------

---------------------------

 i xi 1  i xi   i xi 1  bi (3)

i  3,4,........n 1

 n xn 1   n xn  bn (4)

We seek the solution of the system in the form

xi 1  g i xi  hi (5)

i  1,2,3,4,........n 1

Here we need to find gi and hi , i  1,2,3,.....n 1to find xi 1 find xn from equation (4),

bn  n xn 1
xn   (6)
n n

86
From (5) we have xi 1  g i xi  hi , put i  1  n

xn  g n 1 xn 1  hn 1 (7)

Comparing (6) and (7), we have

n b
g n 1   and hn 1  n
n n

Using (3) and (5), we have

 i xi 1  i xi   i xi 1  bi

 i xi 1   i xi   i  g i x i  hi   bi

 i xi 1  i xi   i gi xi   i hi  bi

 i xi 1    i   i g i  xi   i hi  bi

  i   i g i  xi   i x i 1  bi   i hi

i b  h
xi   xi1  i i i
i   i gi i   i gi

xi  g i 1 xi 1  hi 1 , i  1,2,3,.....n 1

i b  h
where gi 1   , hi1  i i i
i   i gi i   i gi

From equation (2) we have

1 x1   1 x2  b1

 1 x1   1  g 1 x1  h1   b1 |Using (5)

  1   1 g 1  x1   1 h1  b1

  1   1 g 1  x1  b1   1 h1

b1  1h1
x1 
1   1g1

Thus we have the solution of the tridiagonal system of equations in the form

87
xi 1  g i xi  hi , i  1,2,3,4,........n 1 we get  x 2 , x3 ,......... xn  and

b1  1h1 i bi   i hi n b
x1  , gi 1   , hi1  , g n 1   and hn 1  n
1   1g1 i   i g i i   i gi n n

The process of finding the unknowns in this form is known as algorithms (or) tri-diagonal matrix
algorithm.

Thomas algorithm is a simplified form of Gauss elimination method that can be used to solve the
tridiagonal system of equations.

Examples of such matrices commonly arise in one dimensional diffusion problems and natural
cubic spline interpolation.

 2 1 0 0   x1   1 
2 3 1 0  x  2
Example: Solve the equation    2   
 0 1 4 2   x3   3 
    
 0 0 1 3   x4   4 

Solution: Comparing the coefficient matrix with the general coefficient matrix of the tridiagonal
system

2 1 0 0   1 1 0 0
2 3 1 0   2 2 2 0 
  and n  4, i  1,2,3
0 1 4 2  0 3 3 3 
   
0 0 1 3  0 0 4 4 

n  1
gn1    g3   4  
n 4 3

bn b4 4
hn1   h3  
n 4 3

i
gi 1  
i   i g i

3 1 1 3
For i  3 g2     
3   3 g3 4  2(1/ 3) 10 / 3 10

3
 g2  
10

88
bi   i hi
hi1 
i   i gi

b3   3h3 3  2  4 / 3 1/ 3 1
For i  3 , h2    
3   3 g3 4  2(1/ 3) 10 / 3 10

1
 h2 
10

2 2 2 20
For i  2 g1     
 2   2 g2 3  1(3 /10) 27 /10 27

20
 g1  
27

b2   2 h2 2 11/10  19 /10 19
For i  2 , h1    
2   2 g2 3  1(3 /10) 27 /10 27

19
 h1 
27

b1   1h1 1  1(19 / 27) 8 / 27 4


x1    
1   1 g1 2  1(20 / 27) 34 / 27 17

4
x1 
17

xi 1  g i xi  hi , i  1,2,3

 20  4   19  9
For i  1 , x2  g1x1  h1         
 27  17   27  17

9
 x2 
17

 3  9   1  1
For i  2 , x3  g2 x2  h2          
 10  17   10  17

1
 x3  
17

89
 1  1   4  23
For i  3 , x4  g3 x3  h3        
 3  17   3  17

23
 x4 
17
T
 4 9 1 23 
Hence the solution is  , ,  ,  .
 17 17 17 17 

 4 1 0   x1   48 
Example: Solve the system of equations  1 4 1   x2    24 
    
 0 1 4   x3   48 

Solution: Comparing the coefficient matrix with the general coefficient matrix of the tridiagonal
system

4 1 0   1 1 0
1
 4 1    2 2  2  and n  3, i  1,2
 0 1 4   0 3  3 

n  1
gn1    g2   3  
n 3 4

bn b3 48
hn1   h2    12
n 3 4

i
gi 1  
i   i g i

2 1 1 4
For i  2 g1     
2   2 g2 4  1(1/ 4) 15 / 4 15

4
 g1  
15

bi   i hi
hi1 
i   i gi

b2   2 h2 24 112 12 16
For i  2 , h1    
2   2 g2 4  1(1/ 4) 15 / 4 5

90
16
 h1 
5

b1   1h1 48  1(16 / 5) 224 / 5


x1     12
1   1 g1 4  1(4 /15) 56 /15

x1  12

xi 1  g i xi  hi , i  1, 2

 4  16   16   16 
For i  1 , x2  g1 x1  h1     12            0
 15  5  5 5

 x2  0

 1 
For i  2 , x3  g2 x2  h2      0  12   12
 40 

 x3  12

Hence the solution is 12, 0,12 T .

 3 1 0   x1  6 
Example: Solve the equation  1 3 1   x2    4  using tri diagonal system method
    
 0 1 3   x3   6 

Solution: Comparing the coefficient matrix with the general coefficient matrix of the tridiagonal
system

3 1 0  1 1 0
1 3 1    2  2  and n  3, i  1,2
   2
 0 1 3   0 3  3 

n  1
gn1    g2   3  
n 3 3

bn b3 6
hn1   h2   2
n 3 3

i
gi 1  
i   i g i

91
2 1 1 3
For i  2 g1     
2   2 g2 3  1(1/ 3) 8/ 3 8

3
 g1  
8

bi   i hi
hi1 
i   i gi

b2   2h2 4 1 2 2 6 3
For i  2 , h1     
2   2 g2 3  1(1/ 3) 8 / 3 8 4

3
 h1 
4

b1   1h1 6 1(3 / 4) 21/ 4


x1    2
1  1 g1 3  1(3 / 8) 21/ 8

x1  2

xi 1  g i xi  hi , i  1, 2

 3 3  3 3
For i  1 , x2  g1 x1  h1      2             0
 8 4  4 4

 x2  0

 1
For i  2 , x3  g2 x2  h2      0   2  2
 3

 x3  2

Hence the solution is  2, 0, 2 T .

3 1 0 0   x1   2 
2 4 2 0   x2   2 
Example: Solve the equation  
0 1 3 2   x3   11 
    
0 0 4 5   x4   23

92
Iterative method:

Iterative method is that method in which we assume the initial approximation to the solution and
obtain better and better solution with desired degree of accuracy through number of iterations.
Now we should discuss some iterative methods called

(i)Gauss - Jacobi method

(ii) Gauss - Seidel Method

Gauss - Jacobi method

Consider the system of equations

a11 x1  a12 x2  a13 x3        a1n xn  b1 


a21 x1  a22 x2  a23 x3        a2 n xn  b2 
a31 x1  a32 x2  a33 x3        a3n xn  b3  (1)

 
 

an1 x1  a n 2 x2  an 3 x3        ann xn  bn 

Provided all diagonal elements are nonzero, check for dominancy

a11  a12  a13  a14       a1 n

a 22  a 21  a 23  a 24       a 2 n

-----------------------------------------

-----------------------------------------

a nn  a n 1  a n 2  a n 3       a n 1 n

Equation (1) can be written as

1 
x1   b1  a12 x2  a13 x3        a1n xn  
a11

1 
x2   b2  a21x1  a23 x3        a2 n xn  
a22

1  (2)
x3   b3  a31 x1  a32 x2        a3n xn  
a33 
 

 
1 
xn   bn  an1 x1  an 2 x2        ann1xn1 
ann 

93
Given the initial approximation  x1( 0 ) , x 2( 0 ) , x3( 0 ) ,............, x n( 0 ) 

First approximation:

1
x1(1) 
a11
 b1  a12 x2(0)  a13 x3(0)        a1n xn(0) 

1
x2(1) 
a22
 b2  a21x1(0)  a23 x3(0)        a2n xn(0) 

1
x3(1) 
a33
 b3  a31 x1(0)  a32 x2(0)        a3n xn(0) 

---------------------------------------------------------

---------------------------------------------------------

1
xn(1) 
ann
 bn  an1 x1(0)  an 2 x2(0)        ann1 xn(0)1 

Second approximation:

1
x1(2) 
a11
 b1  a12 x2(1)  a13 x3(1)        a1n xn(1) 

1
x2(2) 
a22
 b2  a21 x1(1)  a23 x3(1)        a2 n xn(1) 

1
x3(2) 
a33
 b3  a31 x1(1)  a32 x2(1)        a3n xn(1) 

---------------------------------------------------------

---------------------------------------------------------

1
xn(2) 
ann
 bn  an1 x1(1)  an 2 x2(1)        ann1 xn(1)1 

Proceeding this way we obtain third approximation, fourth approximation till we get desired
accuracy.

This method is also called method of simultaneous displacement.

94
Gauss – Seidel iterative method:

This method is a modification of Gauss-Jacobi method and gives faster convergence compare to
Gauss-Jacobi method.

Let us consider the system of equation (1) on which a11  0 and consider the equation (2) with
initial approximation  x1( 0 ) , x 2( 0 ) , x3( 0 ) ,............, x n( 0 ) 

First approximation:

1
x1(1) 
a11
 b1  a12 x2(0)  a13 x3(0)        a1n xn(0) 

1
x2(1) 
a22
 b2  a21 x1(1)  a23 x3(0)        a2n xn(0) 

1
x3(1) 
a33
 b3  a31 x1(1)  a32 x2(1)        a3n xn(0) 

---------------------------------------------------------

---------------------------------------------------------

1
xn(1) 
ann
 bn  an1 x1(1)  an 2 x2(1)        ann1 xn(1)1 

Second approximation:

1
x1(2)   b  a x(1)  a13 x3(1)        a1n xn(1) 
a11 1 12 2

1
x2(2)  b  a x(2)  a23 x3(1)        a2n xn(1) 
a22 2 21 1

1
x3(2)   b  a x(2)  a32 x2(2)        a3n xn(1) 
a33 3 31 1

---------------------------------------------------------

---------------------------------------------------------

1
xn(2)   b  a x(2)  an2 x2(2)        ann1xn(2)1 
ann n n1 1

95
Proceeding in this way we obtain third approximation, fourth approximation till we get desired
accuracy.

The Gauss – Seidel iterative method is also called method of successive displacement.

Note: This method cannot be applied to any system of equations. It is applicable only when the
system is diagonally dominant.

Example: Solve the following system of equations by using Gauss-Jacobi and Gauss - Seidel
method 27x  6 y  z  85,6x 15 y  2z  72, x  y  54z  110 taking the initial approximation
x (0)  0, y (0)  0, z (0)  0

Solution: To check diagonal dominancy

27  6  1 , 15  6  2 , 54  1  1

The given system can be written as

1
x 85  6 y  z
27

1
y 72  6 x  2 z
15

1
z 110  x  y
54

Gauss-Jacobi Method:

We start with the initial approximation

x (0)  0, y (0)  0, z (0)  0

The first approximations are as follows

1 1 85
x (1) 
27
85  6 y (0)  z (0)  
27
85  0  0   3.1481
27

1 1 72
y (1) 
15
72  6 x (0)  2 z (0)   72  6(0)  2(0) 
15 15
 4.8

1 1 110
z (1) 
54
110  x (0)  y (0)   110  0  0 
54 54
 2.037

The second approximations are as follows

96
1 1
x (2) 
27
85  6 y (1)  z (1)  
27
85  6(4.8)  2.037  2.1569

1 1
y ( 2) 
15
72  6 x (1)  2 z (1)   72  6(3.1481)  2(2.037)  3.2691
15

1 1
z (2) 
54
110  x (1)  y (1)   110  3.1481  4.8  1.8898
54

The third approximations are as follows

1 1
x (3) 
27
85  6 y (2)  z (2)  
27
85  6(3.2691)  1.8898  2.4916

1 1
y (3) 
15
72  6 x (2)  2 z (2)   72  6(2.1569)  2(1.8898)  3.6852
15

1 1
z (3) 
54
110  x (2)  y (2)   110  2.1569  3.2691  1.9365
54

The fourth approximations are as follows

1 1
x (4) 
27
85  6 y (3)  z (3)  
27
85  6(3.6852)  1.9365  2.4009

1 1
y (4) 
15
72  6 x (3)  2 z (3)   72  6(2.4916)  2(1.9365)  3.5451
15

1 1
z (4) 
54
110  x (3)  y (3)   110  2.4916  3.6852  1.9226
54

The fifth approximations are as follows

1 1
x (5) 
27
85  6 y (4)  z (4)  
27
85  6(3.5451)  1.9226  2.4315

1 1
y (5) 
15
72  6 x (4)  2 z (4)   72  6(2.4009)  2(1.9226)  3.5832
15

1 1
z (5) 
54
110  x (4)  y (4)   110  2.4009  3.5451  1.9269
54

Hence after five iterations the approximate solution of the given system of equations is

x  2.4315, y  3.5832, z  1.9269

97
Gauss-Seidel Method:

We start with the initial approximation

x (0)  0, y (0)  0, z (0)  0

The first approximations are as follows

1 1 85
x (1) 
27
85  6 y (0)  z (0)  
27
85  0  0   3.1481
27

1 1 53.1114
y (1) 
15
72  6 x (1)  2 z (0)   72  6(3.1481)  2(0) 
15 15
 3.5408

1 1 103.3111
z (1) 
54
110  x (1)  y (1)  
54
110  3.1481  3.5408 
54
 1.9132

The second approximations are as follows

1 1 65.6684
x (2) 
27
85  6 y (1)  z (1)  
27
85  6(3.5408)  1.9132 
27
 2.4322

1 1 53.5804
y (2) 
15
72  6 x (2)  2 z (1)   72  6(2.4322)  2(1.9132) 
15 15
 3.5720

1 1 103.9958
z (2) 
54
110  x (2)  y (2)  
54
110  2.4322  3.5720 
54
 1.9258

The third approximations are as follows

1 1 65.4938
x (3) 
27
85  6 y (2)  z (2)  
27
85  6(3.5720)  1.9258 
27
 2.4257

1 1 53.5942
y (3) 
15
72  6 x (3)  2 z (2)   72  6(2.4257)  2(1.9258) 
15 15
 3.5729

1 1 104.0014
z (3) 
54
110  x (3)  y (3)  
54
110  2.4257  3.5729 
54
 1.9259

Hence after three iterations the approximate solution of the given system of equations is

x  2.4257, y  3.5729, z  1.9259

98
Example: Solve the following system of equations by using Gauss – Jacobi and Gauss - Seidel
method 10x + y + z = 12, x + 10y + z = 12, x + y + 10z = 12

Solution: To check diagonal dominancy

10  1  1 , 10  1  1 , 10  1  1

The given system can be written as

1
x 12  y  z
10

1
y 12  x  z
10

1
z 12  x  y
10

Gauss-Jacobi Method:

We start with the initial approximation

x (0)  0, y (0)  0, z (0)  0

The first approximations are as follows

1 1 12
x (1) 
10
12  y (0)  z (0 )   12  0  0 
10 10
 1.2

1 1 12
y (1) 
10
12  x (0)  z (0)   12  0  0 
10 10
 1.2

1 1 12
z (1) 
10
12  x (0)  y (0)   12  0  0 
10 10
 1.2

The second approximations are as follows

1 1 9.6
x (2) 
10
12  y (1)  z (1)   12  1.2  1.2 
10 10
 0.96

1 1 9.6
y (2) 
10
12  x (1)  z (1)   12  1.2  1.2 
10 10
 0.96

1 1 9.6
z (2) 
10
12  x (1)  y (1)   12  1.2  1.2 
10 10
 0.96

99
The third approximations are as follows

1 1 10.08
x (3) 
10
12  y (2)  z (2)   12  0.96  0.96 
10 10
 1.008  1

1 1 10.08
y (3) 
10
12  x (2)  z (2)   12  0.96  0.96 
10 10
 1.008  1

1 1 10.08
z (3) 
10
12  x (2)  y (2)   12  0.96  0.96 
10 10
 1.008  1

The fourth approximations are as follows

1 1 10
x (4) 
10
12  y (3)  z (3)   12  1  1 
10 10
1

1 1 10
y (3) 
10
12  x (2)  z (2)   12  1  1 
10 10
1

1 1 10
z (3) 
10
12  x (2)  y (2 )   12  1  1 
10 10
1

Hence after three iterations the approximate solution of the given system of equations is

x  1, y  1, z  1

Gauss-Seidel Method:

We start with the initial approximation

x (0)  0, y (0)  0, z (0)  0

The first approximations are as follows

1 1 12
x (1) 
10
12  y (0)  z (0 )   12  0  0 
10 10
 1.2

1 1 10.8
y (1) 
10
12  x (1)  z (0)   12  1.2  0 
10 10
 1.08

1 1 9.72
z (1) 
10
12  x (1)  y (1)   12  1.2  1.08 
10 10
 0.972

100
The second approximations are as follows

1 1 9.948
x (2) 
10
12  y (1)  z (1)   12  1.08  0.972 
10 10
 0.9948

1 1 10.0332
y (2) 
10
12  x (2)  z (1)   12  0.9948  0.972 
10 10
 1.00332

1 1 10.00188
z (2) 
10
12  x (2)  y (2)   12  0.9948  1.00332 
10 10
 1.000188

The third approximations are as follows

1 1 9.9965
x (3) 
10
12  y (2)  z (2)   12  1.00332  1.000188 
10 10
 0.9965

1 1 10.003312
y (3) 
10
12  x (3)  z (2)   12  0.9965  1.000188 
10 10
 1.0003312

1 1 10.00317
z (3) 
10
12  x (3)  y (3)   12  0.9965  1.0003312 
10 10
 1.000317

Hence after three iterations the approximate solution of the given system of equations is

x  0.9965, y  1.0003312, z  1.000317

Example: Solve the following system of equations by using Gauss Jacobi and Gauss - Seidel
method 20x + y - 2z = 17, 3x + 20y - z = -18, 2x - 3y + 20z = 25

Solution: To check diagonal dominancy

10  1  2 , 10  3  1 , 10  2  3

The given system can be written as

1
x 17  y  2 z
20

1
y 18  3 x  z
20

1
z 25  2 x  3 y
20

101
Gauss-Jacobi Method:

We start with the initial approximation

x (0)  0, y (0)  0, z (0)  0

The first approximations are as follows

1 1 17
x (1) 
20
17  y (0)  2 z (0)  
20
17  0  0   0.85
20

1 1 18
y (1) 
20
 18  3 x (0)  z (0)  
20
18  3(0)  0    0.9
20

1 1 25
z (1) 
20
 25  2 x (0)  3 y (0)   25  2(0)  3(0) 
20 20
 1.25

The second approximations are as follows

1 1
x (2) 
20
17  y (1)  2 z (1)  
20
17  ( 0.9)  2(1.25)  1.02

1 1
y (2) 
20
 18  3 x (1)  z (1)  
20
18  3(0.85)  1.25  0.965

1 1
z (2) 
20
25  2 x (1)  3 y (1)  
20
25  2(0.85)  3( 0.9)  1.03

The third approximations are as follows

1 1
x (3) 
20
17  y (2)  2 z (2)   17  ( 0.965)  2(1.03)  1.0012  1
20

1 1
y (3) 
20
 18  3 x (2)  z (2)   18  3(1.02)  1..3  0.988  1
20

1 1
z (3) 
20
 25  2 x (2)  3 y (2)  
20
25  2(1.02)  3( 0.965)  1.0032  1

Hence after three iterations the approximate solution of the given system of equations is

x  1, y  1, z  1

102
Gauss-Seidel Method:

We start with the initial approximation

x (0)  0, y (0)  0, z (0)  0

The first approximations are as follows

1 1 17
x (1) 
20
17  y (0)  2 z (0)  
20
17  0  0   0.85
20

1 1 20.55
y (1) 
20
 18  3 x (1)  z (0)  
20
18  3(0.85)  0  
20
 1.0275

1 1 20.2175
z (1) 
20
25  2 x (1)  3 y (1)  
20
25  2(0,85)  3( 1.0275) 
20
 1.0109

The second approximations are as follows

1 1 20.0493
x (2) 
20
17  y (1)  2 z (1)  
20
17  (1.0275)  2(1.0109) 
20
 1.0025

1 1 19.9966
y (2) 
20
 18  3 x (2)  z (1)  
20
18  3(1.0025)  1.0109  
20
 0.9998

1 1 19.9956
z (2) 
20
25  2 x (2)  3 y (2)  
20
25  2(1.0025)  3( 0.9998) 
20
 0.9998

The third approximations are as follows

1 1 19.9994
x (3) 
20
17  y (2)  2 z (2)  
20
17  ( 0.9998)  2(0.9998) 
20
 0.99997  1

1 1 20.0002
y (3) 
20
18  3 x (3)  z (2)  
20
18  3(1)  0.9998  
20
 1.00001  1

1 1 20
z (3) 
20
 25  2 x (3)  3 y (3)  
20
25  2(1)  3(1)   1
20

Hence after three iterations the approximate solution of the given system of equations is

x  1, y  1, z  1

103
Example: Solve the following system of equation using Gauss-Jacobi and Gauss - Seidel
method 4 x1  x2  x3  2, x1  3 x2  2 x3  6, x1  2 x2  3 x3  4 , taking initial condition
x1( 0)  0.5, x2( 0)  0.5, x3( 0)  0.5

Solution: To check diagonal dominancy

4  1  1, 3  1  2 , 3  1  2

The given system can be written as

1
x1  2  x2  x3 
4

1
x2  6  x1  2 x3 
3

1
x3  4  x1  2 x2 
3

Gauss-Jacobi Method:

We start with the initial approximation

x1( 0)  0.5, x2( 0)  0.5, x3( 0)  0.5

The first approximations are as follows

1 1
x1(1) 
4
 2  x2(0)  x3(0)   2  0.5  0.5  0.25
4

1 1
x2(1) 
3
6  x1(0)  2 x3(0)   6  0.5  2(0.5)  1.5
3

1 1
x3(1) 
3
4  x1(0)  2 x2(0)   4  0.5  2(0.5)  0.833  0.84
3

The second approximations are as follows

1 1
x1(2) 
4
 2  x2(1)  x3(1)   2  1.5  0.84  0.085
4

1 1
x2(2) 
3
6  x1(1)  2 x3(1)   6  0.25  2(0.84)  1.356
3

1 1
x3(2) 
3
 4  x1(1)  2 x2(1)   4  0.25  2(1.5)  0.25
3
104
The third approximations are as follows

1 1
x1(3) 
4
2  x2(2)  x3(2)   2  1.356  0.25  0.0985
4

1 1
x2(3) 
3
6  x1(2)  2 x3(2)   6  0.085  2(0.25)  1.86  1.9
3

1 1
x3(3) 
3
4  x1(2)  2 x2(2)   4  0.085  2(1.356)  0.457  0.46
3

The fourth approximations are as follows

1 1
x1(4) 
4
 2  x2(3)  x3(3)   2  1.9  0.46  0.09
4

1 1
x2(4) 
3
6  x1(3)  2 x3(3)   6  0.0985  2(0.46)  1.66  1.9
3

1 1
x3(4) 
3
 4  x1(3)  2 x2(3)   4  0.0985  2(1.9)  0.0338
3

The fifth approximations are as follows

1 1
x1(5) 
4
 2  x2(4)  x3(4)   2  1.66  0.0338  0.01
4

1 1
x2(5) 
3
6  x1(4)  2 x3(4)   6  ( 0.09)  2(0.0338)  2
3

1 1
x3(5) 
3
4  x1(4)  2 x2(4)   4  ( 0.09)  2(1.66)  0.25
3

The sixth approximations are as follows

1 1
x1(6) 
4
2  x2(5)  x3(5)   2  2  0.25  0.0625  0
4

1 1
x2(6) 
3
6  x1(5)  2 x3(5)   6  0.01  2(0.25)  1.83  2
3

1 1
x3(6) 
3
 4  x1(5)  2 x2(5)   4  0.09  2(2)  0.0033  0
3

Hence after six iterations the approximate solution of the given system of equations is
x1  0, x2  2, x3  0

105
Gauss-Seidel Method:

We start with the initial approximation

x1( 0)  0.5, x2( 0)  0.5, x3( 0)  0.5

The first approximations are as follows

1 1
x1(1) 
4
 2  x2(0)  x3(0)   2  0.5  0.5  0.25
4

1 1
x2(1) 
3
6  x1(1)  2 x3(0)   6  0.25  2(0.5)  1.5833
3

1 1
x3(1) 
3
4  x1(1)  2 x2(1)   4  0.25  2(1.5833)  0.1945
3

The second approximations are as follows

1 1
x1(2) 
4
2  x2(1)  x3(1)   2  1.5833  0.1945  0.0555
4

1 1
x2(2) 
3
6  x1(2)  2 x3(1)   6  0.0555  2(0.1945)  1.8518
3

1 1
x3(2) 
3
 4  x1(2)  2 x2(2)   4  0.0555  2(1.8518)  0.0803
3

The third approximations are as follows

1 1
x1(3) 
4
 2  x2(2)  x3(2)   2  1.8518  0.0803  0.017
4

1 1
x2(3) 
3
6  x1(3)  2 x3( 2)   6  0.017  2(0.0803)  1.9408
3

1 1
x3(3) 
3
 4  x1(3)  2 x2(3)   4  0.017  2(1.9408)  0.0338
3

The fourth approximations are as follows

1 1
x1(4) 
4
 2  x2(3)  x3(3)   2  1.9408  0.0338  0.00635
4

1 1
x2(4) 
3
6  x1( 4)  2 x3(3)   6  0.00635  2(0.0338)  1.9726
3

106
1 1
x3(4) 
3
4  x1(4)  2 x2(4)   4  0.00635  2(1.9726)  0.01615
3

Hence after fourth iterations the approximate solution of the given system of equations is

x1  0.00635  0, x2  1.9726  2, x3  0.01615  0

Example: Solve the following system of equations by using Gauss-Jacobi and Gauss - Seidel
method 2x + y + 6z = 9, 8x + 3y + 2z = 13, x + 5y + z = 7

Solution: The given system can be written as

8x + 3y + 2z = 13, x + 5y + z = 7, 2x + y + 6z = 9

To check diagonal dominancy

8  3  2 , 5  1  1, 6  2  1

The given system can be written as

1
x 13  3 y  2 z
8

1
y 7  x  z
5

1
z 9  2 x  y
6

Gauss-Jacobi Method:

We start with the initial approximation


x (0)  0, y (0)  0, z (0)  0

The first approximations are as follows

1 1 13
x (1) 
8
13  3 y (0)  2 z (0)   13  3(0)  2(0) 
8 8
 1.625

1 1 7
y (1) 
5
7  x (0)  z (0)   7  0  0   1.4
5 5

1 1 9
z (1) 
6
9  2 x (0)  y (0)   9  2(0)  0   1.5
6 6

107
The second approximations are as follows

1 1
x (2) 
8
13  3 y (1)  2 z (1)   13  3(1.4)  2(1.5)  0.725
8

1 1
y (2) 
5
7  x (1)  z (1)   7  1.625  1.5  0.775
5

1 1
z (2) 
6
9  2 x (1)  y (1)   9  2(1.625)  1.4  0.725
6

The third approximations are as follows

1 1
x (3) 
8
13  3 y (2)  2 z (2)   13  3(0.775)  2(0.725)  1.1531
8

1 1
y (3) 
5
7  x (2)  z (2)   7  0.725  0.725  1.11
5

1 1
z (3) 
6
9  2 x (2)  y (2)   9  2(0.725)  0.775  1.1291
6

The fourth approximations are as follows

1 1
x (4) 
8
13  3 y (3)  2 z (3)   13  3(1.11)  2(1.1091)  0.9314
8

1 1
y (4) 
5
7  x (3)  z (3)   7  1.1531  1.1291  0.9435
5

1 1
z (4) 
6
9  2 x (3)  y (3)   9  2(1.1531)  1.11  0.9306
6

Hence after three iterations the approximate solution of the given system of equations is

x  0.9314, y  0.9435, z  0.9306

Gauss-Seidel Method:

We start with the initial approximation


x (0)  0, y (0)  0, z (0)  0

The first approximations are as follows

1 1 13
x (1) 
8
13  3 y (0)  2 z (0)   13  3(0)  2(0) 
8 8
 1.625

108
1 1 5.375
y (1) 
5
7  x (1)  z (0)   7  1.625  0 
5 5
 1.075

1 1 4.675
z (1) 
6
9  2 x (1)  y (1)   9  2(1.625)  1.075 
6 6
 0.7791

The second approximations are as follows

1 1 8.2168
x (2) 
8
13  3 y (1)  2 z (1)   13  3(1.075)  2(0.7791) 
8 8
 1.0271

1 1 5.1938
y (2) 
5
7  x (2)  z (1)   7  1.0271  0.7791 
5 5
 1.0388

1 1 5.907
z (2) 
6
9  2 x (2)  y (2)   9  2(1.0271)  1.0388 
6 6
 0.9845

The third approximations are as follows

1 1 7.9146
x (3) 
8
13  3 y (2)  2 z (2)   13  3(1.0388)  2(0.9845) 
8 8
 0.9893

1 1 5.0261
y (3) 
5
7  x (3)  z (2)   7  0.9893  0.9846 
5 5
 1.0052

1 1 6.0162
z (3) 
6
9  2 x (3)  y (3)   9  2(0.9893)  1.0052 
6 6
 1.0027

Hence after three iterations the approximate solution of the given system of equations is

x  0.9893, y  1.0052, z  1.0027

Solve the following system of equations using Gauss-Jacobi and Gauss - Seidel method

(1) 28x + 4y - z = 32, x + 3y + 10z = 24, 2x + 17y + 4z = 35

(2) 10x + y + z = 12, 2x + 10y + z = 13, 2x + 2y + 10z = 14

(3) 83x + 11y - 4z = 95, 7x + 52y + 13z = 104, 3x + 8y + 29z = 71

(4) 5x + 2y + z = 12, x + 4y + 2z = 15, x + 2y + 5z = 20

109
Gauss-Jacobi method error analysis

Gauss-Jacobi method can be written in matrix form as

X ( k 1)   D 1 ( L  U ) X ( k )  D 1b (1)

k  0,1,2,3......

L and U are lower and upper triangular matrices with zero diagonal entries, D is diagonal matrix
such that A = L + D + U.

Equation (1) can be written as

X ( k 1)  X ( k )  X ( k )  D 1 ( L  U ) X ( k )  D 1b

X ( k 1)  X ( k )  X ( k )  I  D 1 ( L  U )  D 1b

X ( k 1)  X ( k )  X ( k ) D 1  D  ( L  U )  D 1b

X (k 1)  X (k )  X (k ) D1 A  D1b

X (k 1)  X (k )  D1 b  AX (k ) 

X (k1)  X (k)  D1r(k)

Where r
(k )
 b  AX (k ) =residual error

X (k1)  X (k )  D1r(k)
 ( k )  D 1 r ( k )

D ( k )  r ( k )

where  ( k )  X ( k 1)  X ( k ) is the error in the approximation.

We solve for  (k ) and find X ( k 1)  X ( k )   ( k ) these equations describe the Gauss-Jacobi method
in error format.

110
Gauss-Seidel method error analysis

Gauss-Seidel method can be written in matrix form as

( D  L ) X ( k 1)  UX ( k )  b (1)

X ( k 1)  ( D  L) 1UX ( k )  ( D  L)1 b

k  0,1,2,3......

Equation (1) can be written as

X ( k 1)  X ( k )  X ( k )  ( D  L ) 1UX ( k )  ( D  L) 1 b

X ( k 1)  X ( k )  X ( k )  I  ( D  L )  1U   ( D  L ) 1 b

X ( k 1)  X ( k )  X ( k ) ( D  L ) 1 ( D  L )  U   ( D  L ) 1 b

X ( k 1)  X ( k )  ( D  L) 1 AX ( k )  ( D  L) 1 b

X (k 1)  X (k )  (D  L)1 b  AX (k ) 

X ( k 1)  X ( k )  ( D  L) 1 r ( k )

Where r
(k )
 b  AX (k ) = residual error

X ( k 1)  X ( k )  ( D  L)1 r ( k )

 ( k )  ( D  L ) 1 r ( k )

( D  L ) ( k )  r ( k )

Where  ( k )  X ( k 1)  X ( k )

Solve this for  (k ) and then find X ( k 1)  X ( k )   ( k ) , this equation describes the Gauss-Seidel
method in an error format.

111
Gauss-Jacobi method error analysis

Gauss-Jacobi method can be written in matrix form as

X ( k 1)   D 1 ( L  U ) X ( k )  D 1b (1)

k  0,1,2,3......

L and U are lower and upper triangular matrices with zero diagonal entries, D is diagonal matrix
such that A = L + D + U.

Equation (1) can be written as

X ( k 1)  X ( k )  X ( k )  D 1 ( L  U ) X ( k )  D 1b

X ( k 1)  X ( k )   I  D 1 ( L  U ) X ( k )  D 1b

X ( k 1)  X ( k )  D 1  D  ( L  U ) X ( k )  D 1b

X (k 1)  X (k )  D1 AX (k )  D1b

X (k 1)  X (k )  D1 b  AX (k ) 

X (k1)  X (k)  D1r(k)

Where r
(k )
 b  AX (k ) =residual error

X (k1)  X (k )  D1r(k)
 ( k )  D 1 r ( k )

D ( k )  r ( k )

where  ( k )  X ( k 1)  X ( k ) is the error in the approximation.

We solve for  (k ) and find X ( k 1)  X ( k )   ( k ) these equations describe the Gauss-Jacobi method
in error format.

110
Gauss-Seidel method error analysis

Gauss-Seidel method can be written in matrix form as

( D  L ) X ( k 1)  UX ( k )  b (1)

X ( k 1)  ( D  L) 1UX ( k )  ( D  L)1 b

k  0,1,2,3......

Equation (1) can be written as

X ( k 1)  X ( k )  X ( k )  ( D  L ) 1UX ( k )  ( D  L) 1 b

X ( k 1)  X ( k )   I  ( D  L )  1U  X ( k )  ( D  L ) 1 b

X ( k 1)  X ( k )  ( D  L ) 1 ( D  L )  U  X ( k )  ( D  L ) 1 b

X ( k 1)  X ( k )  ( D  L) 1 AX ( k )  ( D  L) 1 b

X (k 1)  X (k )  (D  L)1 b  AX (k ) 

X ( k 1)  X ( k )  ( D  L) 1 r ( k )

Where r
(k )
 b  AX (k ) = residual error

X ( k 1)  X ( k )  ( D  L)1 r ( k )

 ( k )  ( D  L ) 1 r ( k )

( D  L ) ( k )  r ( k )

Where  ( k )  X ( k 1)  X ( k )

Solve this for  (k ) and then find X ( k 1)  X ( k )   ( k ) , this equation describes the Gauss-Seidel
method in an error format.

111

You might also like