You are on page 1of 35

Unit-V

Numerical solutions of Algebraic and Transcendental Equations:

1.Theorem : If f(x) is continuous in the closed internal [a, b] and f(a) are of
opposite signs, then there is at least one real root  of the equation f(x) = 0 such
that a << b. If further f(x) is differentiable in the open interval (a, b) and either
f’(x) < 0 or f’(x) > 0 in (a, b) then f(x) is strictly monotonic in [a, b] and the
root  is unique.

Properties of equation:

(i) If f(a) and f(b) have opposite signs then one root of f(x) = 0 lies between a
and b.
(ii) Every equation of an odd degree has at least one real root whose sign is
opposite to that of its last term.
(iii) Every equation of an even degree with last term negative has at least a pair
of real roots one positive and other negative.
Regula falsi method:

Let f(x) = 0 be the given equation.

(i) Find two number a and b such that f(a) and f(b) are of different signs. Then
the root lies between a and b.
(ii) The first approximation to the root is given by
af(b)  bf(a)
x1 
ba

(iii) If f(x1) and f(a) are of opposite signs, then the actual root lies between x1 and
a. Now replacing b by x1 and keeping a as it is we get the next closer
approximation x2 to the actual root.
(iv) This procedure is repeated till the root is found to be desired degree of
accuracy.

Order of convergence:

Let x0, x1… Xn…. Be a sequence which converge to a number, and set en=  - xn.
en 1
If there exists a number p and a constant C  0 such that lim  C , then P is
n en p

called the order of convergence and C is known as the asymptotic error constant of
the sequence.
5.1. Solve for a positive root of x3−4x +1 = 0 by Regula Falsi Method.

Solution:

Let ( )= x3−4x +1 = 0

(0)= 1= +ve

(1) = -2 = - ve

The root lies between 0 and 1.

Iteration: 1

Here a =0, b = 1

( ) ( )
1=
( ) ( )

∗ ( ) ∗ ( )
1= =
( ) ( )

(0) = 1 = + ve

= -0.2963= -ve

Hence the root lies between 0 and .


Iteration :2

Here a =0, b = 1/3

( ) ( )
2=
( ) ( )

∗ ∗ ( )
2= = 0.25714
( )

(0) = 1 = + ve

(0.25714) = -0.011558 = - ve

Hence the root lies between 0 and 0.25714.

Iteration :3

Here a =0, b = 0.25714

∗ ( . ) . ∗ ( )
3= = 0.25420
( . ) ( )

(0) = 1 = + ve

(0.25420) = -0.0003742 = - ve

Hence the root lies between 0 and 0.25420

Iteration :4

Here a =0, b = 0.25420

∗ ( . ) . ∗ ( )
4=
( . )
= 0.25410
( )

(0) = 1 = + ve

(0.25410) = -0.000012936 = - ve

Now f (0) and f (0.25410) are opposite in sign.

Hence the root lies between 0 and 0.25410


Iteration :5

Here a =0, b = 0.25410

∗ ( . ) . ∗ ( )
5=
( . )
= 0.25410
( )

Hence the root is 0.25410.

5.2 Find an approximate root of x log10 x – 1.2 = 0 by false position method.

Solution:

Let ( )= x log10 x – 1.2

(0) = –1.2 = –ve

(1) = –1.2 = –ve

(2) = – 0.597940

(3) = +0.231364

The root lies between 2 and 3.

Iteration : 1

Here a =2, b = 3

( ) ( )
1=
( ) ( )

∗ ( ) ∗ ( )
1= = 2.721
( ) ( )

(2.721) = - 0.017104 = -ve

(3) = +0.231364

Hence the root lies between 2.721 and 3.

Iteration :2
Here a =2.721, b = 3

( ) ( )
2=
( ) ( )

. ∗ ( ) ∗ ( . )
2= =2.740
( ) ( . )

(2.740) = -0.00038905 = - ve

(3) = +0.231364

Hence the root lies between 2.740 and 3.

Iteration :3

Here a =2.740, b = 3

. ∗ ( ) ∗ ( . )
3= = 2.742
( ) ( . )

(2.742) = -0.00038905 = - ve

(3) = +0.231364

Hence the root lies between 2.742 and 3.

Iteration :4

Here a =2.742, b = 3

. ∗ ( ) ∗ ( . )
3= = 2.742
( ) ( . )

Hence the root is 2.740.

5.2 Find an approximate root of x tan x = -1 by false position method.

Solution:

Let ( )= x tan x +1

(2.5) = –0.8675 = –ve


(3) = 0.5724 = +ve

The root lies between 2.5 and 3.

Iteration : 1

Here a =2.5, b = 3

( ) ( )
1=
( ) ( )

. ∗ ( ) ∗ ( . )
1= = 2.8012
( ) ( . )

(2.8012) = 0.00787 = +ve

(3) = 0.5724=+ve

Hence the root lies between 2.8012 and 2.5.

Iteration :2

Here a =2.8012, b = 2.5

( ) ( )
2=
( ) ( )

. ∗ ( . ) . ∗ ( . )
2= =2.7984
( . ) ( . )

(2.7984) = 0.0000390 = +ve

(3) = +0.231364

Hence the root lies between 2.7984 and 2.5.

Iteration :3

Here a =2.7984, b = 2.5

