Anda di halaman 1dari 51

MA6452 STATISTICS AND NUMERICAL METHODS

UNIT III
SOLUTION OF EQUATIONS AND EIGEN
VALUE PROBLEMS

By
Ms K Vijayalakshmi
Assistant Professor
Department of Applied Mathematics
SVCE
SOLUTION OF EQUATIONS AND EIGEN VALUE
PROBLEMS
SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS

The equation of the form f(x)=0 are called algebraic equations,if f(x) is
purely a polynomial in x.

Eg: X 3
− X +5

If f(x) contains trigonometric,logarithmic,exponential function


etc.,then it is called transcendental equation

Eg:
x log x − 1.2 = 0
ITERATION METHOD (OR)METHOD OF SUCCESSIVE
APPROXIMATION(OR)FIXED POINT METHOD

1.Solve the equation x3 + x2 −1 = 0


for the positive root by iteration method,correct to
four decimal places

Solution:
Let f(x)= x3 + x2 −1 = 0
f(0)= - 1 < 0

f(1)= 1 > 0

The root lies between 0 and 1


1
x + x −1 = 0
3 2
x (1 + x) = 1
2
x=
1+ x
therefore the given equation can be expressed as
1
x = Φ ( x ) where Φ ( x ) =
1+ x
1 1
Φ ′( x ) = − ⇒ Φ′( x) =
2 ( x + 1) 3 / 2 2(1 + x) 3/ 2

1 1
Φ ′( 0 ) = and Φ ′ (1 ) = < 1
2 4 2

Φ ′ ( 0 ) < 1 ∀ x ∈ ( 0 ,1 )
Choosing x0 = 0.75, x n + 1 =
1
,
1 + x n

n = 0 , 1 , 2 ,...

The successive approximation are


1
x1 =
1 + 0 . 75 x2 = 0.75465 x3 = 0.75493

x4 = 0.75487 x5 = 0 .75488 x6 = 0.75488

Hence the root is 0.7549


2.Find the real root of the equation 3x − cosx − 2 = 0
by iteration method,correct to three decimal places

Solution:
Let f(x)= 3x − cosx − 2 = 0

Since f(0) = -3 < 0 and f(1) > 0

The roots lies between (0,1)


Therefore
2 + cos x
Φ ( x) =
3

sin x sin x
Φ ′( x ) = − ⇒ Φ′( x) = < 1∀x ∈ (0,1)
3 3
2 + cos x n
x n +1 =
3
Choosing the initial approximation x 0 = 0 . 75

The successive approximation are

x1 = 0.9106 x2 = 0.8711 x3 = 0.8813 x4 = 0.8787

x 5 = 0 .8794 x6 = 0.8792 x7 = 0.8793 x8 = 0.8792

The root is 0.879


NEWTON-RAPHSON METHOD (OR) METHOD OF TANGENTS

1.Using Newtons Method,Find the root between 0 and 1 of


x 3 − 6 x + 4 = 0 correct to five decimal places

Solution:
Let f ( x) = x 3 − 6 x + 4 then f ′( x ) = 3 x 2 − 6

The initial approximation is x 0 = 0 .5


f (xn )
x n +1 = x − n=0,1,2,…..
f ′( x n )
n

x1 = 0.71429 x2 = 0.7319 x3 = 0.73205 x4 = 0.73205

The root is 0.73205


2.Find by newton’s method, the real root of
x log 10, x = 1 . 2 correct to 4 decimal places

Solution
let f ( x) = x log10 x −1.2 then

f ( x ) = log 10 x + x [log 10 x ]

d f ′( x ) = log 10 x + x
d
[log e x. log 10 e ]
dx dx

1
f ′( x ) = log 10 x + x  . log 10 e f ′( x) = log10 x + log10 e
x

f ′( x) = log10 x + 0.4343
Now f (2) = −0.5979 < 0 f (3) = 0.2314 > 0

the root lies between 2 and 3


f ( x ) = x log 10 x − 1.2 f ′( x ) = log 10 x + 0.4343

Choosing the initial approximation x 0 = 2 .5


Applying in the formula

f (xn )
x n +1 = x n −
f ′( x n )
n=0,1,2.....

x1 = 2.7465 x2 = 2.7406 x 3 = 2 . 7406

The root is 2.7406


