Notes-Unit I-Num Sol of Algebraic & Trans Equns-ASV
Notes-Unit I-Num Sol of Algebraic & Trans Equns-ASV
Eg: x 3 − 2 x 2 − 7 x + 24 = 0
Transcendental equations:
Example
2ex+1=0
log10 x-2x=12
Roots of an equation
If an equation has two equal roots, the x-axis is tangential to the graph at
that point.
For example, the equation x 2 = 0 has a double root at x = 0 . The graph of
y = x 2 has x-axis as a tangent at x = 0
Note:
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 )
2. The first approximation of the root is x1 =
f (b ) − f (a )
3. Now either f (a ) and f (x1 ) have opposite signs or f (x1 ) and f (b) have
opposite signs.
4. If f (a ) and f (x1 ) have opposite signs, then the root lies between a and x1 .
af (x1 ) − x1 f (a )
x2 =
f (x1 ) − f (a )
Note: If f (x1 ) and f (b) have opposite signs, then the root lies between
x1 and b .
x1 f (b ) − bf (x1 )
x2 = .
f (b ) − f (x1 )
Problems:
Solution:
Let
f (x ) = xex − 2
f (0 ) = −2 0
f (1) = 0.7183 0
af (b ) − bf (a )
By Reulafalsi method xn =
f (b ) − f (a )
Solution:
Let
f (x) = x − cos x
f (0 ) = −1 0
f (1) = 0.4597 0
af (b ) − bf (a )
By Reulafalsi method xn =
f (b ) − f (a )
Solution:
f (x ) = x log10 x − 1.2
f (1) = −1.2000 0
f (2) = −0.5979 0
f (3) = 0.2314 0
af (b ) − bf (a )
By Reulafalsi method xn =
f (b ) − f (a )
Iteration a B f(a) f(b)
xn =
( AD − BC ) f(xn)
(A) (B) (C) (D) (D − C )
1 2 3 -0.5979 0.2314 2.7210 -0.0171
2 2.7210 3 -0.0171 0.2314 2.7402 -0.0004
3 2.7402 3 -0.0004 0.2314 2.7406 0
4 2.7406 3 0 0.2314 2.7406 0
Hence the root is 2.741
Solution:
Let
f (x ) = x 3 − 2 x − 5
f (0 ) = −5 0
f (1) = −6 0
f (2) = −1 0
f (3) = 16 0
af (b ) − bf (a )
By Reulafalsi method xn =
f (b ) − f (a )
Solution
g (0) = −4.0000 0
g (1) = −0.4000 0
g (2) = 0.2000 0
ag (b ) − bg (a )
By Reulafalsi method xn =
g (b ) − g (a )
a b g(a) g(b)
xn =
( AD − BC ) g(xn)
(A) (B) (C) (D) (D − C )
1 1 2 -0.4 0.2 1.6667 0.7704
2 1 1.6661 -0.4 0.7704 1.2279 0.2695
3 1 1.2279 -0.4 0.2695 1.1362 0.0272
4 1 1.1362 -0.4 0.0272 1.1275 0.0022
5 1 1.1275 -0.4 0.0022 1.1268 0.0001
6 1 1.1268 -0.4 0.0001 1.1268 0.0001
The root of g(x) is 1.127
Practice problems
Ans : 0.254
Ans : 4.967
Ans : 2.365
4. Solve the equation xtan x = −1 by Regula falsi method starting with a=2.5 and
b=3 correct to 3 decimal places.
Ans : 2.798
Fixed point iteration method (Iteration method)
1. Find an interval (a, b) in which the root lies. i.e., such that f (a ) and f (b) have
opposite signs
f (x ) = 0 .
Note:1. Condition for convergence of fixed point iteration method is that (x ) 1 .
1. Find the real root of cos x = 3x − 1 , by iteration method. Correct to four decimal
places.
Solution:
f (0) = 2 0
f (1) = −1.45970 0
cos x = 3x −1
3x = cos x + 1
cos x + 1
x= = (x )
3
− sin x
' (x ) =
3
− sin 0
(0) = = 0 1
3
− sin1
(1) = = 0.28049 1
3
Assume x0=1
cos x0 + 1 cos1 + 1
x1 = = = 0.51343
3 3
cos x1 + 1
x2 = = 0.62369
3
cos x2 + 1
x3 = = 0.60391
3
cos x3 + 1
x4 = = 0.60771
3
cos x4 + 1
x5 = = 0.60699
3
cos x5 + 1
x6 = = 0.60712
3
cos x6 + 1
x7 = = 0.60710
3
X0=0.5
cos(0.5)+1
𝑥1 = = 0.62586
3
cos(0.62586)+1
𝑥2 = =0.60349
3
cos(0.60349)+1
𝑥3 = = 0.60779
3
cos(0.60779)+1
𝑥4 = = 0.60697
3
cos(0.60697)+1
𝑥5 = =0.60712
3
cos(0.60712)+1
𝑥6 = =0.60710
3
Solution:
Let f (x ) = 2 x − log10 x − 7
f (1) = −5.0000 0
f (2 ) = −3.3010 0
f (3) = −1.4771 0
f (4 ) = 0.3979 0
2 x − log10 x = 7
2 x = log10 x + 7
log 10 x + 7
x= = (x )
2
d
log10 x = d log e x log10 e
dx dx
=
d
0.4343 log e x
dx Typeequationhere.
0.4343
=
x
1 0.4343
' (x ) =
2 x
' (x ) =
0.2172
x
(3) =
0.2172
= 0.0724 1
3
(4) =
0.2172
= 0.0543 1
4
Assume x0=4
log 10 x0 + 7
x1 = = 3.8010
2
log 10 x1 + 7
x2 = = 3.7900
2
log10 x2 + 7
x3 = = 3.7893
2
log10 x3 + 7
x4 = = 3.7893
2
Solution:
Let f (x ) = x + x − 1
3 2
f (0) = −1 0
f (1) = 1 0
x3 + x 2 = 1
Typeequationhere.
x 2 (x + 1) = 1
1
x2 =
1+ x
= (1 + x ) 2 = (x )
1 1
−
x=
1+ x
' (x ) = − (1 + x )− 2
1 3
' (x ) = −
1
2(1 + x ) 2
3
' (0) = −
1
= 0.5 1
2(1 + 0)
3
2
' (1) = −
1
= 0.1768 1
2(1 + 1) 2
3
(x) 1 fox all x in (0, 1)
Assume x0=0
1
x1 = =1
1 + x0
1
x2 = = 0.7071
1 + x1
1
x3 = = 0.7654
1 + x2
1
x4 = = 0.7526
1 + x3
1
x5 = = 0.7554
1 + x4
1
x6 = = 0.7548
1 + x5
Solution:
Let f (x ) = 3 x − 1 + sin x
f (0 ) = −1 0
f (1) = 1.6430 0
3x − 1 + sin x = 0
1 + sin x = (x )
1
x=
3
' (x ) = (1 + sin x )− 2 cos x
11 1
32
' (x ) =
1
cos x
6 1 + sin x
' (0) =
1
cos 0 = 0.1667 1
6 1 + sin 0
' (1) =
1
cos1 = 0.544 1
6 1 + sin1
Assume x0=0
1
x1 = 1 + sin x0 = 0.3333
3
1
x2 = 1 + sin x1 = 0.3840
3
1
x3 = 1 + sin x2 = 0.3908
3
1
x4 = 1 + sin x3 = 0.3917
3
1
x5 = 1 + sin x4 = 0.3918
3
Solution:
Let f (x ) = e − 3x
x
f (0 ) = 1 0
f (1) = −0.2817 0
e x − 3x = 0
e x = 3x
ex
x= = (x )
3
ex
' (x ) =
3
e0
' (0) = = 0.3333 1
3
e1
(1) =
'
= 0.9061 1
3
Assume x0=1
e x0
x1 = = 0.9061
3
e x1
x2 = = 0.8249
3
e x2
x3 = = 0.7605
3
e x3
x4 = = 0.7131
3
e x4
x5 = = 0.6801
3
e x5
x6 = = 0.6580
3
e x6
x7 = = 0.6437
3
e x7
x8 = = 0.6345
3
e x8
x9 = = 0.6287
3
e x9
x10 = = 0.6250
3
e x10
x11 = = 0.6228
3
e x11
x12 = = 0.6214
3
e x12
x13 = = 0.6205
3
Practice problems
Ans: 2.0945
Ans: 0.517
Ans : 0.358
f (xn )
1. Newton’s formula is xn+1 = xn −
f (xn )
Problems
Solution:
f (0 ) = −2 0
f (1) = 1.4597 0
f ' (x ) = 3 + sin x
Newton-Raphson’s method
f (xn )
xn +1 = xn −
f (xn )
Assume x0 = 1
f (xn )
xn +1 = xn −
f (xn )
Put n=0
f (x0 )
x1 = x0 −
f ' (x0 )
f (1)
= 1−
f ' (1)
1.4597
=1−
3.8415
=0.6200
Put n=1
f (x1 )
x2 = x1 −
f ' (x1 )
f (0.62)
= 0.62 −
f ' (0.62)
0.0461
= 0.62 −
3.5810
=0.6071
Put n=2
f (x2 )
x3 = x2 −
f ' (x2 )
f (0.6071)
= 0.6071 −
f ' (0.6071)
= 0.6071 − 0
=0.6071
Solution:
Let f (x ) = 2 x3 − 3x − 6
f (0) = −6 0
f (1) = −7 0
f (2) = 4 0
Newton-Raphson’s formula is
2𝑥 3 − 3𝑥 − 6
𝑥−( )
6𝑥 2 − 3
f (xn )
xn +1 = xn −
f (xn )
f ' (x ) = 6 x 2 − 3
Assume x0 = 2
f (xn )
xn +1 = xn −
f (xn )
Put n=0
f (x0 )
x1 = x0 −
f ' (x0 )
f (2)
=2−
f ' (2)
4
=2−
21
=1.8095
Put n=1
f (x1 )
x2 = x1 −
f ' (x1 )
f (1.8095)
= 1.8095 −
f ' (1.8095)
0.4212
= 2−
16.6457
=1.9747
Put n=2
f (x2 )
x3 = x2 −
f ' (x2 )
f (1.9747 )
= 1.9747 −
f ' (1.9747 )
3.4763
= 1.9747 −
20.3966
=1.8043
Put n=3
f (x3 )
x4 = x3 −
f ' (x3 )
f (1.8043)
= 1.8043 −
f ' (1.8043)
0.3349
= 1.8043 −
16.5330
=1.7840
Put n=4
f (x4 )
x5 = x4 −
f ' (x4 )
f (1.7840)
= 1.7840 −
f ' (1.7840)
0.0037
= 1.7840 −
16.0959
=1.7838
2𝑥 3 − 3𝑥 − 6
𝑥−( )
6𝑥 2 − 3
X0=1.5
X1=1.85714
X2=1.78711
X3=1.78378
X4=1.78377
X5=1.78377
Solution:
f (1) = −1.2 0
f (2) = −0.59794 0
f (3) = 0.23136 0
1
f ' (x ) = x 0.43429 + log e x 0.43429
x
Newton-Raphson’s formula is
f (xn )
xn +1 = xn −
f (xn )
Assume x0 = 3
f (xn )
xn +1 = xn −
f (xn )
Put n=0
f (x0 )
x1 = x0 −
f ' (x0 )
f (3)
= 3−
f ' (3)
0.23136
= 3−
0.91141
=2.74615
Put n=1
f (x1 )
x2 = x1 −
f ' (x1 )
f (2.74615)
= 2.74615 −
f ' (2.74615)
0.00480
= 2.74615 −
0.87301
=2.74065
Put n=2
f (x2 )
x3 = x2 −
f ' (x2 )
f (2.74065)
= 2.74065 −
f ' (2.74065)
= 2.74065 − 0
=2.74065
Solution:
Let f (x ) = xex − 2
f (0 ) = −2 0
f (1) = 0.7183 0
f ' (x ) = xex + e x
Newton-Raphson’s formula is
f (xn )
xn +1 = xn −
f (xn )
Assume x0 = 1
f (xn )
xn +1 = xn −
f (xn )
Put n=0
f (x0 )
x1 = x0 −
f ' (x0 )
f (1)
= 1−
f ' (1)
0.7183
=1−
5.4366
=0.8679
Put n=1
f (x1 )
x2 = x1 −
f ' (x1 )
f (0.8679)
= 0.8679 −
f ' (0.8679)
0.0673
= 0.8679 −
4.4492
=0.8528
Put n=2
f (x2 )
x3 = x2 −
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
x2 = N
x2 − N = 0
f (x ) = x 2 − N …………….(1)
f l (x ) = 2 x
f (xn )
xn +1 = xn −
f (xn )
= xn −
x2
n −N
2 xn
2 xn2 − xn2 + N
=
2 xn
xn2 + N
=
2 xn
xn2 N
= +
2 xn 2 xn
xn N
xn + 1 = +
2 2 xn
……………(2)
f (x ) = x 2 − 12
xn 12
xn + 1 = +
2 2 xn
f (0) = −12 0
f (1) = −11 0
f (2 ) = −8 0
f (3) = −3 0
f (4 ) = 4 0
Assume x0=3.5
Put n=0
x0 12
x1 = +
2 2 x0
3 12
= +
2 2(3)
3
= +2
2
=3.5
x1 12
x2 = +
2 2 x1
3.5 12
= +
2 2(3.5)
=1.75+1.7143
=3.4643
x2 12
x3 = +
2 2 x2
3.4643 12
= +
2 2(3.4643)
=1.7322+1.7320
=3.4643
X1=3.464
X2=3.464
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
f (x ) = N −
1
…………….(1)
x
f l (x ) =
1
x2
f (xn )
xn +1 = xn −
f (xn )
1
N −
= xn −
xn
1
xn2
xn2
= xn − xn2 N +
xn
= xn − xn2 N + xn
xn+1 = 2 xn − xn2 N
……………(2)
To find 1/31
f (x ) = 31−
1
x
xn +1 = 2 xn − 31xn2
1
Assume x0 =
30
Put n=0
x1 = 2 x0 − 31x02
2 1
= − 31
30 900
=0.0322
Put n=1
x2 = 2 x1 − 31x12
= 2(0.0322 ) − 31(0.0322 )
2
=0.0323
Practice problems
Ans:11.595
Ans:1.856
3. Find an iteration formula of N where N is the positive number and hence find
11
Ans:3.3170
fx fy gf y − fg y fg − gf x
4. Also find the values of J = = fxgy − f y gx , h = ,k= x
gx gy J J
5. Now set x1 = x0 + h, y1 = y 0 + k .
Method 2
f ( xi , y i )
xi +1 = xi −
f x ( xi , y i )
g ( xi , y i )
y i +1 = y i −
g y ( xi , y i )
Iterate using the latest available values of x and y , till we get the desired accuracy.
Example1 (Method 1)
Answer:
f (x, y ) = x 2 + y − 11
g ( x, y ) = y 2 + x − 7
f x = 2x
fy =1
gx = 1
g y = 2y
fx fy
J= = f x g y − f y g x = (2 x )(2 y ) − (1) (1) = 4 xy
gx gy
gf y − fg y
h=
J
fg − gf x
k= x
J
Example 2 (Method 2)
f (x, y ) = y 2 + 4 x 2 + 2 xy − y − 2 = 0
g (x, y ) = y 2 + 2 x 2 + 3xy − 3 = 0
Answer.
f (x, y ) = y 2 + 4 x 2 + 2 xy − y − 2 = 0
g (x, y ) = y 2 + 2 x 2 + 3xy − 3 = 0
f x = 8x + 2 y
g y = 2 y + 3x
y 2 + 4 x 2 + 2 xy − y − 2
xi +1 = x −
8x + 2 y
y 2 + 2 x 2 + 3xy − 3
yi +1 = yi −
2 y + 3x
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
f (x, y ) = y 2 + 4 x 2 + 2 xy − y − 2 = 0
starting with x0 = 0.4 and y 0 = 0.9
g (x, y ) = y 2 + 2 x 2 + 3xy − 3 = 0
3. Reduce A B to an upper triangular matrix by elementary row transformations.
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 R1 R3
10 1 1 12
1 1 5 7
R2 → R2 − 2 R1
~ 0 8 − 9 − 1 by
0 − 9 − 49 − 58 R3 → R3 − 10 R1
1 1 5 7
~ 0 8 −9 − 1 by R3 → 8R3 + 9 R2
0 0 − 473 − 473
x + y + 5 z = 7 ..............(1)
8 y − 9 z = −1 ..............( 2)
− 473 z = −473 .........(3)
z=1
( 2) 8 y − 9 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
1 1 5 7 R2
9 1 R2 → 8
~ 0 1 − − by
8 8 R → R3
0 0 1 1 3 − 473
1 1 5 7
9
~ 0 1 0 1 by R2 → R2 + R3
0 0 1 1 8
1 1 5 6
~ 0 1 0 1 by R1 → R1 − R2
0 0 1 1
1 0 0 1
~ 0 1 0 1 by R1 → R1 − 5R3
0 0 1 1
2. Apply Gauss Elimination and Gauss Jordan method to find the solution of the
following system x + 2 y + z = 3 , 2 x + 3 y + 3z = 10 , 3 x − y + 2 z = 13
Solution:
1 2 1 3
( A, B ) = 2 3 3 10
3 − 1 2 13
1 2 1 3
R2 = R2 − 2 R1
~ 0 − 1 1 4 by
0 − 7 −1 4 R3 = R3 − 3R1
1 2 1 3
~ 0 −1 1 4 by R3 → R3 − 7 R2
0 0 − 8 − 24
x + 2 y + z = 3 ..............(1)
− y + z = 4 ..............( 2)
− 8 z = −24 .........(3)
(3) −8 z = −24
z=3
( 2) − y + z = 4
− y+3 = 4
y=-1
(1) x + 2 y + z = 3
x + 2(− 1) + 3 = 3
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 R2
0 0 − 8 − 24
1 0 3 11
R
~ 0 1 − 1 − 4 by R3 → 3
0 0 1 −8
3
1 0 0 2
R1 → R1 − 3R3
~ 0 1 0 − 1 by
0 0 1 3 R2 → R2 + R3
Solution:
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
R2 → R2 − 2 R1
0 − 3 0 − 3 − 9
~ by R3 → R3 − 3R1
0 −1 0 1 1 R → R − R
4
0 − 3 − 4 1 3 4 1
1 1 1 1 2
0 1 0 1 3 R
~ by R2 → 3
0 −1 0 1 1 −3
1 − 3 − 4
1 3
1 0 1 0 − 1
R1 → R1 − R2
0 1 0 1 3
~ by R3 → R3 + R2
0 0 0 2 4 R → R + 3R
4
0 0 −4 4 2
4 12
1 0 1 0 − 1
0 1 0 1 3
~ by R3 R4
0 0 −4 4 12
0 4
0 0 2
1 0 1 0 −1 R
R3 → 3
0 1 0 1 3
−4
~ by
0 0 1 −1 −3 R → R4
0 2 4 2
0 0 1
1 0 0 1 2
0 1 0 1 3
~ by R1 → R1 − R3
0 0 1 −1 − 3
0 2
0 0 1
1 0 0 0 0
R1 → R1 − R4
0 1 0 0 1
~ by R2 → R2 − R4
0 0 1 0 −1 R → R + R
3
0 2 3 4
0 0 1
Practice Problems:
1. x + 2 y + z = 4 , 3x − y + 2 z = −3 , x + 2 y + 4 z = 7
Ans: x = -1 , y = 2 , z = 1
2. 2 x + y + z = 10 , 3x + 2 y + 3z = 18 , x + 4 y + 9 z = 16
Ans: x = 7 , y = -9 , z = 5
3. x + y + z = 9 , 2 x − 3 y + 4 z = 13 , 3x + 4 y + 5 z = 40
Ans: x = 1 , y = 3 , z = 5
4. 2 x − y + 3z = 8 , − x + 2 y + z = 4 , 3x + y − 4 z = 0
Ans: x = 2 , y = 2 , z = 2
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 .
3. Then A −1 = B .
1 1 2
1. Find the inverse of the matrix 1 2 3 by Gauss Jordan method.
2 3 1
1 1 2
Let A= 1 2 3
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
R2 → R2 − R1
~ 0 1 1 − 1 1 0 by
0 1 − 3 − 2 0 1 R3 → R3 − 2 R1
1 0 1 2 −1 0
R1 → R1 − R2
~ 0 1 1 − 1 1 0 by
0 0 − 4 −1 −1 1 R3 → R3 − R2
1 0 1 2 −1 0
~ 0 1 1 −1 1 0 by R3 → − R3
1
1 1 1 4
0 0 1 −
4 4 4
7 5 1
1 0 0 −
4 4 4
5 3 1 R1 → R1 − R3
~ 0 1 0 − by
4 4 4 R2 → R2 − R3
1 1 1
0 0 1 −
4 4 4
7 5 1
−
4 4 4
Hence A = −
−1 5 3 1
4 4 4
1 1 1
−
4 4 4
1 2 − 1
2. Find the inverse of the matrix 4 1 0 by Gauss Jordan method.
2 −1 3
Solution
1 2 − 1
Let A = 4 1 0
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
R2 → R2 − 4 R1
~ 0 − 7 4 − 4 1 0 by
0 − 5 5 − 2 0 1 R3 → R3 − 2 R1
1 2 −1 1 0 0
−4 4 −1 R → R2 / − 7
~ 0 1 0 by 2
7 7 7
0 − 5 5 −2 0 1
1 −1 2
1 0 0
7 7 7
−4 −1 R1 → R1 − 2 R2
~ 0 1 0 by
4
7 7 7 R3 → R3 + 5R2
15 6 −5
0 0 1
7 7 7
1 −1 2
1 0 0
7 7 7
−4 −1
~ 0 1
4
0 by 7
7 7 7 R 3 → R3 *
6 −1 7 15
0 0 1
15 3 15
1 1 −1
1 0 0 − 1
5 3 15
R1 → R1 − R3
4 −1 4 7
~ 0 1 0 by
5 3 15
R → R + 4 R
6 −1 7 2 2
7
3
0 0 1
15 3 15
−1 1 −1
5 3 15
−1 4
=
4
A −1
5 3 15
2 −1 7
5 3 15
1 0 − 4
3. Find the inverse of the matrix 0 − 1 2 by Gauss Jordan method.
−1 2 1
Solution
1 0 − 4
Let A = 0 − 1 2
−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 + R1
0 2 − 3 1 0 1
1 0 − 4 1 0 0
~ 0 1 − 2 0 − 1 0 by R2 * (− 1)
0 2 − 3 1 0 1
1 0 − 4 1 0 0
~ 0 1 − 2 0 − 1 0 by R3 → R3 − 2 R2
0 0 1 1 2 1
1 0 0 5 8 4
R1 → R1 + 4 R3
~ 0 1 0 2 3 2 by
0 0 1 1 2 1 R2 → R2 + 2 R3
5 8 4
−1
A = 2 3 2
1 2 1
Practice Problems:
1 1 3
1. Find the inverse of 1 3 − 3 using Gauss Jordan method
− 2 − 4 4
7 −3 − 3
2 2 2
−1
Ans A −1 = 0
1
2 2
−1 1
0
2 2
4 1 2
2. Find the inverse of 2 3 − 1 using Gauss Jordan method
1 − 2 2
−1 1 − 1
5 3 15
−1
Ans A =
−1 4 4
5 3 15
2 −1 7
5 3 15
0 1 1
3. Find the inverse of 1 2 0 using Gauss Jordan method
3 −1 4
8 2
−1
3 3
−4 − 1
Ans A −1 = 1
3 3
7 1
−1
3 3
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.
Gauss-Jacobi method
a1 x + b1 y + c1 z = d1
Consider a 2 x + b2 y + c 2 z = d 2 , which is diagonally dominant
a3 x + b3 y + c3 z = d 3
Use initial values x (0 ) , y (0 ) , z (0 ) 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
Here we use initial values y (0 ) , z (0 ) and get x (1) . Then use x (1) , z (0 ) to get y (1) . Use x (1) , y (1) 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
10 x + 2 y + z = 9
x + 10 y − z = −22
− 2 x + 3 y + 10 z = 22
Answer:
10 2 + 1
10 1 + 1
10 2 + 3
x=
1
(9 − 2 y − z )
10
y = (− 22 − x + z )
1
10
z = (22 + 2 x − 3 y )
1
10
We start with initial values x = 0, y = 0, z = 0 and iterate, using the values obtained in the previous step
X=1,y=-2,z=3
8 x − 3 y + 2 z = 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 + 2 z = 20
4 x + 11 y − z = 33 .
6 x + 3 y + 12 z = 35
83+2
11 4 + 1
12 6 + 3
We start with initial values y = 0, z = 0 and iterate, using the latest available values everytime.
Iteration
x=
1
(20 + 3 y − 2 z ) y=
1
(33 − 4 x + z ) z=
1
(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
Hence the required solution is x = 3.017, y = 1.986, z = 0.912
x + y + 54 z = 110
6 x + 15 y + 2 z = 72
27 x + 6 y − z = 85
Solution:
27𝑥 + 6𝑦 − 𝑧 = 85
6𝑥 + 15𝑦 + 2𝑧 = 72
𝑥 + 𝑦 + 54𝑧 = 110
x=
1
(85 − 6 y + z )
27
y = (72 − 6 x − 2 z )
1
15
z = (110 − x − y )
1
54
Iteration
x=
1
(85 − 6 y + z ) y=
1
(72 − 6 x − 2 z ) z=
1
(110 − x − y )
27 15 54
Initial 0 0
1 3.1481 Sub x=3.1481,z=0 Sub
y=3.5408 x=3.1481,y=3.5408
Z=1.91317
2 Sub Sub Sub
y=3.5408,z=191317 x=2.4322,z=1.91317 x=2.4322,y=3.5720
X=2.4322 Y=3.5720 Z=1.92585
3 2.4257 3.57294 1.92595
4 2.4255 3.5730 1.9260
5 2.4255 3.5730 1.9260
6
7
8
9
10
X=2.426,y=3.573,z=1.926
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
x=
1
(85 − 6 y + z )
27
y = (72 − 6 x − 2 z )
1
15
z = (110 − x − y )
1
54
We start with initial values x = 0, y = 0, z = 0 and iterate, using the values obtained in the previous step
Iteration
x=
1
(85 − 6 y + z ) y=
1
(72 − 6 x − 2 z ) z=
1
(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
x=
1
(85 − 6 y + z ) y=
1
(72 − 6 x − 2 z ) z=
1
(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
1. 28 x + 4 y − z = 32, x + 3 y + 10 z = 24, 2 x + 17 y + 4 z = 35
Ans: x= 0.994 , y = 1.507 , z = 1.849
2. 10 x − 5 y − 2 z = 3 ,4 x − 10 y + 3z = −3 , x + 6 y + 10 z = −3
Ans: x= 0.342 , y =0.285 , z = -0.505
3. 6 x + 3 y + 12 z = 36, 8 x − 3 y + 2 z = 20, 4 x + 11y − z = 33
Ans: x= 3 , y = 2 , z = 1
Power method to find the numerically largest eigenvalue and corresponding eigenvector
1. Let A be a matrix and X 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
the approximate eigen value and X 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
3. Then we select the initial eigen vector be 0 1 0 1
0 0 1 1
, , ,
Problems
1. Use power method to find the dominant eigenvalue and the corresponding eigenvector of the
4 2
matrix A = . Also find the other eigenvalue.
1 3
Solution:
4 2
A =
Given 1 3
1
Let the initial vector be X 1 = . Then
0
4 2 1 4 1
AX 1 = = = 4
1 3 0 1 0.25
1
The first approximation to the eigenvalue is 4 and the corresponding eigenvector is
0.25
1
Let X 2 =
0.25
4 2 1 4.5 1
AX 2 = = = 4.5
1 3 0.25 1.75 0.39
4 2 1 4.78 1
AX 3 = = = 4.78
1 3 0.39 2.17 0.45
4 2 1 4.9 1
AX 4 = = = 4.9
1 3 0.45 2.35 0.48
4 2 1 4.96 1
AX 5 = = = 4.96
1 3 0.48 2.44 0.49
4 2 1 4.98 1
AX 6 = = = 4.98
1 3 0.49 2.47 0.49
4 2 1 4.98 1
AX 7 = = = 4.98
1 3 0.49 2.47 0.49
1
Hence the dominant eigenvalue of A is 1 =4.98 and the corresponding eigenvector is
0.49
4.98 + 2 = 7 2 = 2.02
25 1 2
2. Find the numerically largest eigenvalue of A = 1 3 0 and the corresponding eigen vector.
2 0 − 4
Solution:
25 1 2
Given A = 1 3 0
2 0 − 4
1
Let X 1 = 0
0
25 1 2 1 25 1
AX1 = 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
Hence the dominant eigenvalue of A is 1 = 25.1821 and the corresponding eigenvector is 0.0451
0.0685
1 6 1
3. Find the dominant eigenvalue and the corresponding eigenvector of A = 1 2 0 by power method.
0 0 3
Find the other eigenvalue also.
Solution:
1 6 1
Given A = 1 2 0
0 0 3
1
Let X 1 = 0
0
1 6 1 1 1 1
AX1 = 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
Hence the dominant eigenvalue of A is 1 = 4 and the corresponding eigenvector is 0.5
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
Let Y1 = 0
0
− 3 6 1 1 − 3 1
BY1 = 1 − 2 0 0 = 1 = −3 − 0.3333
0 0 − 1 0 0
0
− 3 6 1 1 − 4.9998 1
BY2 = 1 − 2 0 − 0.3333 = 1.6666 = −4.9998 − 0.3333
0 0 − 1
0 0 0
− 3 6 1 1 − 4.9998 1
BY3 = 1 − 2 0 − 0.3333 = 1.6666 = −4.9998 − 0.3333
0 0 − 1
0 0 0
= -5+4
= -1
1 + 2 + 3 = 1 + 2 + 3
4 − 1 + 3 = 6
3 = 3
Practice problems
5 0 1
1. Using power method, find all the eigenvalues of A = 0 − 2 0
1 0 5
Using power method, find the dominant eigenvalue and the corresponding eigenvector of
2.
2 −1 1
A = −1 2 −1
1 −1 2
5 0 1 1 5 1 1
[0 −2 0] [0]=[0]=5[ 0 ], x2=[ 0 ]
1 0 5 0 1 0.2 0.2
5 0 1 1 5.2 1 1
[0 −2 0] [ 0 ]=[ 0 ]=5.2[ 0 ], x3=[ 0 ]
1 0 5 0.2 2 0.384 0.384
5 0 1 1 5.384 1 1
[0 −2 0] [ 0 ]=[ 0 ]=5.384[ 0 ],x4=[ 0 ]
1 0 5 0.384 2.92 0.54 0.54
5 0 1 1 5.54 1 1
[0 −2 0] [ 0 ]=[ 0 ]= 5.54[ 0 ], x5=[ 0 ]
1 0 5 0.54 3.7 0.67 0.67
5 0 1 1 5.67 1 1
[0 −2 0] [ 0 ]=[ 0 ]=5.67[ 0 ], x6=[ 0 ]
1 0 5 0.67 4.35 0.77 0.77
5 0 1 1 5.77 1 1
[0 −2 0] [ 0 ]=[ 0 ]=5.77[ 0 ], x7=[ 0 ]
1 0 5 0.77 4.85 0.84 0.84
5 0 1 1 5.84 1 1
[0 −2 0] [ 0 ]=[ 0 ]=5.84[ 0 ], x8=[ 0 ]
1 0 5 0.84 5.2 0.89 0.89
5 0 1 1 5.89 1 1
[0 −2 0] [ 0 ]=[ 0 ]= 5.89[ 0 ], x9=[ 0 ]
1 0 5 0.89 5.45 0.92 0.92
5 0 1 1 5.92 1 1
[0 −2 0] [ 0 ]=[ 0 ]=5.92[ 0 ], x10=[ 0 ]
1 0 5 0.92 5.6 0.95 0.95
5 0 1 1 5.92 1 1
[0 −2 0] [ 0 ]=[ 0 ]=5.92[ 0 ], x11=[ 0 ]
1 0 5 0.94 5.6 0.95 0.95
1
λ=5.92, [ 0 ]=x
0.95