. ∗ ( . ) . ∗ ( . )
3= = 2.7982
( . ) ( . )

(2.7982) = +ve
(3) = +0.231364

Hence the root lies between 2.7982 and 2.5.

Iteration :4

Here a =2.7982, b = 2.5

. ∗ ( . ) . ∗ ( . )
3= = 2.7982
( . ) ( . )

Hence the root is 2.7982.

5.3 Solve for a positive root of = by Regula Falsi Method.

Solution:

Let ( )= −

(0)= -3= -ve

(1) = -0.28172 = - ve

(1.5) = 3.72253 = +ve

The root lies between 1 and 1.5.

Iteration : 1

Here a =1, b = 1.5

( ) ( )
1=
( ) ( )

∗ ( . ) . ∗ ( )
1= = 1.035
( . ) ( )

(1.035) = -.0864 = -ve

(1.5)= 3.72253= +ve

Hence the root lies between 1.035 and 1.5


Iteration :2

Here a =1.035, b = 1.5

( ) ( )
2=
( ) ( )

. ∗ ( . ) . ∗ ( . )
2= = 1.045
( . ) ( . )

(1.045) = -.0286 = -ve

(1.5)= 3.72253= +ve

Hence the root lies between 1.045 and 1.5.

Iteration :3

Here a =1.045, b = 1.5

. ∗ ( . ) . ∗ ( . )
3= = 1.048
( . ) ( . )

(1.048) = -.01117 = -ve

(1.5)= 3.72253= +ve

Hence the root lies between 1.048 and 1.5.

Iteration :4

Here a =1.048, b = 1.5

. ∗ ( . ) . ∗ ( . )
4= = 1.048
( . ) ( . )

Hence the root is 1.08.

Newton-Raphson (N-R) Method

The Newton-Raphson’s method or commonly known as N-R method is most


popular for finding the roots of an equation. Its approach is different from all the
methods discussed earlier in the sense that it uses only one value of x in the
neighbourhood of the root instead of two. We can explain the method
geometrically as follows :

Let us suppose we want to find out the root of an equation f(x) = 0 while y = f(x)
represents a curve and we are interested to find the point where it cuts the x-axis.
Let x = x0 be an initial approximate value of the root close to the actual root. We
evaluate y (x 0 )  f (x 0 )  y 0 (say). Then point (x0, y0) lies on the curve y = f(x). We
dy
find  f  (x) for x = x0, say f  (x 0 ) . Then we may draw a tangent at (x0, y0) given
dx

as, y  y0  f  (x 0 ) (x  x 0 )

The point where the tangent cuts the x-axis (y = 0) is taken as the next estimate x =
x1 for the root, i.e.

f (x 0 )
x1  x 0 
f  (x 0 )

f (x n )
In general xn  1  xn  , see the Figure given below
f  (x n )

y= f (x)

x1 x3 x4
x
O x2 x0
Newton-Raphson Method

Theoretically, the N-R method may be explained as follows :

Let  be the exact root of f(x) = 0 and let  = x0 + h where h is a small number to
be determined. From Taylor’s series as have,

h2
f ()  f (x 0  h)  f (x 0 )  h f  (x 0 )  f  (x 0 )  . . .  0
2

f (x 0 )
Neglecting h2 and higher powers we get an approximate value of h, as h .
f  (x 0 )

Hence, an approximation for the exact root  may be written as,


f (x 0 )
x1  x 0  h  x 0 
f  (x 0 )

f (x n )
In general the N-R formula may be written as, x n  1  x n  , n  0, 1, 2, . . .
f  (x n )

It is same as derived above geometrically. It may be stated that the root of


convergence of N-R method is faster as compared to other methods. Further,
comparing the N-R method with method of successive substitution, it can be seen
as iterative scheme for

f (x)
xx
f  (x)

f (x)
where  (x)  x 
f  (x)

The condition for convergence |  ( ) |  1 in this case would be


{f  (x)}2  f (x) f  (x) f (x) f  (x)
 (x)  1   , at x = .
{f  (x)}2 {f  (x)}2

This implies that f  ()  0 .


5.3 Find the real positive root of 3x-cosx-1=0 by Newton's method.

Solution:

Let ( ) = 3x-cosx-1;

f (x) = 3+ sinx
(0) = -2 (-ve);

(1) = 2-cos1 (+ve).


The root lies between 0 and 1.

Newton-Raphson method formula is


f x 
xn1  xn  f '  n 
xn

Take o =0.5

( )
∴α =α − ( )

3(0.5)  cos(0.5)  1
 0.5   0.6085
3  sin(0.5)
( )
∴α =α − 3(0.6085)  cos(0.6085)  1
( )  0.6085   0.6071
3  sin( 0.6085)
( ) 3(0.6071)  cos(0.6071)  1
∴α =α −  0.6071   0.6071
( )
3  sin( 0.6071)
 The root is 0.6071 correct to six decimals.

5.4 Find an iterative formula to find N (where N is a positive number) and hence find 5.

Solution:

Let =√ ⇒ − N = 0 and ( ) = −N

f ( x)  2 x
Newton-Raphson method formula is

f x  n x n2  n
x n 1
 x n

f ' x 
x n 
2 xn
n
= + is the iterative formula to find √ .

To find √5, put N=5


The root lies between 2 and 3.

Newton-Raphson method formula is = +