3.Show that the iteration formula for finding the square root of
N is
1  N  and hence find the value of 15
x n +1 =  x n + 
2  xn 
Solution:
Let f ( x) = x 2 − N then f ′( x ) = 2 x

Newton’s formula is
f (x n )
x n +1 = x −
f ′( x n )
n

1  N 
( x n2 − N ) ( x n2 + N ) x n +1 =  x n + 
x n +1 = xn − x n +1 = 2 xn 
2 xn 2 xn 

Where n=0,1,2,.......
To find 15
The initial approximation is x0 = 3.5

1  N 
Taking N=15 x n +1 =  x n +  Where n=0,1,2,.......
2  xn 

the successive approximation s are

x1 = 3 . 893 x2 = 3.873 x3 = 3 .873

The square root of 15 is 3.873


Solution of system of Linear Algebraic
Equations

DIRECT METHODS

1.Gauss Elimination Method

2.Gauss-Jordan Method
GAUSS ELIMINATION METHOD
1.This method is used to solve linear simultaneous
equations.

2.It is a direct method in which the given set of equations


are written in matrix form.

3.The augmented matrix is converted into an equivalent upper


triangular matrix using elementary transformations.

4.Solution is got by the method of back-substitution.


NOTE

1.The first equation is called pivotal a 11 equation and its


leading coefficient is called the first pivot.

2.When any of the pivot element is zero ,the order of the


equations is changed .

(i.e) the rows are interchanged such that the pivot is non-zero.

3.The interchange of rows in the matrix is called pivoting


1.Solve the following system by Gauss elimination method
x + 2 y + z = 3
2 x + 3 y + 3 z = 10
3 x − y + 2 z = 13
Solution
The system of equations can be written in matrix form as
1 2 1   x   3 
2 3 3   y  =  10 

 3 − 1 2   z   13 

The augmented matrix is


1 2 1 3 
2 3 3 10
 
3 −1 2 13
1 2 1 3 
2 3 3 10
 
3 −1 2 13

1 2 1 3 byR 2→ R 2 + ( − 2 ) R1
0 −1 1 4
  R 3→ R 3 + ( − 3 ) R1
0 − 7 −1 4

1 2 1 3 
0 −1 1 4 
 
byR 3 + ( −7 ) R 2
0 0 −8 −24
1 2 1 3  x +2y + z = 3→(1)
0 −1 1 4 
  − y + z = 4 → (2)
0 0 −8 −24
− 8z = −24 → (3)

We solve these equations by the method of back-


substitution
By equation (3), z=3
Substituting in equation (2) Y=-1
Substituting y=-1,z=3 in equation (1) X=2
The solution is x=2 y = −1 z =3
2. Solve 10 x + y + z = 12
2 x + 10 y + z = 13
x + y + 5z = 7

By Gauss elimination method


Solution
The system of equation can be written matrix form

10 1 1   x  12 
2 10    
1   y  = 13  

 1 1 5   z   7 
Augmented Matrix

10 1 1 12
 2 10 1 13
 
 1 1 5 7 
 
10 1 1 12 
1
2 10 1 13  R3 → R3 + (− ) R1
10
 9 49 29 
0 
 10 10 5
 
10 1 1 12 
 49 4 53  2
0  R 2 → R 2 + ( − ) R1
 5 5 5  10
0 9 49 29 
 10 10 5 
 
10 1 1 12 
 53 
9
0
49 4
 R3 → R3 + ( − ) R 2
 5 5 5  98
0 0 473 473 
 98 98 
The system of equations now becomes
10x + y + z = 12 → (1) 49 y + 4 z = 53 → (2) 473 473
z= → (3)
5 5 5 98 98
By back substitution
From equation (3) Z=1
substituting z=1 in equation (2)
49
y =
53

4 49
y =
49 y =1
5 5 5 5 5

substituting y=1 & z=1 in equation (1)


10x + y + z = 12 10x + 2 = 12 10x = 10 x =1
The solution is

x=1 y=1 z=1


GAUSS JORDAN METHOD
Apply Gauss Jordan Method to solve the equations
x+ y+z =9
2 x − 3 y + 4 z = 13
3 x + 4 y + 5 z = 40
Solution
The above equations can be written in the Matrix form
 1 1 1  x   9  The augmented matrix
    
 2 − 3 4 y  =  13
 3 4 5  z   40 1 1 1 9 
      
 2 − 3 4 13 
 3 4 5 40 
 
