Unit I NM
Unit I NM
Consider the equation f(x) = 0 and let f(a) and f(b) of opposite signs. Also, let a<b.
The curve y = f(x) will meet the x-axis at some point between A[a, f(a)] and B[b, f(b)]
The equation of the chord joining the two points A[a, f(a)] and B[b, f(b)] is
y f (a ) f (a ) f (b)
xa a b
The x- coordinate of the point of intersection of this chord with the x-axis gives an
approximate value for the root of f(x) =0 setting y=0 in the chord equation, we get
f (a ) f (a ) f (b)
xa a b
af (b) bf (a )
x1
f (b) f (a )
af ( x1 ) x1 f (a )
x2
Hence, f ( x1 ) f (a )
NOTE:
(i) The Convergence of the root in this method is a slower than the Newton-
Raphson method.
SOLUTION:
Let f x x 3 9 x 1
f 2 8 18 1 9 0
f 2.5 5.875 0
and f 3 27 27 1 0
a f b b f a
x
f b f a
First approximation:
Second approximation:
Third approximation:
Fourth approximation:
EXERCISE 1.1
2. Determine the real root of xex = 3 correct to four decimal places by Regula
Falsi method.
3. Find the positive real root of x = 2sinx, correct to four decimals by the method
of false position.
1.2 Newton’s Method (or) Newton – Raphson Method (or) Method of Tangent
This method starts with an initial approximation to the root of an equation, a better and
closer approximation to the root can be found by using an iterative process.
f ( x0 )
x1 x0 h x0
f ( x0 )
Repeating the process, we get the iteration formula
f ( xn )
xn 1 xn
f ( xn ) , n = 0,1,2……. -----------(ii)
This is called Newton-Raphson formula.
EXAMPLE: 2
x log10 x 1.2,
Find by Newton’s method, the real root of correct to 4
decimal places.
Solution:
f x x log10 x 1.2
Let
f
1
x log10 x x d log10 x
Then dx
d
log10 x x log e x log10 e
dx
1
log10 x x log10 e log10 x log10 e
x
f x log10 x 0.4343
1
f 2 0.5979 0
f 3 0.2314 0
First approximation:
f x 0 0.2051
x1 x0 2. 5 2.7465
f 1 x 0 0.8322
Second approximation:
f x1 0.0051
x 2 x1 2.7465 2.7406
f 1 x1 0.8731
Third approximation:
f x 2 0.00004
x3 x 2 2.7406 2.7406
f 1 x 2 0.8721
EXERCISE 1.2
1. Find by Newton's method, the real positive root of x = cosx, correct to 3 decimal
places.
3. Solve the equation e-x = sinx for the root lying between 0 and 1 by Newton Raphson
method.
Step: 1
Elimination of x1 from the second and third equations. If a11 ≠ 0, the first
equation is used to eliminate x1 from the second and third equation. After
elimination, the reduced system is
a11 x1 + a12 x2 + a13 x3 = b1
a’22 x2 + a’23 x3 = b’2
a’32 x2 + a’33 x3 = b’3
Step: 2
Step: 3
Thus in Gauss- elimination method, we start with the augmented matrix (A/B) of
the given system and transform it to (U/K) by elementary row operations. Finally
the solution is obtained by back substitution process.
EXAMPLE: 3
Solution:
1 - 3 -1 - 30
0 5 -1 65 R2 R2 2 R1
0 14 3 292 R3 R3 5 R1
~
1 - 3 -1 - 30
0 5 -1 65
14
0 0 29/5 110 R3 R3 5 R2
~
The equivalent system is
x- 3y - z = -30
5y - z = 65
29
z 110
5
5
z 110 18.966
Þ 29
65 18.966
y 16.793
5
x = -30 + 3 (16.793) + (18.966) = 39.345
The solution is
x = 39.345, y = 16.793, z = 18.966.
EXERCISE 1.3
EXAMPLE:4
Solution:
3 4 5 18
2 -1 8 13
5 - 2 7 20
[A, B] =
1 5 - 3 5
2 -1 8 13
5 - 2 7 20 R1 R1 R2
~
1 5 - 3 5
0 - 11 14 3 R12 R2 2 R1
0 - 27 22 - 5 R3 R3 5 R1
~
1 5 3 5
0 1 14 / 11 3 / 11 1
0 27 22 5 R2 11 R2
~
1 0 37/11 70/11
0 1 14 / 11 3 / 11 R1 R2 5 R2
0 0 136/11 136 / 11 R3 R3 27 R2
~
1 0 37/11 70/11
0 1 14 / 11 3 / 11 11
0 0 1 1 R3 136 R3
~
37
1 0 0 3 R1 R1 11 R3
0 1 0 1 14
0 0 1 1 R2 R2 11 R3
~
The solution is x = 3, y = 1, z = 1.
EXERCISE 1.4
1
x d1 b1 y c1 z
a1
1
y d 2 a2 x c2 z
b2
1
z d3 a3 x b3 y
c1 ………………………….(2)
Let the first approximation be x0, y0 and z0 substituting x0, y0 and z0 in (2), we get
1
x1 d1 b1 y0 c1 z0
a1
1
y 1 d 2 a2 x0 c2 z0
b2
1
z 1 d3 a3 x0 b3 y0
c1
Substituting he values of x1, y1, z1 in (2) we get the 2nd approximations x2, y2 and
z2 as given below
1
x2 d1 b1 y1 c1 z1
a1
1
y 2 d 2 a2 x1 c2 z1
b2
1
z 2 d3 a3 x1 b3 y1
c1
Substituting the values of x2, y2 and z2 in (2) we get the third approximations x3,
y3 and z3. This process may be repeated till the difference between two consecutive
approximations is negligible.
EXAMPLE:5
Solve the following system by Gauss-Jacobi method:
10x – 5y -2z = 3; x + 6y +10z = -3 ; 4x – 10y +3z = -3;
Solution:
The given equations are not diagonally dominant, Therefore, we rewrite the
equations as follow:
10x – 5y -2z = 3
4x – 10y +3z = -3
x + 6y +10z = -3
1
x 3 5 y 2 z
10
1
y 3 4 x 3 z
10
1
z 3 x 6 y
10
First Iteration
1
x1 3 5(0) 2(0) 0.3
10
1
y 1 3 4(0) 3(0) 0.3
10
1
z 1 3 0 6(0) 0.3
10
Second Iteration
1
x2 3 5(0.3) 2(0.3) 0.39
10
1
y 2 3 4(0) 3(0) 0.33
10
1
z 2 3 0 6(0) 0.51
10
x3 0.363; y3 0.303; z3 0.537
Third Iteration
x4 0.344; y4 0.284; z4 0.518
Fourth Iteration
x5 0.338; y5 0.282; z5 0.505
Fifth Iteration
Sixth Iteration x6 0.340; y6 0.284; z6 0.503
EXERCISE 1.5
1
x d1 b1 y c1 z
a1
1
y d 2 a2 x c2 z
b2
1
z d3 a3 x b3 y
c1
Substituting x2 =0, x3 =0 in (A), we get the value for x1 and it is denoted by x1,
substituting x1 = x1 and x3 = 0 in (B) we get the value for x2 and it is denoted by x2,
substituting x1 = x1 and x2 = x2 in (C) we get the value for x3. These values of x1,
x2, x3 are called the first iterative value of x1, x2 and x3.
The above process may continue for 2nd , 3rd, 4th etc.,iterations.
EXAMPLE: 6
Solution:
8 3 2
4 11 1
6 3 12
The co-efficient matrix A = is diagonally dominant.
1
x 20 3 y 2 z ; y 1 33 4 x z ; z 1 35 6 x 3 y
8 11 12
First Iteration:
1
x 20 30 20 2.5
8
1
y 33 42.5 0 2.091
11
1
z 35 62.5 32.091 1.144
12
Second Iteration:
1
x 20 32.091 21.144 2.998
8
1
y 33 42.998 1.144 2.014
11
1
z 35 62.998 32.014 0.914
12
Third Iteration:
1
x 20 32.014 20.914 3.027
8
1
y 33 43.027 0.914 1.982
11
1
z 35 63.027 31.982 0.908
12
Fourth Iteration:
1
x 20 31.982 20.908 3.016
8
1
y 33 43.016 0.908 1.986
11
1
z 35 63.016 31.986 0.912
12
Fifth Iteration:
1
x 20 31.986 20.912 3.017
8
1
y 33 43.017 0.912 1.986
11
1
z 35 63.017 31.986 0.912
12
Sixth Iteration:
1
x 20 31.986 20.912 3.017
8
1
y 33 43.017 0.912 1.986
11
1
z 35 63.017 31.986 0.912
12
Iteration x y z
1 2.500 2.091 1.144
2 2.998 2.014 0.914
3 3.027 1.982 0.908
4 3.016 1.986 0.912
5 3.017 1.986 0.912
6 3.017 1.986 0.912
EXERCISE 1.6
Step: 1
Step: 2
Note:
A . A-1 = A-1 . A = I
EXAMPLE: 7
4 1 2
2 3 1
1 2 2
By Gauss – Jordan method find A , if A =
-1
.
Solution:
Consider the augmented matrix
4 1 2 1 0 0
2 3 1 0 1 0
1 2 2 0 0 1
[A, I] =
1 2 2 0 0 1
2 3 1 0 1 0
4 1 2 1 0 0 R1 R3
~
1 2 2 0 0 1
0 7 5 0 1 2 R 2 R 2 2 R1
0 5 4 1 2 0 R3 R3 2 R 2
~
1 2 2 0 0 1
0 1 5 / 7 0 1/ 7 2 / 7 1
0 5 4 1 2 0 R2 R2
~ 7
1 0 4 / 7 0 2/7 3/ 7
0 1 5 / 7 1 1/ 7 2 / 7 R1 R1 2 R2
0 0 3/ 7 0 9 / 7 10 / 7 R3 R3 5 R2
~
1 0 4 / 7 0 2/ 7 3/ 7
0 1 5/ 7 0 1/ 7 2 / 7
0 0 7
1 7 / 3 3 10 / 3 R3 R3 3
4
1 0 0 4 / 3 2 7 / 3 R1 R1 7 R3
0 1 0 5/3 2 8/3 5
0 0 1 7 / 3 3 10 / 3 R2 R2 R3
7
4/3 2 7/3
A 5/3 2 8/3
-1
7 / 3 3 10 / 3
Hence,
EXERCISE 1.7
( )
1 3 3
1 4 3
1. Find the inverse of A =
1 3 4 by Gauss-Jordan method.
( )
0 1 2
1 2 3
2. Find the inverse of A =
3 1 1 by Gauss- Jordan method.
( )
2 −2 4
2 3 2
3. Find the inverse of A =
−1 1 −1 by Gauss- Jordan method.
Let λ1, λ2……., λn be the Eigen values of A and let , λ1 be the dominant Eigen
value.
1 2 3 ........ n
i.e.,
If the corresponding Eigen vectors are x0, x1,……xn , then any arbitrary vector y
can be eritten as y = a0x0 + a1x1 + …….+ anxn.
Since the Eigen vectors are linearly independent.
Now,
Ak y Ak a0 x0 ....... an xn
a01k x0 a12k x1 ..... an nk xn
k
1k a0 x0 a1 2 x1 .......
1
But i 1, i 2,3,......n
1
Hence, Ak y 1k a0 x0 and Ak 1 y 1k 1a0 x0
Ak 1 y
1 k
Hence, if k is large, A y where the division is carried out in the
corresponding components.
Here y is quite arbitrary. But generally we choose it as the vector having all its
components one.
Note:
1 2 3 ........ n
1. λ1 is dominant if ., .
4. Sum of the Eigen values of a matrix is equal to the sum of the diagonal
elements of the matrix = Trace of the matrix.
EXAMPLE: 8
Find the largest Eigen value and the corresponding vector of the matrix A =
9 10 8
10 5 1
8 1 3
Solution:
Let X0 =
1 1 1
T
be the initial vector
9 10 8 1 27 1.00
10 5 1 1 14 0.52
8 1 3 1
AX0 = = 10 = 27 0.37
EXERCISE 1.8
1. Use the power method to find the dominant eigen value and the corresponding eigen vector
of the matrix
( )
9 1 8
7 4 1
A=
1 7 9
2. Find the largest Eigen value and the corresponding Eigen vector of the matrix
( )
4 6 0
0 5 3
A=
2 0 3
3. Using power method, find the dominant Eigen value and the corresponding Eigen
( )
3 2 6
−1 12 1
vector of the matrix A =
4 2 1