Take  0  2 , = + = 2.25

= + = 2.2361, = + = 2.2361

 The Value of 5is 2.2361 .

Find an iterative formula to find the reciprocal of a given number N and hence find the
1
value of .
19

Solution:
1
Let = ⇒ N= .
x

1
( )= −
x

1
f ( x)  
x2

Newton-Raphson method formula is


f xn 
xn1  xn  f ' xn 


= −
= (2 − )is the iterative formula to find .

1
To find , take N=19
19

1
Further  0.05 Take = 0.05
20
= 0.05(2 − 19 ∗ 0.05) = 0.0525

= 0.0525(2 − 19 ∗ 0.0525) = 0.0526

= 0.0526(2 − 19 ∗ 0.0526) = 0.05263


= 0.05263(2 − 19 ∗ 0.05263) = 0.05263
1
Hence, the Value of is 0.05263.
19

2.8 . Find the root of 4x- = that lies between 2 and 3.

Solution:
Let ( ) = 4 −

′( ) = 4 −

(2)= 8- =0.6109(+ve)

(3)= 12- =-8.0855(-ve)

The root lies between 2and 3and it is closer to 2.

Newton-Raphson method formula is


f xn 
x n1
 x n

f ' xn 
Take =2
4∗2−
= = 2.1803
4−

.
4 ∗ 2.1803 −
= = 2.1444
4− .
.
4 ∗ 2.1803 −
= = 2.1533
4− .

.
4 ∗ 2.1533 −
= = 2.1533
4− .

The root is approximately 2.1533.

Gauss-Jordan Elimination Method


The following row operations on the augmented matrix of a system produce the
augmented matrix of an equivalent system, i.e., a system with the same solution as
the original one.
• Interchange any two rows
.• Multiply each element of a row by a nonzero constant
• Replace a row by the sum of itself and a constant multiple of another row of the
matrix. For these row
operations, we will use the following notations.
• Ri ↔ Rj means: Interchange row i and row j.
• αRi means: Replace row i with α times row i.
• Ri + αRj means: Replace row i with the sum of row i and α times row j.
How is a set of equations solved numerically?

One of the most popular techniques for solving simultaneous linear equations is the
Gaussian elimination method. The approach is designed to solve a general set of n
equations and n unknowns

a11 x1  a12 x2  a13 x3  ...  a1n xn  b1

a21 x1  a22 x2  a23 x3  ...  a2 n xn  b2

. .

. .
. .

an1 x1  an 2 x2  an 3 x3  ...  ann xn  bn

Gaussian elimination consists of two steps

1. Forward Elimination of Unknowns: In this step, the unknown is eliminated


in each equation starting with the first equation. This way, the equations are
reduced to one equation and one unknown in each equation.
2. Back Substitution: In this step, starting from the last equation, each of the
unknowns is found.

Forward Elimination of Unknowns:

In the first step of forward elimination, the first unknown, x1 is eliminated from all
rows below the first row. The first equation is selected as the pivot equation to
eliminate x1 . So, to eliminate x1 in the second equation, one divides the first
equation by a11 (hence called the pivot element) and then multiplies it by a 21 . This
is the same as multiplying the first equation by a 21 / a11 to give

a 21 a a
a 21 x1  a12 x 2  ...  21 a1n x n  21 b1
a11 a11 a11

Now, this equation can be subtracted from the second equation to give

 a   a  a
 a 22  21 a12  x 2  ...   a 2n  21 a1n  x n  b2  21 b1
 a11   a11  a11

or

a22 x2  ...  a2 n xn  b2


where

a21
a22  a22  a12
a11

a21
a2n  a2n  a1n
a11

This procedure of eliminating x1 , is now repeated for the third equation to the n th
equation to reduce the set of equations as

a11 x1  a12 x 2  a13 x3  ...  a1n x n  b1

a22 x2  a23 x3  ...  a2 n xn  b2

 x2  a33
a32  x3  ...  a3 n xn  b3

. . .

. . .

. . .

an 2 x2  a n 3 x3  ...  ann xn  bn

This is the end of the first step of forward elimination. Now for the second step of
forward elimination, we start with the second equation as the pivot equation and
a22 as the pivot element. So, to eliminate x 2 in the third equation, one divides the

second equation by a22 (the pivot element) and then multiply it by a32 . This is the
same as multiplying the second equation by a32 / a22 and subtracting it from the
third equation. This makes the coefficient of x 2 zero in the third equation. The
same procedure is now repeated for the fourth equation till the n th equation to give
a11 x1  a12 x 2  a13 x3  ...  a1n x n  b1

a22 x2  a23 x3  ...  a2 n xn  b2

 x3  ...  a3n xn  b3


a33

. .

. .

. .

an3 x3  ...  ann xn  bn

The next steps of forward elimination are conducted by using the third equation as
a pivot equation and so on. That is, there will be a total of n  1 steps of forward
elimination. At the end of n  1 steps of forward elimination, we get a set of
equations that look like

a11 x1  a12 x 2  a13 x3  ...  a1n x n  b1

 x2  a23
a22  x3  ...  a2 n xn  b2

 x3  ...  a3n xn  b3


a33

. .

. .

. .

 n 1 
a nn x n  bnn 1
Back Substitution:

Now the equations are solved starting from the last equation as it has only one
unknown.