1 1 1 9 
 
 2 − 3 4 13 
 3 4 5 40
 

1 1 1 9 
 
 2 − 3 4 13 byR 3 → R 3 − 3R1
 0 1 2 13
 

1 1 1 9 
 
0 − 5 2 − 5 byR2 → R2 − 2R1
0 1 2 13
 

1 1 1 9 
  byR3 → 5R3 + R2
 0 − 5 2 − 5
 0 0 12 60 
 
1 1 1 9 
 
 0 − 5 2 − 5
 0 0 12 60 
 

12 z = 60 − 5y + 2z = −5 x+ y+z =9

z =5 − 5 y +10 = −5 x +8= 9
− 5y = −15 x =1
y = 3
 1 3 3 16
 
2.Solve by Gauss Jordan Method  1 4 3 18byR3 → R3 − R1
0 0 1 3 
x + 3 y + 3 z = 16  

x + 4 y + 3 z = 18  1 3 3 16
 
x + 3 y + 4 z = 19  0 1 0 2 byR2 → R2 − R1
Solution 0 0 1 3 
 

Equations in Matrix form


z =3 y=2
1 3 3   x   16 
    
1 4 3   y  =  18 
1
 3 4   z   19  x + 3 y + 3z = 16
The augmented matrix x + 6 + 9 = 16
1

3 3 16 
 x + 15 = 16
1 4 3 18 
1
 3 4 19 
 x =1
ITERATIVE METHODS (INDIRECT METHODS)

SUFFICIENT CONDITIONS

1.Each equation of the system must possess one large


co-efficient ,attached to a different unknown.

2.The system of equations should be diagonally


dominant
GAUSS-JACOBI METHOD
1
Solve the following by Gauss- z = (22 + 2 x − 3 y )
Jacobi Method 10
10 x + 2 y + z = 9
We start with the initial
x + 10 y − z = − 22
values
− 2 x + 3 y + 10 z = 22
Solution
x = 0, y = 0, z = 0

The given system of First


equation is diagonally Iteration
1
x = (9 − 2(0) − 0) = 0.9
(1)

