Probability and Statistics m3 Engineering PDF 1
Probability and Statistics m3 Engineering PDF 1
Probability and Statistics m3 Engineering PDF 1
Transcendental equations:
Example
2ex+1=0
log10 x-2x=12
Roots of an equation
Note:
equation f ( x )=0 will have at least one real root between a and b.
RegulaFalsi Method (Method of false position or Linear interpolation
method)
1. Find an interval ( a ,b ) in which the root lies. i.e., such that f ( a ) and f ( b )
have opposite signs.
af ( b ) −bf ( a )
x 1=
2. The first approximation of the root is f ( b ) −f ( a )
f ( a ) and f ( x 1 ) f ( x 1 ) and f ( b )
3. Now either have opposite signs or have
opposite signs.
4. If f ( a ) and f ( x 1 ) have opposite signs, then the root lies between a and x 1 .
af ( x 1 ) −x 1 f ( a )
x 2=
f ( x 1 ) −f ( a )
Note: If f ( x 1 ) and f ( b ) have opposite signs, then the root lies between
x 1 and b .
x 1 f ( b ) −bf ( x 1 )
x 2=
f ( b ) −f ( x 1 )
.
5. Similarly, we find
x 3 , x 4 ,...... till the desired accuracy is obtained.
Problems:
x
1. Find the approximate root of
xe −2=0 by method of false position.
Solution:
f ( x )=xe x −2
Let
f ( 0 )=−2<0
f ( 1 )=0. 7183>0
Therefore the root lies between 0 & 1.
Solution:
f ( x )=x−cos x
Let
f ( 0 )=−1<0
f ( 1 )=0. 4597 >0
Therefore the root lies between 0 & 1.
af ( b )−bf ( a )
x n=
By Reula falsi method f ( b )−f ( a )
Solution:
af ( b )−bf ( a )
x n=
Reula falsi method f ( b )−f ( a )
By
3
4. Find the positive root of
x =2 x +5 by method of false position.
Solution:
f ( x )=x 3 −2 x −5
Let
f ( 0 )=−5<0
f ( 1 )=−6<0
f ( 2 )=−1<0
f ( 3 ) =16>0
Therefore the root lies between 2 & 3.
af ( b )−bf ( a )
x n=
By Reula falsi method f ( b )−f ( a )
Iteration a b f(a) f(b) ( AD−BC ) f(xn)
(A) (B) (C) (D) x n=
( D−C )
1 2 3 -1 16 2.0588 -0.3911
2 2.0588 3 -0.3911 16 2.0813 -0.1468
3 2.0813 3 -0.1468 16 2.0897 -0.0540
4 2.0897 3 -0.0540 16 2.0928 -0.0195
5 2.0928 3 -0.0195 16 2.0939 -0.0073
6 2.0939 3 -0.0073 16 2.0943 -0.0028
Hence the root is 2.094
3 2
5. Find the negative root of
x +1 .2 x =4 x +4 . 6 by method of false position.
Solution
3 2
f ( x )=x +1 . 2 x −4 x −4 . 62
[Replace x by –x for negative root]
3 2
g ( x ) =−x +1 .2 x +4 x−4 . 62
g ( 0 )=−4 . 0000<0
g (1 )=−0 . 4000<0
g ( 2 )=0 . 2000>0
Therefore the root lies between 1 & 2.
ag ( b )−bg ( a )
x n=
Reula falsi method g ( b )−g ( a )
By
3
1. Find the positive root of
x −4 x +1=0 by method of false position.
Ans : 0.254
Ans : 4.967
tan x +tanh x
3. Find the positive root of by method of false position.
Ans : 2.365
x tan x =−1
4. Solve the equation by Regula falsi method starting with a=2.5 and
b=3 correct to 3 decimal places.
Ans : 2.798
1. Find an interval ( a ,b ) in which the root lies. i.e., such that f ( a ) and f ( b ) have
opposite signs
'
3. Verify that |φ ( x )|<1 for all x ∈ ( a, b )
x 1=φ ( x 0 ) , x2 =φ ( x1 ) , x 3 =φ ( x 2 ) ,. .. . .. ..
5. Find successive approximations of the root as
6. If the sequence
x 0 , x 1 , x 2 ,...... converges to α , then α is the required root of the
equation
f ( x )=0 .
'
Note:1. Condition for convergence of fixed point iteration method is that |φ ( x )|<1 .
2. Order of convergence of fixed point iteration method is 1. (Linear
convergence)
1. Find the real root of cos x=3 x−1 , by iteration method. Correct to four decimal
places.
Solution:
f ( x )=cos x −3 x +1
Let
f ( 0 )=2>0
f ( 1 )=−1. 45970<0
3 x=cos x +1
cos x +1
x= =φ ( x )
3
−sin x
φ' ( x ) =
3
' −sin 0
|φ ( 0 )|=| |=0<1
3
' −sin 1
|φ ( 1 )|=| |=0.28049<1
3
cos x1 +1
x 2= =0 . 62369
3
cos x 2 +1
x 3= =0. 60391
3
cos x 3 +1
x 4= =0 . 60771
3
cos x 4 +1
x 5= =0 . 60699
3
cos x 5 +1
x 6= =0 .60712
3
cos x 6 +1
x 7= =0 .60710
3
Solution:
f ( 1 )=−5. 0000<0
f ( 2 )=−3. 3010<0
f ( 3 ) =−1. 4771<0
f ( 4 )=0. 3979>0
2 x −log 10 x=7
2 x =log 10 x +7
log 10 x+7
x= =φ ( x )
2
d d
dx
[ log 10 x ] = [ log e x log 10 e ]
dx
d
=
dx
[ 0 . 4343 loge x ]
0 .4343
=
x
φ' ( x ) =
2 (
1 0 . 4343
x )
0 .2172
φ' ( x ) =
x
0.2172
|φ ' ( 3 )|=| |=0.0724<1
3
' 0.2172
|φ ( 4 )|=| |=0. 0543<1
4
'
|φ ( x )|<1 fox all x in ( 3, 4 )
Assume x0=4
log 10 x 0 +7
x 1= =3 . 8010
2
log 10 x 1 +7
x 2= =3 . 7900
2
log 10 x 2 +7
x 3= =3 . 7893
2
log 10 x 3 +7
x4= =3 .7893
2
f ( x )=x 3 +x 2 −1
Let
f ( 0 )=−1<0
f ( 1 )=1>0
x 3 +x 2 =1
2
x ( x +1 ) =1
1
x 2=
1+x
1
1 −
x= =( 1+ x ) 2 =φ ( x )
√1+ x
3
1 −
φ ( x )=− ( 1+ x ) 2
'
2
1
φ' ( x )=− 3
2 ( 1+ x ) 2
1
|φ ' ( 0 )|=|− 3
|=0 .5<1
2
2 ( 1+0 )
1
|φ ' ( 1 )|=|− 3
|=0 . 1768<1
2
2 ( 1+1 )
'
|φ ( x )|<1 fox all x in ( 0, 1 )
Assume x0=0
1
x 1= =1
√ 1+ x0
1
x 2= =0 .7071
√ 1
1+ x
1
x 3= =0 .7654
√ 2
1+x
1
x4= =0. 7526
√ 3
1+x
1
x 5= =0. 7554
√ 4
1+x
1
x 6= =0 . 7548
√ 5
1+x
f ( 0 )=−1<0
f ( 1 )=1 . 6430>0
1
φ' ( x )= cos x
6 √ 1+sin x
1
|φ ' ( 0 )|=| cos 0|=0.1667<1
6 √ 1+sin 0
1
|φ ' ( 1 )|=| cos 1|=0.544<1
6 √1+sin 1
'
|φ ( x )|<1 fox all x in ( 0, 1 )
Assume x0=0
1
x 1=
3
√1+sin x 0=0 .3333
1
x 2=
3
√1+sin x 1=0. 3840
1
x 3=
3
√1+sin x 2=0 .3908
1
x 4=
3
√ 1+sin x3=0 . 3917
1
x 5=
3
√1+sin x 4=0 . 3918
Hence the root is 0.392
x
5. Solve the equation e −3 x=0 , by iteration method.
Solution:
x
f ( x )=e −3 x
Let
f ( 0 )=1>0
f ( 1 )=−0. 2817<0
e x −3 x=0
e x =3 x
x
e
x= =φ ( x )
3
x
e
φ' ( x ) =
3
0
' e
|φ ( 0 )|=| |=0.3333<1
3
1
' e
|φ ( 1 )|=| |=0.9061<1
3
'
|φ ( x )|<1 fox all x in ( 0, 1 )
Assume x0=1
x
e 0
x 1= =0 . 9061
3
x
e 1
x 2= =0 .8249
3
x
e 2
x 3= =0 .7605
3
x
e3
x 4 = =0. 7131
3
x
e 4
x 5= =0 . 6801
3
x
e 5
x 6 = =0 . 6580
3
x
e 6
x 7= =0 . 6437
3
x
e 7
x 8= =0 . 6345
3
x
e 8
x 9 = =0 . 6287
3
x
e9
x 10= =0 . 6250
3
x
e 10
x 11= =0 . 6228
3
x11
e
x 12= =0 . 6214
3
x
e 12
x 13 = =0 . 6205
3
Practice problems
3
1. Solve the equation x =2 x +5 , by iteration method.
Ans: 2.0945
x
2. Solve the equation cos x−xe =0 , by iteration method.
Ans: 0.517
x
3. Solve by iteration method:
4 x −e =0
Ans : 0.358
f ( xn )
x n+1 =x n − '
f ( x n)
1. Newton’s formula is
'
2. This method is used when f ( x ) can be easily determined.
2
|f ( x ) f ( x )|< ( f ( x ) )
'' '
3. Condition for convergence is: in the interval.
4. The order of convergence of Newton’s method is 2, i.e. the convergence is
quadratic. (The error at any step is proportional to the square of the error in the
previous step).
Problems
Solution:
f ( x )=3 x−cos x −1
Let
f ( 0 )=−2<0
f ( 1 )=1 . 4597>0
'
f ( x )=3+sin x
Therefore the root lies between 0 and 1.
Newton-Raphson’s method
f ( xn )
x n+1 =x n −
f ' ( xn )
x 0=1
Assume
f ( xn )
x n+1 =x n −
f ' ( xn )
Put n=0
f ( x0)
x 1=x 0 −
f ' ( x0 )
f ( 1)
=1−
f ' (1 )
1 . 4597
=1−
3 . 8415
=0.6200
Put n=1
f ( x1 )
x 2=x 1 −
f ' ( x1)
f ( 0 .62 )
=0 . 62−
f ' ( 0 . 62 )
0 .0461
=0 . 62−
3 .5810
=0.6071
Put n=2
f ( x2)
x 3= x 2 −
f ' ( x2)
f ( 0. 6071 )
=0 . 6071−
f ' ( 0 . 6071 )
=0. 6071−0
=0.6071
Solution:
f ( 0 )=−6<0
f ( 1 )=−7<0
f ( 2 )=4>0
Therefore the root lies between 1 and 2.
Newton-Raphson’s formula is
f ( xn )
x n+1 =x n −
f ' ( xn )
' 2
f ( x )=6 x −3
x 0=2
Assume
f ( xn )
x n+1 =x n −
f ' ( xn )
Put n=0
f ( x 0)
x 1=x 0 −
f ' ( x0 )
f (2)
=2−
f ' (2)
4
=2−
21
=1.8095
Put n=1
f ( x1 )
x 2=x 1 − '
f ( x1)
f (1 . 8095 )
=1 . 8095−
f ' ( 1. 8095 )
0 .4212
=2−
16 .6457
=1.9747
Put n=2
f ( x2)
x 3= x 2 −
f ' ( x2)
f ( 1. 9747 )
=1 . 9747−
f ' ( 1 . 9747 )
3 . 4763
=1 . 9747−
20 . 3966
=1.8043
Put n=3
f ( x3 )
x 4 =x 3 −
f ' ( x3)
f (1 . 8043 )
=1 . 8043−
f ' ( 1. 8043 )
0 .3349
=1 .8043−
16 .5330
=1.7840
Put n=4
f ( x4 )
x 5= x 4 −
f ' ( x4 )
f ( 1 .7840 )
=1 .7840−
f ' ( 1. 7840 )
0 .0037
=1 .7840−
16 .0959
=1.7838
Solution:
[
f ' ( x )=x 0 . 43429
1
x]+log e x 0 . 43429
'
f ( x )=0 . 43429+ log 10 x
Newton-Raphson’s formula is
f ( xn )
x n+1 =x n −
f ' ( xn )
x 0=3
Assume
f ( xn )
x n+1 =x n −
f ' ( xn )
Put n=0
f ( x 0)
x 1=x 0 −
f ' ( x0 )
f (3 )
=3−
f ' (3)
0. 23136
=3−
0. 91141
=2.74615
Put n=1
f ( x1 )
x 2=x 1 −
f ' ( x1)
f ( 2 . 74615 )
=2 .74615−
f ' ( 2. 74615 )
0. 00480
=2 .74615−
0 .87301
=2.74065
Put n=2
f ( x2)
x 3=x 2 −
f ' ( x2)
f ( 2 . 74065 )
=2 .74065−
f ' ( 2. 74065 )
=2 .74065−0
=2.74065
Solution:
x
f ( x )=xe −2
Let
f ( 0 )=−2<0
f ( 1 )=0. 7183>0
Therefore the root lies between 0 and 1.
f ' ( x )=xe x +e x
Newton-Raphson’s formula is
f ( xn )
x n+1 =x n −
f ' ( xn )
x 0=1
Assume
f ( xn )
x n+1 =x n −
f ' ( xn )
Put n=0
f ( x 0)
x 1=x 0 −
f ' ( x0 )
f ( 1)
=1−
f ' (1 )
0.7183
=1−
5 .4366
=0.8679
Put n=1
f ( x1 )
x 2=x 1 −
f ' ( x1)
f ( 0 . 8679 )
=0 . 8679−
f ' ( 0 . 8679 )
0. 0673
=0. 8679−
4.4492
=0.8528
Put n=2
f ( x2)
x 3= x 2 −
f ' ( x2)
f ( 0 . 8528 )
=0 . 8528−
f ' ( 0 . 8528 )
0. 0008
=0 .8528−
4 .3471
=0.8526
5. Find an iteration formula of √N where N is the positive number and hence find
√ 12
Solution:
Let x = √N
2
x =N
2
x −N =0
2
f ( x )=x −N …………….(1)
l
f ( x )=2 x
f ( xn )
x n+1 =x n −
f ' ( x n)
=x −
[ x 2n−N ]
n
2 xn
2 2
2 x −x + N
= n n
2 xn
2
x n+ N
=
2 xn
2
xn N
= +
2 x n 2 xn
xn N
x n+1 = +
2 2 xn
……………(2)
2
f ( x )=x −12
x n 12
x n+1 = +
2 2 xn
f ( 0 )=−12<0
f ( 1 )=−11<0
f ( 2 )=−8<0
f ( 3 ) =−3<0
f ( 4 )=4>0
Therefore the root lies between 3 and 4.
x 0=1
Assume
Put n=0
x 0 12
x 1= +
2 2 x0
3 12
= +
2 2 (3)
3
= +2
2
=3.5
x 1 12
x 2= +
2 2 x1
3.5 12
= +
2 2(3 . 5)
=1.75+1.7143
=3.4643
x 2 12
x 3= +
2 2 x2
3 . 4643 12
= +
2 2 ( 3. 4643 )
=1.7322+1.7320
=3.4643
6. Find an iteration formula to find the reciprocal of given number N and hence find
the value of 1/31
Solution:
1
Let x = N
1
N=
x
1
N− =0
x
1
f ( x )=N −
x …………….(1)
1
f l ( x )=
x2
f ( xn )
x n+1 =x n − '
f ( x n)
=x n −
[ N−
1
xn ]
1
x2n
2
2 xn
=x n −x n N +
xn
2
=x n −x n N +x n
2
x n+1 =2 x n− xn N
……………(2)
To find 1/31
1
f ( x )=31−
x
2
x n+1 =2 x n−31 x n
1
x 0=
30
Assume
Put n=0
2
x 1=2 x 0 −31 x 0
=
2
30
−31 ( )
1
900
=0.0322
Put n=1
x 2=2 x 1−31 x 21
2
=2 ( 0 .0322 )−31 ( 0. 0322 )
=0.0323
Practice problems
Ans:11.595
4
2. By using Newton-Raphson’s method, find the root of x −x−10=0
Ans:1.856
. Find an iteration formula of √N where N is the positive number and hence find
3
√ 11
Ans:3.3170
Solution of a system of non-linear equations by Newton-Raphson method
Method 1
f fy gf y−fg y fg x−gf x
J =| x |=f x g y −f y g x , h= , k=
gx gy J J
4. Also find the values of
5. Now set
x 1=x 0 + h , y 1 = y 0 +k .
6. Using
x 1 and y 1 , repeat steps 3 and 4 to get x 2 and y 2 .
Method 2
f ( xi , yi)
x i+1 =x i−
f x ( xi , yi)
g ( xi , y i )
y i +1 = y i −
g y ( xi , yi)
Iterate using the latest available values of x and y , till we get the desired accuracy.
Example1 (Method 1)
2 2
Using Newton-Raphson method, solve: x + y−11=0 , y +x−7=0 starting with the approximate
solution
x 0=3. 5 and y 0 =−1. 5 .
Answer:
f ( x , y ) =x 2 + y−11
2
g ( x , y )= y +x−7
f x =2 x
f y =1
g x=1
g y =2 y
f fy
J =| x |=f x g y −f y g x= ( 2 x ) (2 y )− (1 ) ( 1 )=4 xy
gx g y
gf y−fg y
h=
J
fg −gf x
k= x
J
We find the required values in the following table:
To find
x1 , y1 To find
x2 , y2
To find
x3 , y3
x 0=3. 5 x 1=3 .5682 x 2=3 . 5845
y 0 =−1.5 y 1=−1.8864 y 2 =−1.8485
f =x 2 + y−11 -0.25 -0.1543 0.0001
2 -1.25 0.1267 0.0015
g= y +x −7
f x =2 x 7 7.1364 7.1690
f y =1 1 1 1
g x=1 1 1 1
g y =2 y -3 -3.7728 -3.6970
J=4 xy -22 -27.9242 27.5038
gf y −fg y 0.0682 0.0163 -0.0001
h=
J
fg x −gf x -0.3864 0.0379 0.0004
k=
J
x n+1 =x n + h 3.5682 3.5845 3.5844
y n+1= y n +k -1.8864 -1.8485 -1.8481
starting with
x 0=0. 4 and y 0 =0 . 9
Answer.
f ( x , y ) = y 2 +4 x 2 +2 xy− y−2=0
2 2
g ( x , y )= y +2 x +3 xy−3=0
f x =8 x+2 y
g y =2 y +3 x
2 2
y +4 x +2 xy− y−2
x i+1 =x−
8 x +2 y
2 2
y +2 x +3 xy −3
y i+1 = y i −
2 y+3 x
We iterate using these formulae, using the latest available values.
x y
0.4 0.9
0.5460 0.9348
0.5216 0.9695
0.5101 0.9857
0.5048 0.9932
0.5023 0.9967
0.5011 0.9984
0.5005 0.9993
0.5002 0.9997
0.5001 0.9999
0.5 1
0.5 1
The required solution is x=0.5 , y=1
2 2 2 2
3. Using Newton-Raphson method, solve: x + y =16 , x − y =4 starting with the approximate
solution ( 2 √2 , 2 √2 ) .
4. Using Newton-Raphson method, solve:
f ( x , y ) = y 2 +4 x 2 +2 xy− y−2=0
2 2 x 0=0. 4 and y 0 =0 . 9
g ( x , y )= y +2 x +3 xy−3=0 starting with
2 2 2 2
5. Solve x − y = y , x + y =x , x 0 =0 . 8 , y 0 =0. 4 , by Newton Raphson method.
Problems:
1. Apply Gauss Elimination and Gauss Jordan method to find the solution of the
following system 10 x+ y +z=12 , 2 x +10 y+ z=13 , x+ y+5 z=7
Solution:
( )
10 1 1 12
( A , B ) = 2 10 1 13
1 1 5 7
( )
1 1 5 7
2 10 1 13 by { R 1 ↔ R3
~
10 1 1 12
( )
1 1 5 7
0 8 −9 −1 by ¿ {R 2 → R2−2R 1 ¿ ¿¿
~
0 −9 −49 −58
( )
1 1 5 7
0 8 −9 −1 by R3 →8 R3 +9 R2
~
0 0 −473 −473
(3)⇒−473 z=−473
z=1
8 y−9 ( 1 )=−1
y=1
(1)⇒ x+ y+ 5 z =7
x+1+5 ( 1 )=7
x=1
( )
1 1 5 7
0 8 −9 −1
0 0 −473 −473
( )
51 1
7
9 1 R2
0 1 − − by ¿ R2 → ¿ ¿ ¿
8 8 8 {
~
0 0 1 1
( )
1 1 5 7
9
{
0 1 0 1 by R 2 → R2 + R 3
0 0 1 1
8
( )
1 1 5 6
0 1 0 1 by { R1 →R 1−R 2
0 0 1 1
( )
1 0 0 1
0 1 0 1 by { R1 → R1 −5 R3
~
0 0 1 1
( )( ) ( )
1 2 1 x 3
2 3 3 y = 10
3 −1 2 z 13
The augmented matrix is
( )
1 2 1 3
( A ,B ) = 2 3 3 10
3 −1 2 13
( )
1 2 1 3
0 −1 1 4 by ¿ {R 2=R 2−2R1 ¿ ¿¿
~
0 −7 −1 4
( )
1 2 1 3
0 −1 1 4 by { R 3 → R3 −7 R2
~
0 0 −8 −24
(3)⇒−8 z=−24
z=3
(2)⇒− y + z=4
− y +3=4
y=-1
x=2
( )
1 2 1 3
0 −1 1 4
0 0 −8 −24
( )
1 2 1 3
0 1 −1 −4 by { R2 → R2 (−1 )
~
0 0 −8 −24
( )
1 0 3 11
0 1 −1 −4 by { R1 → R1 −2 R 2
0 0 −8 −24
( ) {
1 0 3 11 R3
0 1 −1 −4 by R3 →
−8
0 0 1 3
( )
1 0 0 2
0 1 0 −1 by ¿ { R1→ R1 −3 R3 ¿ ¿¿
~
0 0 1 3
Hence the solution is x=2 , y=−1 , z=3 .
( )( ) ( )
1 1 1 1 x 2
2 −1 2 −1 y −5
=
3 2 3 4 z 7
1 −2 −3 2 w 5
( )
1 1 1 1 2
( A , B ) = 2 −1 2 −1 −5
3 2 3 4 7
1 −2 −3 2 5
( )
1 1 1 1 2
0 −3 0 −3 −9 by ¿ R →R −2 R R →R −3 R ¿¿
0 −1 0 1 1 { 2 2 1¿{ 3 3 1¿
~
0 −3 −4 1 3
( )
1 1 1 1 2
0 1
0 −1 0
0 1
1
3
1 {
by R 2 →
R3
−3
1 −3 −4 1 3
( )
1 0 1 0 −1
0 1 0 1 3
by ¿ { R1 →R1−R2 ¿ { R3 →R3+R 2 ¿ ¿¿
0 0 0 2 4
0 0 −4 4 12
~
( )
1 0 1 0 −1
0 1 0 1 3
by { R3 ↔ R4
0 0 −4 4 12
0 0 0 2 4
( )
1 0 1 0 −1
0
0
1
0
0 1 3 by ¿ R → R3 ¿ ¿¿
1 −1 −3 3
−4 {
0 0 0 1 2
( )
1 0 0 1 2
0 1 0 1 3
by {R 1 → R1 −R3
0 0 1 −1 −3
~
0 0 0 1 2
( )
1 0 0 0 0
0 1 0 0 1
by ¿ {R 1→R1−R4 ¿ { R 2→R2−R4 ¿ ¿¿
0 0 1 0 −1
~
0 0 0 1 2
Practice Problems:
We can use Gauss Jordan method to find the inverse of a non-singular matrix:
1. Form the augmented matrix ( A , I ) where I is the identity matrix of the same order as A.
( )
1 1 2
1 2 3
1. Find the inverse of the matrix
2 3 1 by Gauss Jordan method.
( )
1 1 2
1 2 3
Let A=
2 3 1
( )
1 1 2 1 0 0
( A / I )= 1 2 3 0 1 0
2 3 1 0 0 1
( )
1 1 2 1 0 0
0 1 1 −1 1 0 by ¿ { R2 →R 2−R 1 ¿ ¿¿
~
0 1 −3 −2 0 1
( )
1 0 1 2 −1 0
0 1 1 −1 1 0 by ¿ { R1 →R1 −R2 ¿ ¿¿
0 0 −4 −1 −1 1
( )
1 0 1 2 −1 0
0 1 1 −1 1 0 1
by R 3 →− R3
1 1 1 4
0 0 1 −
~
4 4 4
( )
7 5 1
1 0 0 −
4 4 4
5 3 1
0 1 0 − by ¿ { R1 → R1 −R3 ¿ ¿ ¿
4 4 4
1 1 1
0 0 1 −
4 4 4
~
( )
7 5 1
−
4 4 4
5 3 1
A−1 = −
4 4 4
1 1 1
−
4 4 4
Hence
( )
1 2 −1
4 1 0
2. Find the inverse of the matrix
2 −1 3 by Gauss Jordan method.
Solution
( )
1 2 −1
4 1 0
Let A =
2 −1 3
( )
1 2 −1 1 0 0
( A / I )= 4 1 0 0 1 0
2 −1 3 0 0 1
( )
1 2 −1 1 0 0
0 −7 4 −4 1 0 by ¿ { R 2 → R2 −4 R 1 ¿ ¿¿
~
0 −5 5 −2 0 1
( )
1 2 −1 1 0 0
−4 4 −1
0 1 0 by ¿ { R 2 → R2 /−7 ¿ ¿ ¿
7 7 7
0 −5 5 −2 0 1
( )
1 −1 2
1 0 0
7 7 7
−4 4 −1
0 1 0 by ¿ { R1 → R1 −2 R 2 ¿ ¿ ¿
7 7 7
15 6 −5
0 0 1
7 7 7
~
( )
1 −1 2
1 0 0
7 7 7
−4 4 −1
0 1 0 by ¿ { ¿ ¿ ¿
7 7 7
6 −1 7
0 0 1
15 3 15
~
( )
1 1 −1
1 0 0 −
5 3 15
0 1 0
4
5
−1
3
4
15
1
{
by ¿ R1 →R1 − R3 ¿ ¿ ¿
7
6 −1 7
0 0 1
15 3 15
~
( )
−1 1 −1
5 3 15
4 −1 4
A−1 =
5 3 15
2 −1 7
5 3 15
( )
1 0 −4
0 −1 2
3. Find the inverse of the matrix
−1 2 1 by Gauss Jordan method.
Solution
( )
1 0 −4
0 −1 2
Let A =
−1 2 1
( )
1 0 −4 1 0 0
( A / I )= 0 −1 2 0 1 0
−1 2 1 0 0 1
( )
1 0 −4 1 0 0
0 −1 2 0 1 0
~
−1 2 1 0 0 1
( )
1 0 −4 1 0 0
0 −1 2 0 1 0 by { R3 → R3 +R 1
0 2 −3 1 0 1
( )
1 0 −4 1 0 0
0 1 −2 0 −1 0 by { R 2∗(−1 )
~
0 2 −3 1 0 1
( )
1 0 −4 1 0 0
0 1 −2 0 −1 0 by { R3 → R3 −2 R 2
0 0 1 1 2 1
( )
1 0 0 5 8 4
0 1 0 2 3 2 by ¿ { R1 →R 1 +4 R 3 ¿ ¿¿
~
0 0 1 1 2 1
( )
5 8 4
−1
A =2 3 2
1 2 1
Practice Problems:
( )
1 1 3
1 3 −3
1. Find the inverse of
−2 −4 4 using Gauss Jordan method
( )
7 −3 −3
2 2 2
−1 1
A−1 = 0
2 2
−1 1
0
2 2
Ans
( )
4 1 2
2 3 −1
2. Find the inverse of
1 −2 2 using Gauss Jordan method
( )
−1 1 −1
5 3 15
4 −1 4
A−1 =
5 3 15
2 −1 7
5 3 15
Ans
( )
0 1 1
1 2 0
3. Find the inverse of
3 −1 4 using Gauss Jordan method
( )
8 2
−1
3 3
−4 −1
A−1 = 1
3 3
7 1
−1
3 3
Ans
1. Gauss-Jacobi method
2. Gauss-Seidel method
Sufficient condition:
Each equation of the system must possess one large coefficient and the large coefficient must be attached
to a different unknown in each equation. This condition will be satisfied if the large coefficients are along
the leading diagonal of the coefficient matrix.
|a11|>|a12|+|a 13|
|a 21|>|a22|+|a23|
|a 31|>|a32|+|a33| , i.e., the system is diagonally dominant
Gauss-Jacobi method
a1 x +b1 y+ c1 z =d 1
a2 x +b 2 y+ c 2 z=d 2
a x +b 3 y +c 3 z=d 3 , which is diagonally dominant
Consider 3
d 1 −b1 y −c 1 z
x=
a1
d −a x−c 2 z
y= 2 2
b2
d 3 −a 3 x−b3 y
z=
c3
(0 ) ( 0) ( 0)
Use initial values x , y , z and get x( 1 ) , y (1 ) , z (1 ) . Use these values and get x (2 ) , y (2 ) , z (2 ) .
Proceed till we get the desired accuracy.
Gauss-Seidel method
( 0) ( 0) (1 ) (1 ) (0 ) ( 1) (1 ) (1 )
Here we use initial values y , z and get x . Then use x , z to get y . Use x , y to get z ( 1 ) .
Continue by using the latest available values every time, till we get the desired accuracy.
Note 1: The current values of the unknowns at each stage of iteration are used to find the forthcoming
values , hence Gauss-Seidel method converges faster than Gauss-Jacobi method. The convergence in
Gauss-Seidel method is nearly two times that of Gauss-Jacobi method.
Note 2: Iteration method is a self-correcting method. i.e., any error made in computation is corrected in
the subsequent iterations.
Problems
10x+2 y+z=9
x+10 y−z=−22
−2x+3 y+10 z=22
Answer:
|10|≻|2|+|1|
|10|≻|1|+|1|
|10|≻|2|+|3|
The given system of equations is diagonally dominant. So we rewrite the equations as
1
x= ( 9−2 y −z )
10
1
y= (−22−x+z )
10
1
z= ( 22+2 x −3 y )
10
We start with initial values x=0, y=0, z=0 and iterate, using the values obtained in the previous step
8 x−3 y+2z=20
6 x+3 y+12 z=35
4 x+11 y−z=33
Answer: The given system of equations is not diagonally dominant. So we rearrange the given system
of equation in such a way that it is diagonally dominant.
8 x−3 y+2z=20
4 x+11 y−z=33
6 x+3 y+12 z=35 .
|8|≻|3|+|2|
|11|≻|4|+|1|
|12|≻|6|+|3|
Then we rewrite them as:
1
x= ( 20+3 y−2 z )
8
1
y= ( 33−4 x+z )
11
1
z= ( 35−6 x−3 y )
12
We start with initial values y=0, z=0 and iterate, using the latest available values everytime.
Iteration 1 1 1
x= ( 20+3 y−2 z ) y= ( 33−4 x +z ) z= ( 35−6 x−3 y )
8 11 12
Initial - 0 0
1 2.5 2.091 1.1439
2 2.9244 2.0674 0.9376
3 3.0409 1.9795 0.9013
4 3.0170 1.9848 0.9120
5 3.0163 1.9861 0.9120
6 3.0168 1.9859 0.9118
7 3.0168 1.9859 0.9118
x=3.017, y=1 .986 , z=0.912
Hence the required solution is
x+ y+54 z=110
6 x+15 y+2 z=72
27 x+6 y−z=85
Solution:
The given system of equations is not diagonally dominant. So we rearrange the given system of equation
in such a way that it is diagonally dominant.
27 x+6 y−z=85
6 x+15 y+2 z=72
x+ y+54 z=110
Then we rewrite them as
1
x= ( 85−6 y +z )
27
1
y= ( 72−6 x−2 z )
15
1
z= ( 110−x− y )
54
We start with initial values x=0, y=0, z=0 and iterate, using the values obtained in the previous step
Iteration 1 1 1
x= ( 85−6 y +z ) y= ( 72−6 x −2 z ) z= ( 110−x− y )
27 15 54
Initial 0 0 0
1 3.1481 4.8000 2.0370
2 2.1569 3.2692 1.8899
3 2.4917 3.6854 1.9366
4 2.4009 3.5451 1.9226
5 2.4316 3.5833 1.9269
6 2.4232 3.5704 1.9257
7 2.4260 3.5740 1.9260
8 2.4253 3.5728 1.9259
9 2.4255 3.5731 1.9260
10 2.4255 3.5731 1.9260
We start with initial values y=0, z=0 and iterate, using the latest available values everytime.
Iteration 1 1 1
x= ( 85−6 y +z ) y= ( 72−6 x −2 z ) z= ( 110−x− y )
27 15 54
Initial - 0 0
1 3.1481 3.5408 1.9132
2 2.4322 3.5720 1.9260
3 2.4257 3.5729 1.9260
4 2.4255 3.5730 1.9260
Hence the required solution is x=2.426, y=3.573 , z=1.926
Practice Problems
Power method to find the numerically largest eigenvalue and corresponding eigenvector
X
1. Let A be a matrix and 1 be an arbitrary vector chosen as the initial approximation of the required
eigenvector (with a component as 1) .
2. Find
AX 1 and write it as AX 1 =λ 1 X 2 (by taking out the largest component λ1 of X 1 ). Now λ1 is
X
the approximate eigen value and 2 is the corresponding approximate eigenvector.
4. This sequence converges to give the dominant eigenvalue and the corresponding eigenvector.
Note:
1. To find numerically smallest eigen value of A obtained the dominant eigen value
λ1
2. Then the second eigen value of A is equal to the dominant eigen value of B+
λ1
() () () ()
1 0 0 1
0 1 0 1
3. Then we select the initial eigen vector be
0 0 1 1
, , ,
Problems
1. Use power method to find the dominant eigenvalue and the corresponding eigenvector of the
matrix
A= ( 41 23 ) . Also find the other eigenvalue.
Solution:
( )
A= 4 2
1 3
Given
( )( ) ( )
AX 5 = 4 2 1 = 4 . 96 =4 . 96 1
1 3 0 . 48 2 .44 0. 49 ( )
( )( ) ( )
AX 6 = 4 2 1 = 4 . 98 =4 . 98 1
1 3 0 . 49 2 . 47 0 . 49 ( )
( )( ) ( )
AX 7 = 4 2 1 = 4 . 98 =4. 98 1
1 3 0 . 49 2 . 47 0. 49 ( )
λ
Hence the dominant eigenvalue of A is 1 4.98 and the corresponding eigenvector is
=
(0.491 )
Sum of eigen values = Trace of the matrix.
4 . 98+ λ2 =7 ⇒ λ 2=2. 02
( )
25 1 2
A= 1 3 0
2. Find the numerically largest eigenvalue of
2 0 −4 and the corresponding eigen vector.
Solution:
( )
25 1 2
A= 1 3 0
Given
2 0 −4
()
1
X 1= 0
Let
0
( )( ) ( ) ( )
25 1 2 1 25 1
AX 1 = 1 3 0 0 = 1 =25 0 . 04
2 0 −4 0 2 0 . 08
( )( )( ) ( )
25 1 2 1 25. 2 1
AX 2 = 1 3 0 0 .04 = 1. 1200 =25 . 2 0 .0444
2 0 −4 0 .08 1 .6800 0. 0667
( )( )( ) ( )
25 1 2 1 25 . 1778 1
AX 3 = 1 3 0 0 .0444 = 1. 1332 =25 . 1778 0 . 0450
2 0 −4 0 .0667 1 .7332 0 . 0688
( )( )( ) ( )
25 1 2 1 25 .1826 1
AX 4 = 1 3 0 0 .0450 = 1 .1350 =25 . 1826 0 . 0451
2 0 −4 0 .0688 1 .7248 0 . 0685
( )( )( ) ( )
25 1 2 1 25. 1821 1
AX 5 = 1 3 0 0 .0451 = 1. 1353 =25 .1821 0 . 0451
2 0 −4 0 . 0685 1 . 7260 0 .0685
( )( )( ) ( )
25 1 2 1 25. 1821 1
AX 6 = 1 3 0 0 .0451 = 1. 1353 =25 .1821 0 . 0451
2 0 −4 0 . 0685 1 . 7260 0 .0685
( )
1
0 .0451
A is λ1 = 25.1821 and the corresponding eigenvector is 0 .0685
( )
1 6 1
A= 1 2 0
3. Find the dominant eigenvalue and the corresponding eigenvector of
0 0 3 by power method.
Find the other eigenvalue also.
Solution:
( )
1 6 1
A= 1 2 0
Given
0 0 3
()
1
X 1= 0
Let
0
( )( ) ( ) ( )
1 6 1 1 1 1
AX 1 = 1 2 0 0 = 1 =1 1
0 0 3 0 0 0
( )( ) ( ) ( )
1 6 1 1 7 1
AX 2 = 1 2 0 1 = 3 =7 0 . 4286
0 0 3 0 0 0
( )( ) ( ) ( )
1 6 1 1 3. 5716 1
AX 3 = 1 2 0 0 . 4286 = 1. 8572 =3 .5716 0 .52
0 0 3 0 0 0
( )( ) ( ) ( )
1 6 1 1 4. 12 1
AX 4 = 1 2 0 0 . 52 = 2. 04 =4. 12 0 .4951
0 0 3 0 0 0
( )( ) ( ) ( )
1 6 1 1 3 . 9706 1
AX 5 = 1 2 0 0 . 4951 = 1 . 9902 =3. 9702 0. 5012
0 0 3 0 0 0
( )( ) ( ) ( )
1 6 1 1 4 . 0072 1
AX 6 = 1 2 0 0 .5012 = 2. 0024 =4 .0072 0 .4997
0 0 3 0 0 0
( )( ) ( ) ( )
1 6 1 1 3 . 9982 1
AX 7 = 1 2 0 0 . 4997 = 1. 9994 =3. 9982 0 .5001
0 0 3 0 0 0
( )( ) ( ) ( )
1 6 1 1 4 . 0006 1
AX 8= 1 2 0 0 . 5001 = 2 . 0002 =4 .0006 0 . 5000
0 0 3 0 0 0
( )( ) ( ) ( )
1 6 1 1 4 1
AX 9 = 1 2 0 0 .5 = 2 =4 0 .5
0 0 3 0 0 0
()
1
0.5
λ
Hence the dominant eigenvalue of A is 1 = 4 and the corresponding eigenvector is
0
( )( )
1 6 1 4 0 0
B= 1 2 0 − 0 4 0
0 0 3 0 0 4
( )
−3 6 1
B= 1 −2 0
0 0 −1
()
1
Y 1= 0
Let
0
( )( ) ( ) ( )
−3 6 1 1 −3 1
BY 1 = 1 −2 0 0 = 1 =−3 −0 . 3333
0 0 −1 0 0 0
( )( ) ( ) ( )
−3 6 1 1 −4 . 9998 1
BY 2 = 1 −2 0 −0 .3333 = 1.6666 =−4 . 9998 −0. 3333
0 0 −1 0 0 0
( )( ) ( ) ( )
−3 6 1 1 −4 . 9998 1
BY 3 = 1 −2 0 −0. 3333 = 1 .6666 =−4 .9998 −0 . 3333
0 0 −1 0 0 0
Hence the dominant eigenvalue = -5
= -1
λ1 + λ2 + λ3 =1+2+3
4−1+λ 3 =6
λ3 =3
Practice problems
( )
5 0 1
A= 0 −2 0
1 0 5
Using power method, find the dominant eigenvalue and the corresponding eigenvector of
2.