bn( n1)
xn  ( n 1)
a nn

Then the second last equation, that is the (n  1) th equation, has two unknowns: x n
and xn1 , but x n is already known. This reduces the (n  1) th equation also to one
unknown. Back substitution hence can be represented for all equations by the
formula

n
bii 1   a iji 1 x j
j i 1
xi  for i  n  1, n  2, ,1
aiii 1

bn( n1)
And xn  ( n 1)
a nn

2.9 Solve the system of equations by Gausselimination method


10 − 2 + 3 = 23; 2 + 10 − 5 = −33; 3 − 4 + 10 = 41

Solution:
10 −2 3 23
( , )= 2 10 −5 −33
3 −4 10 41

1
~ 2 10 −5 −33
3 −4 10 41

1
⎛ ⎞
~ ⎜2 ⎟
0
⎝ ⎠
1
⎛ ⎞
~ ⎜0 1 ⎟
0
⎝ ⎠

1
⎛ ⎞
~ ⎜0 1 ⎟
0 0
⎝ ⎠

1
~ 0 1
0 0 1 3

= 1, = −2, = 3

2.10 Solve the system of equations by Gauss elimination method


3.15 − 1.96 + 3.85 = 12.95; 2.13 + 5.12 − 2.89 = −8.61;
5.92 + 3.05 + 2.15 = 6.88;
Solution:
3.15 −1.96 3.85 12.95
( , ) = 2.13 5.12 −2.89 −8.61
5.92 3.05 2.15 6.88
1 −0.622 1.22 4.11
~ 2.13 5.12 −2.89 −8.61
5.92 3.05 2.15 6.88
1 −0.622 1.22 4.11
~ 0 6.4453 −5.4933 −17.3667
0 6.7334 −5.0854 −17.4577
1 −0.622 1.22 4.11
~ 0 1 −0.8523 −2.6945
0 6.7334 −5.0854−17.4577
1 −0.622 1.22 4.11
~ 0 1 −0.8523 −2.6945
0 0 −0.6535 0.6854
1 −0.622 1.22 4.11
~ 0 1 −0.8523 −2.6945
0 0 1 1.0488

= 1.709, = −1.800, = 1.049

GAUSS JORDAN METHOD

2.11 Solve the system of equations by Gauss Jordan method


+ 3 + 3 = 16; + 4 + 3 = 18; + 3 + 4 = 19
Solution:
1 3 3 16
( , )= 1 4 3 18
1 3 4 19
1 3 3 16
~ 0 1 0 2
0 0 1 3
1 0 3 10
~ 0 1 0 2
0 0 1 3
1 0 0 1
~ 0 1 0 2
0 0 1 3

 = 1, = 2, = 3

2.12 Solve the system of equations by Gauss Jordan method

10 + + = 12; 2 + 10 + = 13; + +5 =7

Solution:
1 1 5 7
( , )= 2 10 1 13
10 1 1 12
1 1 5 7
~ 0 8 −9 −1
0 −9 −49 −58

1 1 5 7
~ 0 1 −9/8 −1/8
0 −9 −49 −58

1 1 5 7
~ 0 1 −9/8 −1/8
0 0 −473/8 −473/8

1 1 5 7
~ 0 1 −9/8 −1/8
0 0 1 1
1 0 0 1
~ 0 1 0 1
0 0 1 1
 = 1, = 1, = 1

GAUSS-SEIDEL METHOD

The Gauss-Seidel method is sensitive to the form of the co-efficient matrix A

The Gauss-Seidel method typically converges more rapidly than the Jacobi method

The Gauss-Seidel method is more difficult to use for parallel computation

2.13 Solve the following system by Gauss-Jacobi and Gauss-Seidel method:

10 + 5 − 2 = 3; 4 − 10 − 3 = −3; + 6 + 10 = −3

Solution:

Here, we see that the diagonal elements are dominant. Hence , the iteration process can
be applied.

10 −5 −2
That is the coefficient of matrix 4 −10 3 is diagonally dominant ,since
1 6 10
|10| > |−5| + |−2|,

|−10| > |4| + |3|

|10| > |1| + |6|

Gauss –Jacobi method . solving for x,y,z we have

= (3 + 5 + 2 ) ………………………(1)

= (3 + 4 + 3 )………………………..(2)

= (−3 − − 6 )……………………….(3)

First iteration : let the initial values be (0,0,0).

Using these initial values in (1),(2),(3),we get


1
= [3 + 5(0) + 2(0)] = 0.3
10
1
= [3 + 4(0) + 3(0)] = 0.3
10
1
= [−3 − (0) − 6(0)] = 0.3
10
Second iteration : Using these value in (1),(2),(3) we get

1
= [3 + 5(0.3) + 2(−0.3)] = 0.39
10
1
= [3 + 4(0.3) + 3(−0.3)] = 0.33
10
1
= [−3 − (0.3) − 6(0.3)] = 0.51
10
Third iteration : Using the value of , , (1), (2), (3) we, get

1
= [3 + 5(0.33) + 2(−0.51)] = 0.363
10
1
= [3 + 4(0.39) + 3(−0.51)] = 0.303
10
1
= [−3 − (0.39) − 6(0.33)] = −0.537
10
Fourth iteration :