dominant. 10
1 1
x= (9 − 2 y − z ) y (1) = ( − 22 − 0 + 0 ) = − 2 .2
10 10
1
y = (−22 − x + z ) z (1) 1
= (22 + 2(0) − 3(0) = 2.2
10
10
We use these values in the next iteration.

Second Iteration Third Iteration

1 1
x (2)
= (9 − 2(−2.2) − 2.2) = 1.12 x = (9 − 2(−2.07) − 3.04) = 1.01
(3)

10 10

1
1 y (3)
= (−22 − 1.12 + 3.04) = −2.008
y = (−22− 0.9 − 2.2) = −2.07
(2)
10
10

1
z = (22+ 2(0.9) −3(−2.2) = 3.04
(2)
z (3) 1
= (22 + 2(1.12) − 3(−2.07) = 3.045
10 10
Fourth Iteration

1
x ( 4)
= (9 − 2( −2.008 ) − 3.045 ) = 0.9971
10

1
y (4) = ( − 22 − 1 .01 + 3 .045 ) = − 1 .9965
10
1
z ( 4)
= (22 + 2(1.01) − 3(−2.008) = 3.0044
10

Similarly we do further iterations till we get the desired


accuracy.
The values are tabulated in the following table.

x y z
0 0 0
0.9 -2.2 2.2
1.12 -2.074 3.04
1.01 -2.008 3.045
0.9971 -1.9965 3.0044
0.9989 -1.9993 2.9984
1.0000 -2.0000 2.9996
1.0000 -2.0000 3.0000

The required solution is x = 1, y = −2, z = 3


2. Solve the following by Gauss-Jacobi Method, correct to 3
decimal places.
− x + y + 10 z = 35 .61
x + 10 y + z = 20 .08
10 x + y − z = 11 .19

Solution
Since the given system of equation is not diagonally dominant
Rewrite the equations as

10 x + y − z = 11 . 19
x + 10 y + z = 20 . 08
− x + y + 10 z = 35 . 61
Hence

1
x= (11 .19 − y + z )
10

1
y = ( 20 . 08 − x − z )
10
1
z = ( 35 . 61 + x − y )
10

Now we start with the initial values x = 0, y = 0, z = 0

and iterate,by using values from the previous step.


The results are tabulated as follows

x y z
0 0 0
1.119 2.008 3.561
1.274 1.533 3.472
1.313 1.526 3.535
1.320 1.523 3.539
1.321 1.522 3.541
1.321 1.522 3.541

Hence the solution is x = 1 .321, y = 1 .522 , z = 3 .541


GAUSS-SEIDEL ITERATIVE METHOD
1.Solve the system of equations by Gauss-Seidel method
20 x + y − 2 z = 17
3 x + 20 y − z = − 18
2 x − 3 y + 20 z = 25
Solution
The given system of equation is diagonally dominant.
Hence
1 1
x = (17 − y + 2 z ) z = ( 25 − 2 x + 3 y )
20 20

1
y= (−18 − 3 x + z )
20
Choosing initial values as y = 0, z = 0

First Iteration

1
x (1 )
= (17 − 0 + 2 ( 0 )) = 0 . 85
20

1
y (1)
= ( −18 − 3( 0 .85 ) + 0 ) = −1 .02750
20

1
z (1)
= ( 25 − 2 ( 0 .85 ) + 3( − 1 .02750 ) = − 1 .01088
20
second Iteration

1
x (2)
= (17 − ( − 1 . 02750 ) + 2 (1 . 01088 )) = 1 . 00246
20

1
y (2)
= ( − 18 − 3(1 .00246 ) + 1 .01088 ) = − 0 .99983
20

1
z (2)
= ( 25 − 2(1 .00246 ) + 3( − 0 .99983 ) = 0 .99978
20
Proceed in the same manner by using the latest available
values.
The results are tabulated as follows

x y z
0 0
0.85 -1.02750 1.01088
1.00246 -0.99983 0.99978
0.99997 -1.00001 1.00000
1 -1 1

Hence,the solution is

x = 1, y = −1, z = 1
2. Solve the system of equations by Gauss-Seidel method
8 x − 3 y + 2 z = 20
4 x + 11 y − z = 33
6 x + 3 y + 12 z = 35
Solution
The given system of equation is diagonally dominant.
Hence
1
x = (20 + 3 y − 2 z ) 1
z = (35 − 6 x − 3 y)
8 12
1
y = (33 − 4 x + z )
11
Now we start with the initial values y = 0 , z = 0
and iterate,by using the latest available values.
x y z
0 0
2.5 2.091 1.144
2.998 2.014 0.914
3.027 1.982 0.908
3.016 1.986 0.912
3.017 1.986 0.912
3.017 1.986 0.912

Hence,the solution is x = 3.017, y = 1.986, z = 0.912


INVERSE OF A MATRIX
USING GAUSS-JORDAN METHOD
We can use Gauss-Jordan method to find inverse of a
non-singular matrix
PROCEDURE
1.Form the augmented matrix (A,I) where I is the
identity matrix of the same order as A

2.Transform (A,I) into the form (I,B) using


elementary row operations

3.Then A-1 = B
1.Find the inverse of the given matrix by Gauss-Jordan method

1 1 2
 
1 2 3
2 3 1 

Solution
Let 1 1 2  1 0 0
   
A= 1 2 3 
I= 0 1 0
2  0 0 1 
 3 1  
The augmented matrix is
1 1 21 0 0
( A, I ) = 1 2 3 0 1 0
2 3 10 0 1
̴ 1 1 2 1 0 0 1 0 1 2 −1 0
1 2 3 0 1 0 R3 → R3 − 2 R1 0 1 1 −1 1 0 R3 → R3 − R2
0 1 −3 −2 0 1 0 0 − 4 −1 −1 1
1 1 2 1 0 0 7 5 1

0 1 1 −1 1 0 R 2 → R 2 − R1 1 0 0 4 4 4
5 3 1 1
0 1 −3 −2 0 1 0 1 0 − R1 → R1 + R3
4 4 4 4
0 0 − 4 −1 −1 1

1 0 1 2 −1 0 7 5 1

0 1 1 −1 1 0 R1 → R1 − R2 1 0 0 4 4 4
5 3 1 1
0 − R 3 → (−
0 1 −3 −2 0 1 0 1
4 4 4 4
)R3
0 0 1 1 1 −1
4 4 4

 7 −5 1  −1
−1
 4 4 4 (I , A )
A = − 5 3 1 
 4 4 4
 1 1 −1 
 4 4 4
1.Using Jacobi’s method find all the eigen values and the eigen vectors of the matrix.

 1 2 2 
 
A =  2 3 2
 
 2 2 1 

Solution
The largest non-diagonal element in A is a 13 = a 31 = 2
Also a11 = a 33 = 1 since a13 > 0

2 a13 Consider the orthogonal matrix


tan 2θ =
a11 − a 33
 cos θ 0 − sin θ 
 
2X 2 B1 =  0 1 0  and B1−1 = B1T
= =∞  sin θ
1−1  0 cos θ 

π
2θ =
2  1 1 
 0 − 
 2 2 
π B1 =  0 1 0 
∴θ =  1 1 
4  2 0
 2 
First rotation
The matrix after first rotation

A 1 = B 1− 1 AB 1

 1 1   1 1 
 0  1 2 2  2 0 − 
 2 2   2 
=  0 1 0  2 3 2  0 1 0 
− 1 1    1
1  
1 
0  2 2 0
 2 
2   2 2 
 

 3 2 0 
 
=  2 3 0 
 0 0 − 1 
 

A1 is not a diagonal matrix.

So we have to perform second rotation.


In A1 the largest non-diagonal element is a12 = a21 = 2

Also a11 = a 33 = 3

We choose θ to construct an orthogonal matrix B 2

such that

2 a 12 2X 2
tan 2θ = = =∞
a 11 − a 22 3−3

π π
∴ 2θ = ⇒
2 θ =
4

 cos θ − sin θ 0
 
B 2 =  sin θ cos θ 0
 0 0 1 

 1 1 

∴ 
 2 2
0

 1 1 
B 2 =  0
2 2
 0 0 1 
 
 
and B 2−1 = B 2T
Second rotation:

The matrix after second rotation

A2 = B 2−1 A1 B 2
 1 1 
 0
3 2 0   1

1
0



2
1 1
2 

  2 2 
= − 0 2 3 0  1 1
0

2 2 
 0 0 1  0 0 
− 1  
2 2
1 




 
0 0

 

5 0 0 
 
= 0 1 0  =diagonal matrix D
0 0 − 1 

The eigen values of A are 5,1,-1

The corresponding eigen vectors are the columns of B = B1 B 2


 1 1   1 1 
 0 −   − 0
Now B=  2 2  2 2 
 0 1 0   1 1
0

 1 1   2 2
0 
 2 2   0 0 1 
  
 

 1 1 1 
 − − 
 2 2 2 
 1 1 
B =  0 
 2 2 
 1 1 1 
 − 
 2 2 2 

Hence the eigen vectors are

T
1 1 1 1 1 1
T
T
     1 1 
2 2 2 − 0 
2 2 2
 2 2
2. Using Jacobi’s method find all the eigen values and the eigen vectors of the matrix.

5 0 1
 
A = 0 −2 0
1 0 5 

Solution:

The largest non-diagonal element in A is a13 = a31 = 1

Also a11 = a33 = 5

2 a 13 2X 2
tan 2θ = = ∞
a11 − a 33 = 1−1

π π
2θ = ∴θ = since a 13 >0
2 4
Consider the orthogonal matrix

 cos θ 0 − sin θ 
 
B1 =  0 1 0 
 sin θ 0 cos θ 

 1 1 
 0 − 
 2 2 
B1 =  0
 1
1 0 
1 
and
B1−1 = B1T
 2 0
 2 
First rotation

The matrix after first rotation

A 1 = B 1− 1 AB 1

 1 1   1 1 
 0  5 0 1  2 0 − 
 2 2   2 
=  0 1 0  0 − 2 0  0 1 0 
− 1 1 
5  
1 1 
 0  1 0
 2 0
 2 2   2 
 6 6  1 1 
 0  0 − 
 2 2  2 2
= 0 −2 0  0 1 0 
− 4 4  1 1 
 0 0
 2 2   2 2 

6 0 0
  = a diagonal matrix
= 0 − 2 0
0 0 4 

Hence the eigen values are 6,-2,4

The corresponding eigen vectors are

T
 1 1 
(0 1 0)
T
 0  T  1 1 
 2 2 − 0 
 2 2

Anda mungkin juga menyukai