Numerical Analysis
Limitations of analytical methods led to the evolution of Numerical methods. Numerical
Methods often are repetitive in nature i.e., these consist of the repeated execution of the
same procedure where at each step the result of the proceeding step is used. This process
known as iterative process is continued until a desired degree of accuracy of the result is
obtained.
Solution of Algebraic and Transcendental Equations
The equation f(x) = 0 said to be purely algebraic if f(x) is purely a polynomial in x.
If f(x) contains some other functions like Trigonometric, Logarithmic, exponential etc.
then f(x) = 0 is called a Transcendental equation.
Ex: (1) x4 - 7x3 + 3x + 5 = 0 is algebraic
(2) ex - x tan x = 0 is transcendental
Bisection Method:
This method is used in locating a root of the equation f(x) = 0 between a and b.
If f(x) is continuous between a and b, f(a) and f(b) are opposite in sign then exists a root between
a and b.
For simplicity, let f(a) < 0 and f(b) > 0
1
The first approximation to the root is x 1 (a b )
2
If f(x1) = 0 then x1 is the root of f(x)=0
If f(x1) is + ve then root lies between a and x1 and the second approximation to the root is
1
x2 (a x 1 )
2
Now if f(x2) is - ve then the root lies between x2 and x1 and the third approximation to the root is
1
x3 (x 2 x1 )
2
GET ALL VTU NOTES AND QUESTION PAPERS!
DOWNLOAD VTUCAMPUS APP
This process is continued until the root is found with desired accuracy
Fig.
1. Solve x3 - 9x + 1 = 0 for the root lying between 2 and 3 using bisection method in six stages.
Answer:
f(x) = x3 - 9x + 1 = 0
f(2) =-9 -ve
f(3) = 55 +ve
23
x1 2.5
2
f ( x 1 ) 5.8 ve
Root lies between 2.5 and 3
2 .5 3
x2 2.75
2
f(x2) = f(2.75) = -2.9 -ve
Root lies between 2.75 and 3
2.75 3
x3 2.875
2
f(x3) = 2.875 = -1.111 -ve
Root lies between 2.875 and 3
2.875 3
x4 2.9375
2
f(x4) = -0.09 -ve
Root lies between 2.9375 and 3
2.9375 3
x5 2.969
2
f(x5) = 0.451 +ve
Root lies between 2.9375 and 2.969
2.9375 2.969
x6 2.953
2
f(x5) = 0.17 +ve
2.9375 2.953
Root lies between 2.9375 and 2.953 x 6 2.95
2
GET ALL VTU NOTES AND QUESTION PAPERS!
DOWNLOAD VTUCAMPUS APP
Method of false position or Regula-Falsi Method:
This is a method of finding a real root of an equation f(x) = 0 and is slightly an
improvisation of the bisection method.
Let x0 and x1 be two points such that f(x0) and f(x1) are opposite in sign.
Let f(x0) > 0 and f(x1) < 0
The graph of y = f(x) crosses the x-axis between x0 and x1
Root of f(x) = 0 lies between x0 and x1
Now equation of the Chord AB is
f (x1 ) f (x 0 )
y f (x 0 ) (x x 0 ) ...(1)
x1 x 0
When y =0 we get x = x2
x1 x 0
i.e. x 2 x 0 f (x 0 ) ...(2)
f (x1 ) f (x 0 )
Which is the first approximation
If f(x0) and f(x2) are opposite in sign then second approximation
x2 x0
x3 x0 f (x 0 )
f (x 2 ) f (x 0 )
This procedure is continued till the root is found with desired accuracy.
1. Find a real root of x3 - 2x -5 = 0 by method of false position correct to three decimal
places between 2 and 3.
Answer:
Let f(x) = x3 - 2x - 5 = 0
f(2) = -1
f(3) = 16
a root lies between 2 and 3
Take x0 = 2, x1 = 3
x0 = 2, x1 = 3
x1 x 0
Now x 2 x 0 f (x 0 )
f (x1 ) f (x 0 )
32
2 (1)
16 1
= 2.0588
f(x2) = f(2.0588) = -0.3908
Root lies between 2.0588 and 3
Taking x0 = 2.0588 and x1 = 3
f(x0) = -0.3908, f(x1) = 16
x1 x 0
We get x 3 x 0 .f ( x 0 )
f (x1 ) f (x 0 )
0.9412
2.0588 (0.3908)
16.3908
= 2.0813
f(x3) = f(2.0813) = -0.14680
Root lies between 2.0813 and 3
GET ALL VTU NOTES AND QUESTION PAPERS!
DOWNLOAD VTUCAMPUS APP
Taking x0 = 2.0813 and x1 = 3
f(x0) = 0.14680, f(x1) =16
0.9187
x 4 2.0813 (0.14680) 2.0897
16.1468
Repeating the process the successive approximations are
x5 = 2.0915, x6 = 2.0934, x7 = 2.0941, x8 = 2.0943
Hence the root is 2.094 correct to 3 decimal places.
2. Find the root of the equation xex = cos x using Regula falsi method correct to three
decimal places.
Answer:
Let f(x) = cosx - xex
Observe
f(0) = 1
f(1) =cos1 - e = -2.17798
root lies between 0 and 1
Taking x0 = 0, x1 = 1
f(x0) = 1, f(x1) = -2.17798
x1 x 0
x2 x0 .f ( x 0 )
f (x1 ) f (x 0 )
1
0 (1) 0.31467
3.17798
f(x2) = f(0.31467) = 0.51987 +ve
Root lies between 0.31467 and 1
x0 = 0.31467, x1 = 1
f(x0) = 0.51987, f(x1) = -2.17798
1 0.31467
x 3 0.31467 (0.51987) 0.44673
2.17798 0.51987
f(x3) = f(0.44673) = 0.20356 +ve
Root lies between 0.44673 and 1
0.55327
x 4 0.44673 0.20356 0.49402
2.38154
Repeating this process
x5 = 0.50995, x6 = 0.51520, x7 = 0.51692, x8 = 0.51748
x9 = 0.51767, etc
Hence the root is 0.518 correct to 4 decimal places
GET ALL VTU NOTES AND QUESTION PAPERS!
DOWNLOAD VTUCAMPUS APP
Newton Raphson Method
This method is used to find the isolated roots of an equation f(x) = 0, when the derivative
of f(x) is a simple expression.
Let m be a root of f(x) = 0 near a.
f(m) = 0
We have by Taylor's series
( x a ) 2 ''
f ( x ) f (a ) ( x a ) f (a )
'
f (a ) .....
2!
f (m) f (a ) (m a ) f ' (a ) .....
Ignoring higher order terms
f(m) = f(a) + (m - a) f' (a) = 0
f (a )
or m a
f ' (a )
f (a )
or m a '
f (a )
Let a = x 0, m = x 1
f (x 0 )
then x1 x 0 is the first approximation
f ' (x 0 )
f (x1 )
x 2 x1 is the second approximation
f ' (x1 )
.
.
.
f (x k )
x k 1 x k is the iterative formula for Newton Raphson Method
f ' (x k )
1. Using Newton's Raphson Method find the real root of x log10 x = 1.2 correct to four
decimal places.
Answer:
Let f(x) = x log10 x - 1.2
f(1) = -1.2, f(2) = -0.59794, f(3) = 0.23136
x log e x 1 log e x
We have f ( x ) 1 .2 f ' ( x )
log e 10 log e 10
log10 e log10 x
x k log10 x k 1.2
x k 1 x k
log10 e log10 x K
Let x0 = 2.5 (you may choose 2 or 3 also)
2.5 log10 2.5 1.2
x 1 2 .5 2.7465
log10 e log10 2.5
2.7465 log 2.7465 1.2
x 2 2.7465 2.7406
log10 e log10 2.7465
Repeating the procedure
x 3 2.7406
x 2.7406 is the root of the given equation
2.Using Newton's Method, find the real root of xex = 2. Correct to 3 decimal places.
Answer:
Let f(x) = xex - 2
f(0) = -2
f(1) = e - 2 = 0.7182
Let x0 = 1
f' (x) = (x + 1) ex
We have
x k e xk 2
x k 1 x k
( x k 1) e x k
e2
x1 1 0.8678
2e
(0.8678 ) e 0.8678 2
x 2 0.8678 0.8527
(1.8678 ) e 0.8678
(0.8527 ) e 0.8527 2
x 3 0.8527 0.8526
(1.8527 ) e 0.8527
GET ALL VTU NOTES AND QUESTION PAPERS!
DOWNLOAD VTUCAMPUS APP
x 0.8526, is the required root. Correct to 3 decimal places
3. Find by Newton's Method the real root of 3x = cosx + 1 near 0.6, x is in radians.
Correct for four decimal places.
Answer:
Let f(x) = 3x - cosx - 1
f'(x) = 3 + sinx
3x k cos x k 1
x k 1 x k
3 sin x k
3 (0.6) cos (0.6) 1
When x 0 0.6 x 1 0.6 0.6071
3 sin (0.6)
3 (0.6071) cos (0.6071) 1
x 2 0.6071 0.6071
3 sin (0.6071)
Since x1 = x2
The desired root is 0.6071
4. Obtain the iterative formula for finding the square root of N and find 41
Answer:
Let x N
or x2 - N = 0
f(x) = x2 - N
f'(x) = 2x
Now
x 2k N
x k 1 x k
2x k
xk N
xk
2 2x k
1 N
i.e. x k 1 x k
2 xk
To find 41
Observe that 36 41
Choose x 0 6
1 41
x1 6 6.4166
2 6
1 41
x2 6.4166 6.4031
2 6.4166
1 41
x3 6.4031 6.4031
2 6.4031
Since x2 = x3 = 6.4031
The value of 41 6.4031
5. Obtain an iterative formula for finding the p-th root of N and hence find (10)1/3
correct to 3 decimal places.
Answer:
Let xp = N
or xp - N = 0
Let f(x) = xp - N
f ' ( x ) px p 1
x pk N
Now x k 1 x k
px pk 1
Observe that 8 < 10
81 / 3 101 / 3
i.e. 2 (10)1 / 3
Use x0 = 2, p = 3, N=10
2 3 10
x1 2 2.1666
3 (2 2 )
(2.1666) 3 10
x 2 2.1666 2.1545
3(2.1666) 2
GET ALL VTU NOTES AND QUESTION PAPERS!
DOWNLOAD VTUCAMPUS APP
(2.1545) 3 10
x 3 2.1545 2.1544
3 (2.1545) 2
(10)1 / 3 2.1544
6. Obtain an iterative formula for finding the reciprocal of p-th root of N. Find (30)-1/5
correct to 3 decimal places.
Answer:
Let x -p = N
or x -p - N = 0
f(x) = x -p - N
f'(x) = -px -p - 1
Now
p
xk N
x k 1 x k
p 1
p xk
1
sin ce (32)1 / 5 0.5
2
We use x0 = 0.5, p = 5, N = 30
(0.5) 5 30
x 1 0 .5 0.50625, Re peating the process
5(0.5) 6
x 2 0.506495, x 3 0.506495
(30) 1 / 5 0.5065
proof not read
Finite Differences
Let y = f(x) be represented by a table
x: x0 x1 x2 x3 …. xn
y: y0 y1 y2 y3 … yn
where x0, x1,x2….xn are equidistant. (x1 - x0 = x2 - x1 = x3 - x2 =….=xn - xn-1 = h)
We now define the following operators called the difference operators.
Forward difference operator ()
f ( x ) f ( x h ) f ( x )
y r y r 1 y r , r 0,1, 2,..., n 1
y 0 y1 y 0
y1 y 2 y1
. first forward differences
.
y n 1 y n y n 1
2 y 0 , 2 y1 , 2 y 2 ,...., are called the sec ond differences
Now 2 y 0 (y 0 ) ( y1 y 0 )
y1 y 0 ( y 2 y1 ) ( y1 y 0 )
y 2 2 y1 y 0
||| ly 2 y1 y 3 2 y 2 y1
2 y r y r 2 2 y r 1 y r
Note : 3 y 0 y 3 3y 2 3y1 y 0
k y r y r k k C1 y r k 1 k C 2 y r k 2 .... (1) k C r
GET ALL VTU NOTES AND QUESTION PAPERS!
DOWNLOAD VTUCAMPUS APP
Difference Table
x y y 2 y 3 y 4 y 5 y
x0 y0
y0
x1 y1 2y0
y1 3y0
x2 y2 2y1 4y0
y2 3y0
x3 y3 2y2
y3
x4 y4
y 0 , 2 y 0 , 3 y 0 ,....are called the leading differences.
Ex: The following table gives a set of values of x and the corresponding values of y = f(x)
x: 10 15 20 25 30 35
y: 19.97 21.51 22.47 23.52 24.65 25.89
Form the difference table and find f (10), 2 f (10), 3 f (20), 4 f (15)
x y 2 3 4 5
10 19.97
1.54
15 21.51 -0.58
0.96 0.67
20 22.47 0.09 -0.68
1.05 -0.01 0.72
25 23.52 0.08 0.04
1.13 0.03
30 24.65 0.11
1.24
35 25.89
f (10) 1.54, 2 f (10) 0.58, 3 f (20) 0.03, 4 f (15) 0.04
Note: The nth differences of a polynomial of n the degree are constant.
If f(x) = a0 xn + a1 xn-1 + a2 xn-2 +… + an, a0 0 then n f ( x ) a 0 n! h n , n 1f ( x ) 0
1. Construct a difference table for y = f(x) = x3 +2x + 1 for x = 1, 2, 3, 4, 5
x y y y y y
1 4
9
2 13 12
21 6
3 34 18 0
39 6
4 73 24
63
5 136
2. If y0 = 1, y1 = 11, y2 = 21, y3 = 28, y4 = 29. Construct the difference table.
GET ALL VTU NOTES AND QUESTION PAPERS!
DOWNLOAD VTUCAMPUS APP
x y y y y y
x0 1
10
x1 11 0
10 -3
x2 21 -3 0
7 -3
x3 28 -6
1
x4 29
Backward difference operator ()
Let y = f(x)
We define f(x) = f(x) - f(x - h)
i.e. y1 = y1 - y0 = y0
y2 = y2 - y1 = y1
y3 = y3 - y2 = y2
'
'
yn = yn - yn-1 = yn - 1
y r y r y r 1 y r 1
Note:
1. f(x + h) = f(x + h) - f(x) = f(x)
2. 2 f(x + 2h) = (f(x + 2h))
= {f(x + 2h) - f(x + h)}
= f(x + 2h) - f(x + h)
= f(x + 2h) - f(x + h) - f(x + h) + f(x)
= f(x + 2h) -2f(x + h) + f(x)
= 2 f(x)
|||ly n f(x + nh) = n f(x)
Backward difference table
x y y 2y 3y 4y 5y
X0 y0
y1
X1 y1 2y2
y2 3y3
X2 y2 2y3 4y4
y3 3y4 4y5
X3 y3 2y4 4y5
y4 3y5
X4 y4 2y5
y5
X5 y5
1. Form the difference table for
x 40 50 60 70 80 90
y 184 204 226 250 276 304
and find y (30), 2y (70), 5y (90)
GET ALL VTU NOTES AND QUESTION PAPERS!
DOWNLOAD VTUCAMPUS APP
x y y 2y 3y 4y 5y
40 184
20
50 204 2
22 0
60 226 2 0
24 0 0
70 250 2 0
26 0
80 276 2
28
90 304
y (80) = 26, 2y (70) = 2, 5y (90) = 0
2. Given
x 0 1 2 3 4
f(x) 4 12 32 76 156
Construct the difference table and write the values of f (4), 2f (4), 3f (3)
x y y 2y 3y
0 4
8
1 12 12
20 12
2 32 24
44 12
3 76 36
80
4 156
Central Differences Operator ()
Let y = f(x) be represented by a table
x: x0 x1 x2 x3 …. xn
y: y0 y1 y2 y3 … yn
Note 1:
y1 / 2 y1 y 0 y 0 y1
y 3 / 2 y 2 y1 y1 y 2
y n 1 / 2 y n y n 1 y n 1 y n
Note 2:
y 3 / 2 y1 / 2 2 y1
y 5 / 2 y 3 / 2 2 y 2
y 7 / 2 5 / 2 2 y 3
Note 3: We have
GET ALL VTU NOTES AND QUESTION PAPERS!
DOWNLOAD VTUCAMPUS APP
f (x 0 h / 2) f (x1 ) f (x 0 )
h h
f (x ) f x f x
2 2
Note 4: Central difference table
x y y 2y 3y 4y
x0 y0
y1/2
x1 y1 2y1
y3/2 3y3/2
x2 y2 2y2 4y4
y5/2 3y5/2
x3 y3 2y3
y7/2
x4 y4
1. Show that:
i) 2 y 5 y 6 2 y 5 y 4
2 y 5 y11 / 2 y 9 / 2
y11 / 2 y 6 y 5
y 9 / 2 y 5 y 4
Now 2 y 5 y11 / 2 y 9 / 2
(y6 y5 ) (y5 y 4 )
y 6 2y 5 y 4
ii) prove that 2 y 0 y1 2 y 0 y 1
2 y 0 y1 / 2 y 1 / 2
y1 / 2 y1 y 0
y 1 / 2 y 0 y 1
2 y 0 y1 / 2 y 1 / 2
( y1 y 0 ) ( y 0 y 1 )
y1 2 y 0 y1
2. Given f(-2) = 12, f(-1) = 16, f(0) = 15, f(1) = 18, f(2) = 20
form the central difference table and write down the values of y-3/2, 2y0, 3y1/2 by
taking x0 = 0
x y y 2y 3y 4y
-2 y-2 12
y-3/2 4
-1 y-1 16 2y1 -5
y-1/2 -1 3y-1/2 9
0 y0 15 2y0 4 4y0 -14
y1/2 3 3y1/2 -5
1 y1 18 2y1 -1
y3/2 2
2 y2 20
y 3 / 2 4, 2 y 0 4, 3 y1 / 2 5
Shift operator (E)
E f(x) = f(x +h)
E2 f(x) = f(x + 2h)
En f(x) = f(x + nh)
GET ALL VTU NOTES AND QUESTION PAPERS!
DOWNLOAD VTUCAMPUS APP
Note: 1
f (x) f (x h) f (x)
f ( x ) Ef ( x ) f ( x )
f ( x ) (E 1) f ( x )
|| ly 2 (E 1) 2 f ( x )
n (E 1)n f (x )
n y 0 y n n C1 y n 1 n C 2 y n 2 .... (1) n y 0
Note 2:
f (x) f (x) f (x h)
1
f ( x ) f ( x ) f (x)
E
1 E 1
1 .
E E
1. Show that
i) 6 y 0 y 6 6 y 5 16 y 4 20 y 3 15 y 2 6 y1 y 0
ii) 3 y 2 y 5 3y 4 3y 3 y 2
2. If f(x) = x3 + 6x2 + 11x + 6. Prove that the second difference is 6x + 18 using h = 1.
f ( x ) x 3 6 x 2 11x 6
f ( x 1) ( x 1) 3 6( x 1) 2 11( x 1) 6
f ( x ) f ( x 1) f ( x ) 3x 2 15x 18
2 f ( x ) f ( x 1) f ( x )
3( x 1) 2 15( x 1) 18 3x 2 15x 18
= 6x + 18
3. If f(x) = eax show that f(0) and its leading differences form a G.P
f(x) = eax
f(0) = e0 = 1
f ( x ) e ax ah e ax e ax (e ah 1)
2 f ( x ) (e ah 1) (e a ( x h ) e ax )
(e ah 1) (e ah 1) . e ax (e ah 1) 2 e ax
n f ( x ) (e ah 1) n e ax
which is in GP where first term = ea(0) = 1
Common ratio eah - 1
4. Find i) sinx ii) tan-1x iii) log x
i) sinx = sin (x + h) - sinx
h h
2 cos x sin
2 2
ii) tan 1 x tan 1 {x h} tan 1 x
xhx
tan 1
1 ( x h ) x
h
tan 1 2
x hx 1
iii) log x log ( x h ) log x
xh
log
x
h
log 1
x
2 x 3 2
5. Evaluate i) ii) e 2 choose h = 1
Ex 3 E
Answer:
GET ALL VTU NOTES AND QUESTION PAPERS!
DOWNLOAD VTUCAMPUS APP
2 ( x 3 )
i)
E (x 3 )
[( x 1) 3 x 3 ]
( x 1) 3
6
( x 1) 2
ii) 2 e x (e x 1 e x )
e e x e x
(e 1) e x
(e 1) {e x 1 e x }
(e 1) (e x ) (e 1) (e 1) 2 e x
6. Find the missing term from the table:
x 0 1 2 3 4
y 1 3 9 - 81
Explain why the value obtained is different by putting x = 3 in 3 x.
Note:
The above problem can be worked in two methods
Method I denoting the missing value as a, b, c ..etc. Construct a difference table and
solve.
Method II Given a set of n values, assume n y = 0 or (E - 1)n y = 0 expand using
binomial theorem.
x y y 2 y 3 y 4 y
0 1 2
1 3 6 4
2 9 a-9 a - 15 a - 19 -4a + 124
3 a 81 - a 81 - a -3a +105
4 81
Put 4y = 0 (assuming f(x) its be a polynomial of degree 3)
i.e., -4a + 124 = 0
a = 31
Since we have assumed f(x) to be a polynomial of degree 3 which is not 3 x we obtained a
different value.
Method 2:
(E - 1)4 y0 = 0
y4 - 4E3y0 + 6E2y0- 4Ey0 + y0 = 0
y4 - 4y3 + 6y2 - 4y1 + y0 = 0 y3 = 31
7. Given u1 = 8, u3 = 64, u5 = 216 find u2 and u4
x u u 2 u 3 u
x1 8
x2 a a-8 -2a + 72 b + 3a - 200
x3 64 64 - a b + a - 128 -3b - a + 408
x4 b b - 64 -2b + 280
x5 216 216 -b
We carryout upto the stage where we get two entries ( 2 unknowns) and equate each of
those entries to zero. (Assuming) to be a polynomial of degree 2.
b + 3a - 200 = 0
-3b - a + 408 = 0
We get a = 24 b = 128
Method 2:
Given 3 set of values
Assume 3u0 = 0
GET ALL VTU NOTES AND QUESTION PAPERS!
DOWNLOAD VTUCAMPUS APP
(E 1) 3 u 0 0
u 3 3 E 2 u 0 3 Eu 0 u 0 0
u 3 3u 2 3u 1 u 0 0
i.e., u 4 3u 3 3u 2 u 1 0
b 3(64) 3a 8 0
3a b 200 0
u 5 3u 4 3u 3 u 2 0
216 3b 3(64) a 0
3b a 408 0
a 3b 408 0
Solving we get a = 24, b = 128
8. Given u0 = 0, u1 = 12, u2 = 81, u3 = 200, u4 = 100, u5 = 8 find 5 u0 without using
difference table.
Ans: 5 u0 = 755
Try these
9. Find the missing value in the table
x 0 1 2 3 4
y 1 2 4 - 16
Answer: a = 8.25
10. Assuming that the following values of y belong to a polynomial of degree 4.
Complete the next 3 values.
x 0 1 2 3 4
y 1 -1 1 -1 1
Answer: a = 31, b = 129, c = 351