1
= [3 + 5(0.303) + 2(−0.537)] = 0.3441
10
1
= [3 + 4(0.363) + 3(−0.537)] = 0.2841
10
1
= [−3 − (0.363) − 6(0.303)] = −0.5181
10

Fifth iteration:

1
= [3 + 5(0.2841) + 2(−0.5181)] = 0.33843
10
1
= [3 + 4(0.3441) + 3(−0.5181)] = 0.2822
10
1
= [−3 − (0.3441) − 6(0.2841)] = −0.50487
10
Sixth iteration:

1
= [3 + 5(0.2822) + 2(−0.50487)] = 0.340126
10
1
= [3 + 4(0.33843) + 3(−0.50487)] = 0.283911
10
1
= [−3 − (0.33843) − 6(0.2822)] = −0.503163
10
Seventh iteration :

1
= [3 + 5(0.283911) + 2(−0.503163)] = 0.3413229
10
1
= [3 + 4(0.340126) + 3(−0.503163)] = 0.2851051
10
1
= [−3 − (0.340126) − 6(0.283911)] = −0.5043592
10
Eighth iteration:

1
= [3 + 5(0.2851015) + 2(−0.5043592)] = 0.34167891
10
1
= [3 + 4(0.3413229) + 3(−0.5043592)] = 0.2852214
10
1
= [−3 − (0.3413229) − 6(0.2851015)] = −0.50519319
10
Ninth iteration:

1
= [3 + 5(0.2852214) + 2(−0.50519319)] = 0.341572062
10
1
= [3 + 4(0.34167891) + 3(−0.50519319)] = 0.285113607
10
1
= [−3 − (0.34167891) − 6(0.2852214)] = −0.505300731
10
Hence correct to 3 decimal places ,the value are = 0.342 , = 0.285 , = −0.505.

Gauss-Seidel method :Initial value : = 0 , = 0.

First iteration :

1
= [3 + 5(0) + 2(0)] = 0.3
10
1
= [3 + 4(0.3) + 3(0)] = 0.42
10
1
= [−3 − (0.3) − 6(0.42)] = −0.582
10
Second iteration :

1
= [3 + 5(0.42) + 2(−0.582)] = 0.3936
10
1
= [3 + 4(0.3936) + 3(−0.582)] = 0.28284
10
1
= [−3 − (0.3936) − 6(0.28284)] = −509064
10
Third iteration :

1
= [3 + 5(0.28284) + 2(−509064)] = 0.3396072
10
1
= [3 + 4(0.3396072) + 3(−509064)] = 0.28312368
10
1
= [−3 − (0.3396072) − 6(0.28312368)] = 0.503834928
10
Fourth iteration :

1
= [3 + 5(0.28312368) + 2(−0.503834928)] = 0.34079485
10
1
= [3 + 4(0.34079485) + 3(−0.503834928)] = 0.285167464
10
1
= [−3 − (0.34079485) − 6(0.285167464)] = −0.50517996
10
Fifth iteration:
1
= [3 + 5(0.285167464) + 2(−0.50517996)] = 0.34155477
10
1
= [3 + 4(0.34155477) + 3(−0.50517996)] = 0.28506792
10
1
= [−3 − (0.34155477) − 6(0.28506792)] = −0.505196229
10
Sixth iteration:

1
= [3 + 5(0.28506792) + 2(−0.505196229)] = 0.341494714
10
1
= [3 + 4(0.341494714) + 3(−0.505196229)] = 0.285039017
10
1
= [−3 − (0.341494714) − 6(0.285039017)] = −0.5051728
10
Seventh iteration :

1
= [3 + 5(0.285039017) + 2(− − 0.5051728)] = 0.3414849
10
1
= [3 + 4(0.3414849) + 3(−0.5051728)] = 0.28504212
10
1
= [−3 − (0.3414849) − 6(0.28504212)] = −0.5051737
10
Iteratio Gauss-Jacobi Gauss-Seidal
n method method

1 0.3 0.3 -0.3 0.3 0.42 -0.582


2 0.39 0.33 -0.51 0.3936 0.28284 -0.509064
3 0.363 0.303 -0.537 0.3396072 0.28312364 -0.503834928
4 0.3441 0.2841 -0.5181 0.3407949 0.28516746 -0.50517996
5 0.33843 0.2822 -0.50487 0.3415547 0.28506792 -0.505196229
6 0.340126 0.283911 -0.503163 0.3414947 0.2850390 -0.5051728
7 0.3413229 0.2851015 -0.504359 0.3414849 0.285042421 -0.5051737
8 0.34167891 0.2852214 -0.5051932
9 0341572062 0.2851136 -0.5053007
The value correct to 3 decimal places are

= 0.342 , = 0.285, = −0.505


2.14. Solve the following system of equations by using Gauss-Jacobi and Gauss-Seidel
method (correct to 3 decimal place):

8x-3y+2z=20; 4x+11y-z=33; 6x+3y+12z=35

Solution.

Since the diagonal elements are dominant in the coefficient matrix, we write x,y,z as follow.

1
= [20 + 3 − 2 ]
8
1
= [33 + 4 + ]
11
1
= [35 + 6 − 3 ]
12
Starting with the initial value = 0 , = 0, = 0 and using (1)(2)(3) and repeating the process
we get the values of , , as the tabulated by both methods.(Gauss – Jacobi and Gauss-Seidel)

Iteration Gauss- Gauss-


Jacobi Seidal
method method

1 2.5 3.0 2.916666 2.5 2.090909 1.143939


2 2.895833 2.356060 0.916666 2.998106 2.013774 0.914170
3 3.154356 2.030303 0.879735 3.026623 1.982516 0.907726
4 3.041430 1.932937 0.831913 3.016512 1.985607 0.912009
5 3.016873 1.969654 0.912717 3.16600 1.985964 0.911876
6 3.010441 1.985930 0.915817 3.016767 1.985892 0.911810
7 3.015770 1.988550 0.914964 3.016757 1.985889 0.911816
8 3.016946 1.986535 0.911644
9 3.017039 1.985805 0.911560
10 3.016786 1.985764 0.911696
This shows that the convergence is rapid in Gauss-Seidel method when compared to Gauss-
Jacobi method. We see that 10 iteration are necessary in Jacobi method to get the same accuracy
as got by 7 iterations in Gauss-Seidel method.

2.15.Solve the following system of equations by Gauss-Jacobi and Gauss-Seidel method


correct to three decimal places:

+ + 54 = 110; 27 + 6 − = 85; 6 + 15 + 2 = 72

Solution.
As the coefficient matrix is not diagonally dominant as it Is ,we rewrite the equation ,as
noted below , so that the coefficient matrix become diagonally dominant

27 + 6 − = 85……………………(1)

6 + 15 + 2 = 72………………….(2)

+ + 54 = 110…………………...(3)

Solve for , , ,

1
= [85 − 6 + ]
27
1
= [72 − 6 − 2 ]
15
1
= [110 − − ]
54
Starting with the initial value = 0, = 0, = 0 (1), (2), (3) and repeating the
process we get the values of , , as the tabulated by both methods.(Gauss-Jacobi method and
c)

Iteration Gauss- Gauss-


Jacobi Jacobi
method method

1 3.14815 4.8 2.03704 3.14815 3.54074 1.91317


2 2.15693 3.26913 1.88985 2.43218 3.57204 1.92585
3 2.49167 3.68525 1.93655 2.42569 3.57294 1.92595
4 2.40093 3.54513 1.92265 2.42549 3.57301 1.92595
5 2.43155 3.58372 1.92692 2.42548 3.57301 1.92595
6 2.42323 3.57046 1.92565 2.42548 3.57301 1.92595
7 2.42603 3.57395 1.92604
8 2.42527 3.57278 1.92593

Hence = 2.425, = 3.573, = 1.926.

2.16. Solve,by Gauss-Seidel method the following system:

28 + 4 − = 32; + 3 + 10 = 24 ; 2 + 17 + 4 = 35

Solution:
Since the diagonal element in the coefficient matrix are not dominant ,we rearrange the equation
,as follows ,such that the element in the coefficient matrix are dominant.

28 + 4 − = 32…………………..(1)

2 + 17 + 4 = 35……………………(2)

+ 3 + 10 = 24………………………...(3)

Hence , = [32 − 4 + ]

1
= [35 − 2 − 4 ]
17
1
= [24 − −3 ]
10
Setting = 0, = 0 ,we get

First iteration:

1
= [32 − 4(0) + 0] = 1.1429
28
1
= [35 − 2(1.1429) − 4(0)] = 1.9244
17
1
= [24 − 1.1429 − 3(1.9244)] = 1.8084
10
Second iteration :

1
= [32 − 4(1.9244) + 1.8084] = 0.9325
28
1
= [35 − 2(0.9325) − 4(1.8084)] = 1.5236
17
1
= [24 − 0.9325 − 3(1.5236)] = 1.8497
10
Third iteration :

1
= [32 − 4(1.5236) + 1.8497] = 0.9913
28
1
= [35 − 2(0.9913) − 4(1.8497)] = 1.5070
17
1
= [24 − 0.9913 − 3(1.5070)] = 1.8488
10
Fourth iteration :

1
= [32 − 4(1.5070) + 1.8488] = 0.9936
28
1
= [35 − 2(0.9936) − 4(1.8488)] = 1.5069
17
1
= [24 − 0.9936 − 3(1.5069)] = 1.8486
10
Fifth iteration:

1
= [32 − 4(1.5069) + 1.8486] = 0.9936
28
1
= [35 − 2(0.9936) − 4(1.8486)] = 1.5069
17
1
= [24 − 0.9936 − 3(1.5069)] = 1.8486
10
Since the value of , , in the 4th and 5th iteration are same ,we stop the process here.

Hence , = 0.9936, = 1.5069, = 1.8486

POWER METHOD FOR APPROXIMATING EIGENVALUES

For large values of n, polynomial equations like this one are difficult and time-consuming to
solve. Moreover, numerical techniques for approximating roots of polynomial equations of high
degree are sensitive to rounding errors. In this section you will look at an alterna- tive method for
approximating eigenvalues. As presented here, the method can be used only to find the
eigenvalue of A that is largest in absolute value—this eigenvalue is called the dominant
eigenvalue of A. Although this restriction may seem severe, dominant eigenval- ues are of
primary interest in many physical applications.

2.17. Find the dominant eigen value of A = by power method and hence find the other
eigen value .Also verify your results by any other matrix theory.

Solution

0
Let an initial arbitrary vector be X1 =
1
1 2 0 2 0.5
AX1 = = =4 = 4 X2
3 4 1 4 1

1 2 0.5 2.5
AX2 = = = 7.5 = 7.5 X3
3 4 1 7.5 1

1 2
AX3 = = =5 =5 X4
3 4 1 5 1

1 2
AX4 = = = = X5
3 4 1 1

1 2 0.4568 2.4568 0.4575


AX5 = = = 5.3704 =5.3704 X6
3 4 1 5.3704 1
1 2 0.4575 2.4575 0.4574
AX6 = = = 5.3724 = 5.3724 X7
3 4 1 5.3724 1
1 2 0.4574 2.4574 0.4574
AX7 = = = 5.3723
3 4 1 5.3723 1
1 2 0.4574 2.4574 0.4574
AX8 = = = 5.3723
3 4 1 5.3723 1
0.4574
Hence λ1 = 5.3723 and vector X1 =
1

Since λ1+λ2 = Trace of A =1+4 =5

Second eigen value = λ2 = -0.3723.

Veification:-

Charecteristic equation is λ2-5λ-2=0

Therefore, λ = 5.3723, -0.3723.

2.18. Find the numerically largest eigen value of A = and the corresponding eigen

vector.

Solution

1
Let X1 = 0
0
25 1 2 1 25 1
AX1 = 1 3 0 0 = 1 = 25 0.04 = 25 X2
2 0 −4 0 2 0.08
25 1 2 1 25.2 1
AX2 = 1 3 0 0.04 = 1.12 = 25.2 0.0444 = 25.2 X3
2 0 −4 0.08 1.68 0.0667
25 1 2 1 25.1778 1
AX3 = 1 3 0 0.0444 = 1.1332 = 25.1778 0.0450 = 25.1778 X4
2 0 −4 0.0667 1.7337 0.0688
25.1826 1
AX4 = 1.135 = 25.1826 0.0451 = 25.1826 X5
1.7248 0.0685
25.1821 1
AX5 = 1.1353 = 25.1821 0.0451 = 25.1821 X6
1.7260 0.0685

We have reached the limit.

1
∴ λ1 = 25.1821 and the corresponding eigen vector is 0.0451
0.0685

2.19. Find the dominant eigen value and the corresponding eigen vector of A =

Find also the least latent root and hence the third eigen value also.

Solution

1
Let X1 = 0 be an approximate eigen value.
0
1 6 1 1 1 1
AX1 = 1 2 0 0 = 1 = 1 1 = 1X2
0 0 3 0 0 0
1 6 1 1 7 1
AX2 = 1 2 0 1 = 3 = 7 0.4286 = 7X3
0 0 3 0 0 0
1 6 1 1 3.5714 1
AX3 = 1 2 0 0.4286 = 1.8572 = 3.5714 0.52 = 3.5714X4
0 0 3 0 0 0
1 6 1 1 4.12 1
AX4 = 1 2 0 0.52 = 2.04 = 4.12 0.4951 = 4.12X5
0 0 3 0 0 0
1 6 1 1 3.9706 1
AX5 = 1 2 0 0.4951 = 1.9902 = 3.9706 0.5012 = 3.9706X6
0 0 3 0 0 0
1 6 1 1 4.0072 1
AX6 = 1 2 0 0.5012 = 2.0024 = 4.0072 0.4997 = 4.0072X7
0 0 3 0 0 0
1 6 1 1 3.9982 1
AX7 = 1 2 0 0.4997 = 1.9994 = 3.9982 0.5000 = 3.9982X8
0 0 3 0 0 0
1 6 1 1 4 1
AX8 = 1 2 0 0.5 = 2 = 4 0.5 = 4X9
0 0 3 0 0 0

∴Dominant eigen value = 4

Corresponding eigen vector is (1,0.5,0).

To find the least eigen value, let B = A-4I since λ1 =4

1 6 1 4 0 0 −3 6 1
∴ B = 1 2 0 - 0 4 0 = 1 −2 2
0 0 2 0 0 4 0 0 −2

We will find the dominant eigen value of B.

1
Let Y1 = 0 be the initial vector.
0
−3 6 1 1 −3 1
BY1= 1 −2 0 0 = 1 = -3 −0.3333 = -3Y2
0 0 2 0 0 0
−3 6 1 1 −5 1
BY2= 1 −2 0 −0.3333 = 1.6666 = -5 −0.3333 = -5Y3
0 0 2 0 0 0
−3 6 1 1 −5 1
BY3= 1 −2 0 −0.3333 = 1.6666 = -5 −0.3333
0 0 2 0 0 0

∴ Dominant eigen value of B is -5.

Adding 4, smallest value of A = -5+4 =-1

Sum of eigen values = Trace of A =1+2+3 =6

4+(-1)+λ3 = 6 ∴ λ3 =3

All the three eigen values are 4,3,-1.

2.20. Using power method, find all the eigen values of A = −


Solution

1
Let X1 = 0 be an approximate eigen vector.
0
5 0 1 1 5 1
AX1 = 0 −2 0 0 = 0 = 5 0 = 5X2
1 0 5 0 1 0.2
5 0 1 1 5.2 1
AX2 = 0 −2 0 0 = 0 = 5.2 0 = 5.2X3
1 0 5 0.2 2 0.3846
5 0 1 1 5.3846 1
AX3 = 0 −2 0 0 = 0 = 5. 3846 0 = 5.3846X4
1 0 5 0.3846 2.9231 0.5429
5 0 1 1 5.5429 1
AX4 = 0 −2 0 0 = 0 = 5.5429 0 = 5.5429X5
1 0 5 0.5429 3.7143 0.6701
5 0 1 1 5.6701 1
AX5 = 0 −2 0 0 = 0 = 5. 6701 0 = 5.6701X6
1 0 5 0.6701 4.3505 0.7672
5 0 1 1 5.7642 1
AX6 = 0 −2 0 0 = 0 = 5. 7672 0 = 5.7672X7
1 0 5 0.7672 4.8360 0.8385
5 0 1 1 5.8385 1
AX7 = 0 −2 0 0 = 0 = 5. 8385 0 = 5.8385X8
1 0 5 0.8385 5.1927 0.8894
5 0 1 1 5.8894 1
AX8 = 0 −2 0 0 = 0 = 5.8894 0 = 5.8894X9
1 0 5 0.8894 5.4470 0.9249
5 0 1 1 5.9249 1
AX9 = 0 −2 0 0 = 0 = 5. 9249 0 = 5.9249X10
1 0 5 0.9249 5.6244 0.9493
5 0 1 1 5.9493 1
AX10 = 0 −2 0 0 = 0 = 5. 9493 0 = 5.9493X11
1 0 5 0.9493 5.7465 0.9659
5 0 1 1 5.9659 1
AX11 = 0 −2 0 0 = 0 = 5. 9659 0 = 5.9659X12
1 0 5 0.9659 5.8296 0.9771
5 0 1 1 5.9771 1
AX12 = 0 −2 0 0 = 0 = 5. 9771 0 = 5.9771X13
1 0 5 0.9771 5.8857 0.9847
5 0 1 1 5.9847 1
AX13 = 0 −2 0 0 = 0 = 5.9847 0 = 5.9847X14
1 0 5 0.9847 5.9236 0.9898
5 0 1 1 5.9898 1
AX14 = 0 −2 0 0 = 0 = 5. 9898 0 = 5.9898X15
1 0 5 0.9898 5.9489 0.9932
5 0 1 1 5.9932 1
AX15 = 0 −2 0 0 = 0 = 5. 9932 0 = 5.9932X16
1 0 5 0.9932 5.9659 0.9954
5 0 1 1 5.9954 1
AX16 = 0 −2 0 0 = 0 = 5. 9954 0 = 5.9954X17
1 0 5 0.9954 5.9772 0.9970
5.9970 1
AX17 = 1 = 5. 9970 0
5.9848 0.9980

∴ λ1 =6 and the eigen vector is (1,0,1)

−1 0 1 1
B= A-6I = 0 −8 0 Take Y1 = 0
1 0 −1 0
−1 1
BY1 = 0 = -1 0 = -1 Y2
1 −1
−1 0 1 1 −2 1
BY2 = 0 −8 0 0 = 0 = -2 0 = -2Y3
1 0 −1 −1 2 −1
−1 0 1 1 1
BY3 = 0 −8 0 0 =-2 0
1 0 −1 −1 −1

Greater value of B =-2

∴ Smallest value of A =-2 +6 =4

λ1 + λ2 +λ3 =Trace = 5-2+5 = 8

6+4+λ3 = 8 ∴λ3 = -2

∴ Eigen values are 6,4,-2.

Practice problems:

Using Newton’s method, Find the roots for the following


2P1. =6 −4 (Ans : 0.73)
2P2. = (Ans : 0.5178)
2P3. √12(Ans : 3.4641)

Using Regulafalsi method, Find the roots for the following

2P4. − 2 − 5 = 0 (Ans : 2.093)

2P5. = (Ans : 0.5177)


2P6. 3 = (Ans : 6.089)
2P7. Solve the system of equations by Gauss elimination method
2 + 4 + 2 = 15; 2 + + 2 = −5; 4 + − 2 = 0
(Ans: = −3.0556, = 6.6667, = −2.778)

2P8. Solve the system of equations by Gauss elimination method


10 + + = 12; 2 + 10 + = 13; 2 + 2 + 10 = 4
(Ans: = 1, = 1, = 1)

2P9. Solve the system of equations by Gauss Jordan method


10 + + = 12; 2 + 10 + = 13; + + 5 = 7
(Ans: = 1, = 1, = 1)

2P10. Solve the system of equations by Gauss Jordan method


10 − 2 + 3 = 23; 2 + 10 − 5 = −33; 3 − 4 + 10 = 41
(Ans: = 1, = −2, =
3Solve the following systems of equations by (i) Gauss-Jacobi (ii) Gauss-Seidel method

2P11. 5 − 2 + = −4, + 6 − 2 = −1, 3 + + 5 = 13


2P12. 8 + + = 8, 2 + 4 + = 4, + 3 + 3 = 5
2P13.8 − 6 + = 13.69, 3 + − 2 = 17.59, 2 − 6 + 9 = 29.29

2P14.Find the dominant eigen values of the following matrices, using power method

−4 −5
(i) ans:- -3;(1,-0.2)’
1 2
2 −1 0
(ii) −1 2 −1 ans:-3.414;(-0.707,1,0.707)’
0 −1 2
10 2 1
(iii) 2 10 1 ans:-13;(1,1,1)’
2 1 10

You might also like