LTNMCV Unit 2.1
LTNMCV Unit 2.1
UNIT-I
SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS,
INTERPOLATION
INTRODUCTION
Using mathematical modeling, most of the problems in engineering and physical and
economical sciences can be formulated in terms of system of linear or non linear
equations, ordinary or partial differential equations or Integral equations. In majority
of the cases, the solutions to these problems in analytical form are non-existent or
difficult or not amenable for direct interpretation. In all such problems, numerical
analysis provides approximate solutions are practical and amenable for analysis.
Numerical analysis does not strive for exactness. Instaed, it yields approximations
with specified degree of accuracy. The early disadvantages of the several numbers of
computations involved has been removed through high speed computation using
computers, giving results which are accurate, reliable and fast. Numerical approch is
not only a science but also an ‘art’ because the choice of ‘appropriate’ procedure
which ‘best’ suits to a given problem yields ‘good’ solutions.
o x
root
The roots of an equation are the points where the graph y f x cuts the x-axis.
2. Iterative methods: The following are some iteravative methods to find an approximate
root of an equation
PROBLEMS
1. Using bisection method, find the negative root of x3 4 x 9 0
SOL:
Givenf(x)= x3 4 x 9
f(-1)=-1+4+9=12>0
f(-2)=-8+8+9=9>0
f(-3)=-27+12+9=-6<0
Since f(-2)>0 and f(-3)<0 therefore root lies in interval (-2,-3)= (𝑥0 , 𝑥1 )
Bisect this interval to get next approximation 𝑥2
−𝟐−𝟑
i.e 𝑥2 = 𝟐
= -2.5 , 𝑓 (−2.5) > 0
We continue this procedure till the root is found to the desired accuracy. (stop the procedure
when two successive approximations are same up to four decamal places)
2). Find a root of the equation x3 x 1 0 using the bisection method in 5 – stages
Sol. Given 𝑓 (𝑥 ) = 𝑥 3 − 𝑥 − 1
𝑓 (1) = −1 < 0
𝑓 (2) = 5 > 0
∴One root lies between 1 and 2
Now see f(1) is near to 0 than f(2). So root is near to 1
so again find f(1.1),f(1.2)……
2.5+3
i.e𝑥3 = =2.75 𝐻𝑒𝑟𝑒 𝑓(𝑥3) = 𝑓(2.75) > 0
2
Continuing like above ,we get 𝑥9 = 2.7453 𝑥10 =2.7406
Therefore, Approximate root is 2.741.
5.Find a root of an equation x = cosx using bisection method.
SOL:
𝐺𝑖𝑣𝑒𝑛 𝑓𝑥) = 𝑥 – 𝑐𝑜𝑠(𝑥)
𝑓(0) = 0 − 𝑐𝑜𝑠0 = −1 < 0
𝑓(1) = 1 − 𝑐𝑜𝑠1 = 0.4597 > 0
𝑡ℎ𝑒𝑛 𝑜𝑛𝑒 𝑟𝑜𝑜𝑡 𝑚𝑢𝑠𝑡 𝑏𝑒 𝑙𝑖𝑒𝑠 𝑏𝑒𝑡𝑤𝑒𝑒𝑛 𝑖𝑛 (0 , 1)
Here 𝑓 (1)𝑣𝑎𝑙𝑢𝑒 𝑖𝑠 𝑛𝑒𝑎𝑟 𝑡𝑜 𝑧𝑒𝑟𝑜 𝑠𝑜
𝑓(0.9) = 0.2784 > 0
𝑓(0.8) = 0.1033 > 0
𝑓(0.7) = −0.0648 < 0
Since f(0.7)<0 and f(8)>0 therefore root lies in interval (0.7,0.8)= (𝑥0 , 𝑥1 )
Bisect this interval to get next approximation 𝑥2
𝑥0 + 𝑥1 0.7+0.8
i.e , 𝑥2 = 2
= = 0.75 𝑓(0.75) = 0.0183 > 0
2
Since f(0.7)<0 f(0.75)>0 f(0.8)>0 therefore root lies in (0.7,0.75)
Bisect this interval to get next approximation 𝑥3
𝑥2 + 𝑥0 0.7 + 0.75
𝑖. 𝑒 𝑥3 = = = 0.725 𝑓(0.725) = −0.0235 < 0
2 2
Since f(0.7)<0 𝑓(0.725) < 0 f(0.75)>0 therefore root lies in (0.725,0.75)
Bisect this interval to get next approximation𝑥4
𝑥2 + 𝑥3 0.725 + 0.75
𝑖. 𝑒 𝑥4 = = = 0.7375 𝑓(0.7375) = −0.0027 < 0
2 2
Since 𝑓 (0.725) < 0 𝑓(0.7375) < 0 f(0.75)>0 therefore root lies in (0.7375,0.75)
Bisect this interval to get next approximation 𝑥5
𝑥2 + 𝑥4 0.7375 + 0.75
𝑖. 𝑒 𝑥5 = = = 0.7425 𝑓(0.7425) = 0.0057 > 0
2 2
We continue this procedure till the root is found to the desired accuracy. (stop the procedure
when two successive approximations are same up to four decamal places)
𝑇ℎ𝑒 𝑟𝑒𝑞𝑢𝑖𝑟𝑒𝑑 𝑎𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒 𝑟𝑜𝑜𝑡 = 0.7392.
6. Find a root of an equation 𝟑𝒙 = 𝒄𝒐𝒔𝒙 + 𝟏 using bisection method.
SOL:Given 𝑓(𝑥) = 3 𝑥 − 𝑐𝑜𝑠 𝑥 – 1
𝑓(0) = −2 < 0
𝑓(1) = 1.4597 > 0
𝑓(0.5) = −0.3776 < 0
Since f(0.5)<0 and f(1)>0 therefore root lies in interval (0.5,1)= (𝑥0 , 𝑥1 )
Bisect this interval to get next approximation 𝑥2
𝑥0 + 𝑥1 0.5+1
i.e 𝑥2 = = = 0.75 𝑓(0.75) = 0.5183 > 0
2 2
Since f(0.5)<0 f(0.75)>0 f(1)>0 therefore root lies in (0.5,0.75)
𝑥2 + 𝑥0 0.5+0.75
𝑖. 𝑒 𝑥3 = = = 0.625 𝑓(0.625) = 0.06403 > 0
2 2
Since f(0.5)<0 𝑓 (0.625) > 0 f(0.75)>0 therefore root lies in (0.5,0.625)
𝑥0 + 𝑥3 0.5+0.625
Bisect this interval to get next approximation𝑥4 𝑖. 𝑒 𝑥4 = = =
2 2
0.5625 𝑓(0.5625) = −0.1584 < 0
Since f(0.5)<0 𝑓(0.5625) < 0 𝑓 (0.625) > 0 therefore root lies in (0.5625,0.625)
𝑥3 + 𝑥4 0.5625+0.625
Bisect this interval to get next approximation 𝑥5 𝑖. 𝑒 𝑥5 = = =
2 2
0.59375 𝑓(0.59375) = −0.0475 < 0
We continue this procedure till the root is found to the desired accuracy.
(stop the procedure when two successive approximations are same up to four decamal places)
Therefore, Approximate root is 0.61.
7.Find the real root of the equation x3-5x+1=0 by bisection method.
0 0.25
the third approximation x2= =0.125
2
Now f(0.125)=0.3749 > 0
f(0) > 0 f(0.125)>0 f(0.25) < 0
therefore the root lies between 0 and 0.125
continue this procedure till the desired occurucy is obtained.
in this method first we choose two initial approximate values x0 and x1 such that 𝑓(𝑥0 ) and
𝑓(𝑥1 ) will have opposite signs i.e f x0 . f x1 <0. Therefore the root lies in interaval
(𝑥0 , 𝑥0 )
Here two cases occur (i) f x0 <0, f x1 >0 (ii) f x0 >0, f x1 <0
y
B
(x1,f(x1))
f(x1)>0
xC2
o x
f(x0)<0 x3
root
A ((x0,f(x0))
At the point C where the line AB crosses the x – axis, where 𝑓(𝑥) = 0 𝑖𝑒, 𝑦 = 0
substitute 𝑦 = 0 in equation (1), then we get
x1 x0
x x0 f x0 2
f x1 f x0
𝑥 is given by (2) serves as an approximated value of the root, when the interval in which it
lies is small. If the new value of 𝑥 is taken as x2 then (2) becomes
x1 x0 f x
x2 x0 0
f x1 f x0
x f x1 x1 f x0
0 3
-------------(3)
f x1 f x0
Now we decide whether the root lies between
x0 and x2 or x2 and x1
In the above graph clearly f(x2)<0
Therefore root lies between x1 and x2
This will in general, be nearest to the exact root. We continue this procedure till the root
is found to the desired accuracy.
The iteration process based on (3) is known as the method of false position
The successive intervals where the root lies, in the above procedure are named as
x0 , x1 , x1, x2 , x2 , x3 etc
Where 𝑥𝑖 < 𝑥𝑖+1 and𝑓(𝑥0 ), 𝑓(𝑥𝑖+1 ) are of opposite signs.
x f xi xi f xi 1
Also xi 1 i 1
f xi f xi 1
CASE(II) f x0 >0, f x1 <0
Repeate same procedure as case(i).
PROBLEMS:
1. Find an approximate root of the equation 𝒇(𝒙) = 𝒍𝒐𝒈𝒙 − 𝒄𝒐𝒔𝒙 by using Regula-Falsi
method.
Sol : Given equation is 𝑓(𝑥 ) = 𝑙𝑜𝑔𝑥 − 𝑐𝑜𝑠𝑥
𝑓 (1) = 𝑙𝑜𝑔1 − 𝑐𝑜𝑠1 = −0.5403 < 0
𝑓 (2) = 𝑙𝑜𝑔2 − 𝑐𝑜𝑠2 = 1.1093 > 0
Since 𝑓 (1) < 0 and 𝑓 (2) > 0 Therefore the root lies in interval (1,2) = (𝑥0 , 𝑥1 )
Since 𝑓(𝑥0 ) = −0.5403 < 0 and 𝑓(𝑥1 ) = 1.1093 > 0
The next approximation to the root is given by
𝑥0 𝑓(𝑥1 ) − 𝑥1 𝑓(𝑥0 )
𝑥2 = = 1.3275
𝑓(𝑥1 ) − 𝑓 (𝑥0 )
𝑓(𝑥2 ) = 𝑓 (1.3275) = 0.04239 > 0
Since 𝑓 (𝑥0 ) = −0.5403 < 0 , 𝑓(𝑥2 ) = 0.04239 > 0, 𝑓(𝑥1 ) = 1.1093 > 0
𝑥0 𝑓(𝑥1 ) − 𝑥1 𝑓(𝑥0 )
𝑥2 = = 3.7878
𝑓(𝑥1 ) − 𝑓 (𝑥0 )
0.6𝑓(0.7)−0.7𝑓(0.6)
=
𝑓(0.7)−𝑓(0.6)
=0.620451
( )
Since 𝑓 𝑥0 <0 𝑓 𝑥2 = f(0.620451)=0.001587>0 𝑓 (𝑥1 )>0
( )
Therefore the root lies in the interval (0.6, 0.620451)= (𝑥0 , 𝑥2 )
The next approximation to the root is given by
𝑥 0 𝑓 (𝑥 2 ) − 𝑥 2 𝑓 (𝑥 0 )
𝑥3 =
𝑓 (𝑥 2 ) − 𝑓 ( 𝑥 0 )
0.6𝑓(0.620451)−0.620451𝑓(0.6)
=
𝑓(0.620451)−𝑓(0.6)
=0.619083
f (0.619083)=0.000025>0
∴ 𝑇ℎ𝑒 𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒 𝑟𝑜𝑜𝑡 𝑖𝑠 0.6190
5. Find the root of 𝐱𝐥𝐨𝐠 𝟏𝟎 𝒙 − 𝟏. 𝟐 = 𝟎 using Regula falsi method.
Sol:
f(𝒙) = 𝐱𝐥𝐨𝐠 𝟏𝟎 𝒙 − 𝟏. 𝟐
Here
f(2)=-0.59<0,
f(3)=0.23>0
Since f(2)<0 and f(3) >0 the root lies in the interval (2,3) = (𝑥0 , 𝑥1 )
The next approximation to the root is given by
𝑥0 𝑓(𝑥1 ) − 𝑥1 𝑓(𝑥0 )
𝑥2 =
𝑓(𝑥1 ) − 𝑓 (𝑥0 )
2𝑓(3)−3𝑓(2)
=
𝑓(3)−𝑓(2)
=2.7195
Since 𝑓 (𝑥0 )<0 𝑓 (𝑥2 ) = f(2.7195)=-0.0184<0 𝑓 (𝑥1 )>0
Therefore the root lies in the interval(2.7195,3)= (𝑥2 , 𝑥1 )
The next approximation to the root is given by
𝑥2 𝑓(𝑥1 ) − 𝑥1 𝑓(𝑥2 )
𝑥3 =
𝑓(𝑥1 ) − 𝑓 (𝑥2 )
2.7195 𝑓(3)−3𝑓(2.7195)
= 𝑓(3)−𝑓(2.7195)
=2.7403
f(2.7403)=-0.000302<0
Clearly f(2.7403) is nearly equal to zero up to 3 decimal places
∴ 𝑇ℎ𝑒 𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒 𝑅𝑜𝑜𝑡 𝑖𝑠 2.740
Since f x0 and f x1 are of opposite signs, the equation f x 0 has a root between
x0 and x1
The first order approximation of this root is
x1 x0
x2 x0 f x0
f x1 f x0
2 1.8
1.8 1.3
4 1.3
1.849
We find that f x2 0.161 so that f x2 and f x1 are of opposite signs. Hence the
root lies between x2 and x1 and the second order approximation of the root is
x1 x2
x3 x2 . f x2
f x1 f x2
2 1.849
1.8490 0.159
0.159
1.8548
We find that f x3 f 1.8548
0.019
So that f x3 and f x2 are of the same sign. Hence, the root does not lie between
x2 and x3 .But f x3 and f x1 are of opposite signs. So the root lies between
x3 and x1 and the third order approximate value of the root is 𝑥4 = 𝑥 3 −
𝑥1 −𝑥3
[ ] 𝑓 (𝑥 )
3
𝑓(𝑥1 )−𝑓(𝑥3)
2−1.8548
= 1.8548 −
4+0.019
× (−0.019)
Therefore, approximate root is 1.8557
The Newton- Raphson method is a powerful and eligant method to find the root of an
equation. This method is generally used to improve the results obtained by the previous
methods.
Let x0 be an approximate root of f x 0 and let x1 x0 h be the correct root
which implies that f x1 0 . We use Taylor’s theorem and expand f x1 f x0 h 0
f x0 hf 1 x0 0
f x0
h
f 1 x0
Substituting this in x1 ,we get
f x0
x1 x0
f 1 x0
x1 is a better approximation than x0
Successive approximations are given by
𝑓(𝑥 )
𝑥2 , 𝑥3 … … … . . 𝑥𝑛+1 where 𝑥𝑖+1 = 𝑥𝑖 − 𝑓1 (𝑥𝑖 )
𝑖
GEOMETRICAL INTERPRETATION
𝑜𝑝𝑝 𝑓(𝑥0)
From below diagram tan𝜃= = ………………(1)
𝑎𝑑𝑗 𝑥𝑜−𝑥1
But slope =tan𝜃 = 𝑓 𝐼 (x0) ……………(2)
From (1) and (2) we have
f x
x1 x0 1 0
f x0
PROBLEMS
1. Using Newton – Raphson method
a) Find square root of a number
b) Find reciprocal of a number
Sol. a) Square root:
Let f x x2 N 0 , where N is the number whose square root is to be found. The
solution to f x is then x N
Here f ' x 2 x
By Newton-Raphson technique
f xi xi 2 N
xi 1 xi 1 xi
f xi 2 xi
1 N
xi 1 xi
2 xi
Using the above iteration formula the square root of any number N can be found to
anydesired accuracy. For example, we will find the square root of N 24 .
Let the initial approximation be x0 4.8
1 24 1 23.04+24 47.04
𝑥1 = 2 (4.8 + 4.8) = 2 ( 4.8
)=
9.6
= 4.9
1 24 1 24.01 24 48.01
x2 4.9 4.898
2 4.9 2 4.9 9.8
1 24 1 23.9904 24 47.9904
x3 4.898 4.898
2 4.898 2 4.898 9.796
Since x2 x3 , there fore the solution to f x x2 24 0 is 4.898 . That means,
the square root of 24 is 4.898
b) Reciprocal:
1
The reciprocal of Let f x N 0 where N is the number whose reciprocal is to be
x
found
1
The solution to f x is then = .
1
𝑁
Also, f 1 x
x2
To find the solution for f x 0 , apply Newton – Raphson method
1
( −𝑁)
𝑥𝑖
𝑥𝑖+1 = 𝑥𝑖 − −1⁄𝑥𝑖2
= 𝑥 𝑖 (2 − 𝑥 𝑖 𝑁 )
For example, the calculation of reciprocal of 22 is as follows
Assume the initial approximation be x0 0.045
x1 0.045 2 0.045 22
0.045 2 0.99
0.0454 1.01 0.0454
x2 0.0454 2 0.0454 22
0.0454 2 0.9988
0.0454 1.0012 0.04545
x3 0.04545 2 0.04545 22
0.04545 1.0001 0.04545
𝑥4 = 0.04545(2 − 0.04545 × 22)
= 0.04545(2 − 0.99998)
= 0.04545(1.00002)
= 0.0454509
∴Reciprocal of 22 is 0.04545
2. Find by Newton’s method, the real root of the equation 𝒙𝒆𝒙 = 𝒄𝒐𝒔𝒙 correct to
three decimal places.
Sol. Let 𝒄𝒐𝒔𝒙 − 𝒙𝒆𝒙 = 𝒇(𝒙)
Then f 0 1 0 , f 0.5 0.053 0 f (0.6) 0.267 0
So root of f x lies between 0.5 and 0.6
Here f(0.5) value is near to zero.
f(1) is near to zero. So we take x0 0.5 and f 1 x sin x (x 1)ex
By Newton Raphson method,we have
𝑓(𝑥𝑖 )
𝑥𝑖+1 = 𝑥𝑖 − for i=0,1,2….
𝑓1 (𝑥𝑖 )
First approximation is given by
f x0
x1 x0
f 1 x0
0.53222
0.5 0.68026
2.952507
The second approximation is given by
f x
x2 x1 1 1
f x1
0.56569
0.68026
3.946485
0.536920
Continue like above we have x3= 0.51809 x4= 0.517757
Approximate Root = 0.517
3. Find a root of an equation 𝒆𝒙 sinx = 1 using Newton Raphson method
Sol : f(x)= 𝒆𝒙 sinx -1
f(0)=-1<0
f(0.1)=-0.8<0 ….
f(0.5)=-0.209561<0
f(0.6)=0.028846>0
Since f(0.5)<0 and f(0.6)>0 the root lies in the interval(0.5,0.6)
but f(0.6) value is near to zero.
So choose x0 =0.6
and
𝑓 𝐼 (x)=(cosx +sinx)𝑒 𝑥
By applying Newton Raphson method,we have
𝑓(𝑥 )
𝑥𝑖+1 = 𝑥𝑖 − 𝑓1 (𝑥𝑖 ) for i=0,1,2…..
𝑖
f x0
First approximation x1 x0
f 1 x0
0.028846
0.6 0.58861
2.532705
f x1
The second approximation x2 x1
f 1 x1
0.000196
0.588611
2.498513
0.588533
∴ 𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒 𝑅𝑜𝑜𝑡 𝑖𝑠 0.588
4.Find a root of an equation x+𝐥𝐨𝐠 𝟏𝟎 𝒙 = 2 using Newton raphson method.
SOL:
Given 𝒇(𝒙) = 𝒙 + 𝒍𝒐𝒈𝟏𝟎 𝒙 − 𝟐
Here
f(1)=-1<0
f(2)=0.301>0
Since f(1)<0 and f(2)>0 the root lies in the interval (1,2)
Here f(2)is near to zero
So f(1.9)=0.1788>0; f(1.8)=0.0553>0
Since f(1.8) is near to zero
Choose 𝑥0 = 1.8 then
log10 𝑒
𝑓 𝐼 (𝑥 ) = 1 +
𝑥
By Newton Raphson method, we have
𝑓(𝑥 )
𝑥𝑖+1 = 𝑥𝑖 − 1 𝑖
𝑓 (𝑥 )
for i=0,1,2…..
𝑖
𝑓𝐼 (𝑥0 ) 0.0555
𝑥1 = 𝑥0 − =1.8 – 1.2412 =1.7552
𝑓(𝑥0 )
Now f(1.7552)=-0.00013 and 𝑓 𝐼 (1.7552) = 1.2473
𝑓𝐼 (𝑥1 )
𝑥2 = 𝑥1 − =1.7555
𝑓(𝑥1 )
Now f(1.7555) =-0.00000012
Hence Approximate root is 1.7555(coorect to 4 decimal places)
6.Find a real root of the equation3 x = cos x + 1 Using Newton Raphson method.
f(x) = 3 x- cos x – 1
f(0) = -2 < 0
f(1) = 1.4597 > 0
The root lies between 0 and 1.
Let x0 1
using Newton Raphson formula,we have
𝑓(𝑥𝑖 )
𝑥𝑖+1 = 𝑥𝑖 − for i=0,1,2…..
𝑓 1 (𝑥𝑖 )
f ( x 0) 2
x1 = x0 - = = 0.66666
f ( x 0) 3
ORDER OF CONVERGENCE
The deviation from the approximate root with actual root is called ERROR.
Error at nth, (n+1)th iterations are
𝑒𝑛 = 𝑥𝑛 - 𝛼 ; 𝑒𝑛+1 = 𝑥𝑛 +1 - 𝛼
If 𝒆𝒏+𝟏 ≤ 𝒌 𝒆𝒏 then the method is said to be of order ‘p’.
𝒑
NOTE:
1. The method converges very fast if ‘k’ is very very small and ‘p’ is large.
2. Regula falsi and iteration methods converge Linearly.
xi 1 f 1 xi = xi f 1 xi -f(xi)
f(xi)= f 1 xi ( xi - xi 1 )…………….(1)
Taylor’s theorem around x=xr
Is given by f(xr)=f(xi+h
(𝑥𝑟−𝑥𝑖) 2
= f(xi)+ (𝑥𝑟 − 𝑥𝑖 ) f 1 xi + 2
𝑓 𝐼𝐼 xi + ⋯ ….(2)
Neglecting higher order terms and sub (1) in (2) ,we get
(𝑥𝑟−𝑥𝑖)2
0= f 1 xi (𝑥𝑟 - xi 1 )+(𝑥𝑟 − 𝑥𝑖 ) f 1 xi + 𝑓 𝐼𝐼 xi
2
Solving
𝑓𝐼𝐼 xi 𝑓𝐼𝐼 xi
𝑒𝑖+1 =-1/2 ( 𝑓𝐼 (𝑋𝑖 )
)𝑒𝑖 2 Where p=2 and k==-1/2 ( 𝑓𝐼 (𝑋𝑖 )
)
INTERPOLATION
Introduction:
If we consider the statement y f x ; x0 x xn we understand that we can find the
is single valued and continuous and is known explicitly then the values of f x for certain
values of 𝑥 like x0 , x1 ,.........xn can be calculated. The problem now is if we are given the set
of tabular values
𝑥∶ 𝑥0 𝑥1 𝑥2 …………… 𝑥𝑛
𝑦∶ 𝑦0 𝑦1 𝑦2 ……………. 𝑦𝑛
is possible to find a simple function say 𝜙 (𝑥 ) such that f x and x agree at the set of
Extrapolation:
Let x0 , x1 xn be the values x and y0 , y1 , y2 , , yn be the values of y and y=f(x) be
a unknown function .The process to find the value of the unknown function y=f(x) when the
given value of x and the value of x lies outside the range of x0 to xn is called Extrapolation
Note: If the differences of x values are equal in the given data then it is called equal spaced
points otherwise it is called unequal spaced points
Note:
i) Suppose a given value of x is nearer to starting value of x then we use Newton’s
forward interpolation formula.
ii) Suppose a given value of x is nearer to ending value of x then we use Newton’s
backward interpolation formula.
iii) Suppose a given value of x is nearer to middle value of x then we use Gauss
interpolation formula.
iv) Suppose the given data has unequal spaced points then we use Lagrange’s
interpolation formula
Finite Differences:
Finite differences play a fundamental role in the study of differential calculus, which is an
essential part of numerical applied mathematics, the following are the finite differences.
1. Forward Differences 2. Backward Differences 3. Central Differences
y0 y1 y0
x1 y1 2 y0 y1 y0
y1 y2 y1 3 y0 2 y1 2 y0
x2 y2 2 y1 y2 y1 4 y0 3 y1 3 y0
y2 y3 y2 3 y1 2 y2 2 y1
x3 y3 2 y2 y3 y2
𝑥4 y4 ∆𝑦3 = 𝑦4 − 𝑦3
x3 y3 y4
2
y4
x4 y4
3.Central Difference Table: The central difference operator is denoted by 𝛿 and the
central Difference table is
δy7/2
x4 y4
effect of E is to shift the functional value yr to the next higher value yr 1 . A second
Generalizing E n y r yr n
Definition:-
Inverse operator E 1 is defined as E 1 yr yr 1
In general E n yn yr n
Definition :-
𝑑
The operator D is defined as 𝐷𝑦(𝑥 ) = [𝑦(𝑥 )]
𝑑𝑥
E1/2 E 1/2
iv) E E 1/2
1 1/2
2
1
Pf: we have 𝜇𝑦𝑟 = 2 (𝑦𝑟+1 + 𝑦𝑟−1 )
2 2
1 1
1
𝜇𝑦𝑟 = 2 (𝐸 𝑦𝑟 + 𝐸 −2 𝑦𝑟 )
2
1 1
1
𝜇𝑦𝑟 = 2 (𝐸 2 + 𝐸 −2 )𝑦𝑟
1 1
1
𝜇 = 2 (𝐸 2 + 𝐸 −2 )
1
v) 2 1 2
4
1 1 2
1
Pf: L.H.S = 𝜇2 = [ (𝐸 2 + 𝐸 −2 )]
2
1
= (𝐸 + 𝐸 −1 + 2)
4
1 1 2
1
= [(𝐸 2 − 𝐸 −2 ) + 4 ]
4
1
= 4 (𝛿 2 + 4)=R.H.S
1 1
vi). Prove that ∆= 𝛿 2 + 𝛿√1 + 𝛿 2
2 4
1 1
Pf: Let R.H.S= 2 𝛿 2 + 𝛿√1 + 4 𝛿 2
1 1
= 𝛿[𝛿 + 2√1 + 𝛿 2 ]
2 4
1
= 𝛿[𝛿 + √4 + 𝛿 2 ]
2
1 1 1 1
1
= 2 𝛿[(𝐸 2 − 𝐸 −2 ) + √4 + (𝐸 2 − 𝐸 −2 )2
1 1 1 1
1
= 2 𝛿[(𝐸 2 − 𝐸 −2 ) + √(𝐸 2 + 𝐸 −2 )2
1 1 1 1
1
= 𝛿 [(𝐸 2 − 𝐸 −2 ) + (𝐸 2 + 𝐸 −2 )
2
1
1
= 2 𝛿. 2. 𝐸 2
1
= 𝛿. 𝐸 2
1 1 1
= (𝐸 2 − 𝐸 −2 ). 𝐸 2
= 𝐸 − 1 = ∆ =R.H.S.
vii) Relation between the Operators D and E
h2 11 h3
Using Taylor’s series we have, y x h y x hy1 x y x y111 x
2! 3!
This can be written in symbolic form
h 2 D 2 h3 D 3
Eyx 1 hD yX ehD . yx
2! 3!
𝐸 = 𝑒 ℎ𝑑
If f x is a polynomial of degree 𝑛 and the values of 𝑥 are equally spaced then
n f x is a constant
Note:
1. As n f x is a constant, it follows that n1 f x 0, n2 f x 0,........
2. The converse of above result is also true. That is, if n f x is tabulated at equal
degree n
3. ∆2 f(x) = ∆(∆(f(x))
Problems :
1.Evaluate
i cos x
ii 2 sin px q
iii n eaxb
(iv). If the interval of difference is unity then prove that
∆[𝑥(𝑥 + 1)(𝑥 + 2)(𝑥 + 3) = 4(𝑥 + 1(𝑥 + 2)(𝑥 + 3))
Sol: Let h be the interval of differencing
i cos x cos x h cos x
h h
2sin x sin
2 2
ii sin px q sin p x h q sin px q
ph ph
2 cos px q sin
2 2
ph ph
2sin sin px q
2 2 2
ph 1
∆2 sin(px + q) = 2sin 2
∆ [sin [px + q + 2 (π + ph)]]
2
ph 1
2sin sin px q ph
2 2
(𝑖𝑖𝑖 ) ∆𝑒 𝑎𝑥+𝑏 = 𝑒 𝑎(𝑥+ℎ)+𝑏 − 𝑒 𝑎𝑥+𝑏
= 𝑒 (𝑎𝑥+𝑏) (𝑒 𝑎ℎ−1 )
∆2 𝑒 𝑎𝑥+𝑏 = ∆[∆(𝑒 𝑎𝑥+𝑏 )] = ∆[(𝑒 𝑎ℎ − 1)(𝑒 𝑎𝑥+𝑏 )]
= (𝑒 𝑎ℎ − 1)2 ∆(𝑒 𝑎𝑥+𝑏 )
= (𝑒 𝑎ℎ − 1)2 𝑒 𝑎𝑥+𝑏
From the given data we can conclude that the given function is y 3x . To find y3 ,
we have to assume that y is a polynomial function, which is not so. Thus we are not
getting y 33 27
Equally Spaced : If the differences of x values are equal in the given data then it is called
equal spaced points otherwise it is called unequal spaced points
𝑝(𝑝−1) 𝑝(𝑝−1)(𝑝−2)
𝑦 = 𝑓 (𝑥 ) = 𝑦0 + 𝑝∆𝑦0 + ∆2𝑦0 + ∆3 𝑦0 + − −
2! 3!
𝑝(𝑝−1)(𝑝−2)−−−− (𝑝−(𝑛−1))
+ ∆𝑛 𝑦0
𝑛!
𝑥−𝑥0
where 𝑝 =
ℎ
Note : this formula is used when value of 𝒙 is located near beginning of tabular values
Problems :
1.Find the melting point of the alloy containing 54% of lead, using appropriate
interpolation formula
Percentage of lead(p) 50 60 70 80
Temperature Qc 205 225 248 274
=54.45 thousands
3. Find y (1.6) using Newton’s Forward difference formula from the table
1 3.49
1.4 4.82 1.33
-0.81
1.8 5.96 1.14 -1.41
-0.60
2.2 6.5 0.54
𝑥−𝑥0 3
Let 𝑥 = 1.6 , x0=1, h=1.4 -1=0.4, 𝑝 = =2
ℎ
= 4.9656
4.Find the cubic polynomial which takes the following values
X 0 1 2 3
Y=f(x) 1 2 1 10
X y y 2 y 3 y
0 1
1
1 2 -2
-1 12
2 1 10
9
3 10
x0
P= =x ; h=1
h
Using newton’s forward interpolation formula, we get
x x ( x 1) 2 x( x 1)( x 2) 3
Y = y0 + y 0 + y0 + y0
1 1 .2 1.2.3
x ( x 1) x( x 1)( x 2)
= 1+x(1)+ (-2)+ (12)
2 6
= 2x3-7x2+6x+1
Which is the required polynomial.
To compute f(4), we take xn=3 , x=4
x xn
So that p= =1
h
Using Newton’s backward interpolation formula , we get
p ( p 1) 2 p( p 1)( p 2) 3
Y4 = y3+p y 3 + y3 + y3
1.2 1.2.3
= 10+9+10+12
= 41
Which is the same value as that obtained by substituting x=4 in the cubic polynomial 2x3-
7x2+6x+1.
x xn
Where p
h
Note : This formula is used when value of x is located near end of tabular values
Problems :
1. The population of a town in the decimal census was given below. Estimate the
population for the 1925
Year x 1891 1901 1911 1921 1931
Population in
46 66 81 93 101
thousands
x y ∇ ∇2 ∇3 ∇4
1891 46
20
1901 66 -5
15 2
1911 81 -3 -3
12 -1
1921 93 -4
8
1931 101
𝑥−𝑥𝑛 1925−1931
given ℎ = 10, 𝑥𝑛 = 1931, 𝑥 = 1925 then 𝑝 = = = −0.6
ℎ 10
By Newton’s backward interpolation formula
𝑝( 𝑝 + 1 ) 2 𝑝(𝑝 + 1) … . [𝑝 + (𝑛 − 1)] 𝑛
𝑦𝑛 (𝑥) = 𝑦𝑛 + 𝑝∇𝑦𝑛 + ∇ 𝑦𝑛 + − + ∇ 𝑦0
2! 𝑛!
(−0.6)(0.4)
∴ 𝑓 (1925) = 101 + (−0.6)(8) + (−4)
2
(−0.6)(0.4)(1.4) (−0.6)(0.4)(1.4)(2.4)
+ (−1) + (−3)
6 24
= 96.21
𝒙 20 25 30 35 40 45
𝒚 354 332 291 260 231 204
Solution: since x=42 is located near end of the tabular values therefore we use NBIF
the backward difference table is
x y ∆ ∆2 ∆3 ∆4 ∆5
20 354
-22
25 332 -19
-41 29
30 291 10 -37
-31 -8 45
35 260 2 8
-29 0
40 231 2
-27
45 204
𝑥−𝑥0
Given 𝑥 = 42 and 𝑥𝑛 = 45 , ℎ = 5 , then 𝑝 = ℎ
= −0.6
Central Difference Interpolation: The middle part of the forward difference table is
x y y 2 y 3 y 4 y 5 y
x 4 y4
y4 2 y 4
x 3 y3
y3 2 y 3 3 y 4 4 y 4 5 y 4
x 2 y2
y2 2 y 2 3 y 3 4 y 3 5 y 3
x1 y 1
y 1 2 y 1 3 y 2 4 y 2 5 y 2
x0 y0
y0 2 y0 3 y 1 4 y 1 5 y 1
x1 y1
y1 2 y1 3 y0 4 y0
x2 y2
y 2 2 y2 3 y1
x3 y3
y3
x4 y4
formula (4) can be rewritten in the notation of central differences as given below
p p 1 2 p 1 p p 1 3 y
y p [ y0 p y1/2 y0 1/2
2! 3!
p 1 p 1 p p 2 4 y ] 5
0
4!
2.Gauss’s Backward Interpolation formula: Given the set of (𝑛 + 1) values
(𝑥0 , 𝑦0 ), (𝑥1 , 𝑦1 ), − − −𝑥𝑛 , 𝑦𝑛 ) of 𝑥 and 𝑦. It is required to find a polynomial of nth degree
yn(x) such that y and yn(x) agree at the tabular points with 𝑥’s equidistant (i.e.) 𝑥i = 𝑥0+𝑖ℎ
(i = 0, 1, 2…..n) then the Gauus Backward interpolation formula is given by
𝑝 (𝑝 + 1) 2 𝑝(𝑝 + 1)(𝑝 − 1) 3
𝑦 = 𝑦0 + 𝑝∆𝑦−1 + ∆ 𝑦−1 + ∆ 𝑦−2
2! 3!
𝑝(𝑝 + 1)(𝑝 − 1)(𝑝 + 2) 4
+ ∆ 𝑦−2 + …
4!
Note: Gauss forward and Backward formulae used when 𝒙 is located middle of the
tabular values
Problems :
1.Use Gauss Forward interpolation formula to find 𝒇(𝟑. 𝟑) from the following table
𝒙 1 2 3 4 5
𝒚 = 𝒇(𝒙) 15.30 15.10 15.00 14.50 14.00
𝑥−𝑥0
Given x=3.3 , x0=3 ,h=1 hence 𝑝 = = 0.3
ℎ
p p 1 2 p 1 p p 1 3 y
y p [ y0 p y0 y1 1
2! 3!
p 1 p 1 p p 2 4 y ] 4
4!
2
(0.3)(0.3−1) (0.3)(0.09−1) (0.3)(0.09−1)(0.3−2)
=15+(0.3)(0.5)+ (−0.4) + (0.4)+ (0.9)
2 6 24
=14.9
2. Find f (2.5) using following Table
x 1 2 3 4
y 1 8 27 64
Solution: The difference table is
x y y 2y 3y
1 1
7
2 8 12
19
6
3 27 18
37
4 64
h=1
X X 0 2.5 2
P 0.5
h 1
Using Gauss Forward interpolation formula,
(0.5)(0.5) (0.5 1)(0.5)(1.5 1)
8 (0.5)19 (12) (6)
2 6
= 15.625
3. Use Gauss forward interpolation formulae to find f(3.3) from the following
x 1 2 3 4 5
y 15.30 15.10 15.00 14.50 14.00
Solution:
1 15.30
-0.20
2 15.10 0.10
-0.10 -0.50
3 15.00 -0.40 0.90
-0.50 0.40
4 14.50 0.00
-0.50
5 14.00
3.3 3
P 0.3
1
15 (0.3)(0.5)
(0.3)(0.4)(0.7)
(0.3)(0.4)
0.7 (1.3)
2 6
0.3 0.7 1.3 1.3 (0.9) 14.8604925 14.9
24
Solution:
x y ∆ ∆2 ∆3 ∆4 ∆5
1.6 4.95
1.1
0.24
1.8 6.05 0.06
1.34 -0.01
0.3
0.06
2.0 7.39 0.05
1.64
0.35
0.05
2.2 𝑥0 9.03 𝑦0 0.1
1.99
0.45
2.4 11.02
2.44
2.6 13.46
𝑥−𝑥0
here we have 𝑥 = 2.36 , 𝑥0 = 2.2 , ℎ = 0.2 , 𝑝 = = 0.8
ℎ
p p 1 2 p 1 p p 1 3 y
y p [ y0 p y0 y1 1
2! 3!
p 1 p 1 p p 2 4 y ] 4
4!
2
Substituting all above values in the formula then
𝑓(2.36) = 9.03 + (0.8)(1.99) +
(0.8)(0.8−1) (0.8+1)(0.8)(0.8−1) (0.8+1)(0.8)(0.8−1)(0.8−2)
2
(0.35)+ (0.1)+ (0.05)
6 24
=10.02
5. Find f(22) from the following table using Gauss forward formula
𝒙 20 25 30 35 40 45
𝒚 354 332 291 260 231 204
Solution : the middle part of the difference table is
x y ∆ ∆2 ∆3 ∆4 ∆5
20𝑥0 354𝑦0
-22
25 332 -19
-41 29
30 291 10 -37
-31 -8 45
35 260 2 8
-29 0
40 231 2
-27
45 204
𝑥−𝑥0
Given 𝑥 = 22 and 𝑥0 = 20 , ℎ = 5 , then 𝑝 = ℎ
= 0.4
The Gauss forward formula is
𝑦 = 𝑦0 + 𝑝∆𝑦0
= 354 + (0.4)(−22)
= 345.2
6. Find by Gauss’s Backward interpolating formula the value of y at x=1936, using the
following table.
x 1901 1911 1921 1931 1941 1951
y 12 15 20 27 39 52
x y ∆𝑦 ∆2 𝑦 ∆3 𝑦 ∆4 𝑦 ∆5 𝑦
𝑥−𝑥0
Given x=1936 and let x0 =1931 and h=10 then 𝑝 = ℎ
= 0.5
By Gauss backward interpolation formula we have
(𝑝 + 1)𝑝 2 ( 𝑝 + 1 ) 𝑝( 𝑝 − 1 ) 3
𝑦 = 𝑦0 + 𝑝∆𝑦−1 + ∆ 𝑦−1 + ∆ 𝑦−2
2! 3!
(𝑝 + 1)𝑝(𝑝 − 1)(𝑝 − 2) 4
+ ∆ 𝑦−2 + − − −
4!
0.5)(0.5+1) (0.5)(1.5)(−0.5) (0.5)(1.5)(−0.5)(−1.5)
=27+(0.5)(7)+ (5) + (3) + (−7) +
2 6 24
(0.5)(1.5)(−0.5)(−1.5)(2.5)
(−10)
120
=32.345
7. Using Gauss back ward difference formula, find y(8) from the following table
𝒙 0 5 10 15 20 25
𝒚 7 11 14 18 24 32
0 x-2 7 y-2
4
5 x-1 11 y-1 -1
3 2
10 x0 14 y0 1 -1
4 1 0
15 x1 18 y1 2 -1
6 0
20 x2 24y2 2
8
25 x3 32 y3
𝑥−𝑥0
Given x=8 and let x0 =10 and h=5 then 𝑝 = ℎ
= −0.4
By Gauss backward interpolation formula we have
(𝑝 + 1)𝑝 2 ( 𝑝 + 1 ) 𝑝( 𝑝 − 1 ) 3
𝑦 = 𝑦0 + 𝑝∆𝑦−1 + ∆ 𝑦−1 + ∆ 𝑦−2
2! 3!
(𝑝 + 1)𝑝(𝑝 − 1)(𝑝 − 2) 4
+ ∆ 𝑦−2 + −
4!
(−0.4)(−0.4+1) (−0.4)(−0.4+1)(−0.4−1)
14+(0.4)(3)+ (1 ) + (2) +
2 6
(−0.4)(−0.4+1)(−0.4−1)(−0.4−2)
24
(−1)=12.704
Note: This formula is used when values of 𝒙 are unequally spaced and equally spaced
PROBLEMS
x 0 1 2 4 5 6
f x 1 14 15 5 6 19
Solution: Given 𝑥0 = 0, 𝑥1 = 1, 𝑥2 = 2, 𝑥3 = 4, 𝑥4 = 5, 𝑥5 = 6
f x0 1, f x1 14, f x2 15, f x3 5, f x4 6, f x5 19
f x
x x1 x x2 x x3 x x4 x x5 f x
x0 x1 x0 x2 x0 x3 x0 x4 x0 x5 0
x x0 x x2 x x3 x x4 x x5 f x
x1 x0 x1 x2 x1 x3 x1 x4 x1 x5 1
x x0 x x1 x x3 x x4 x x5 f x
x2 x0 x2 x1 x2 x3 x2 x4 x2 x5 2
x x0 x x1 x x2 x x3 x x4 f x
x5 x0 x5 x1 x5 x2 x5 x3 x5 x4 5
Here x 3 then
f 3
3 1 3 2 3 4 3 5 3 6 1
0 1 0 2 0 4 0 5 0 6
3 0 3 2 3 4 3 5 3 6 14
1 0 1 2 1 4 1 5 1 6
3 0 3 1 3 4 3 5 3 6 15
2 0 2 1 2 4 2 5 2 6
3 0 3 1 3 2 3 5 3 6 5
4 0 4 1 4 2 4 5 4 6
3 0 3 1 3 2 3 4 3 6 6
5 0 5 1 5 2 5 4 5 6
3 0 3 1 3 2 3 4 3 5 19
6 0 6 1 6 2 6 4 6 5
12 18 36 36 18 12
14 15 5 6 19
240 60 48 48 60 40
0.05 4.2 11.25 3.75 1.8 0.95 10
f x3 10
2. Find f 3.5 using Lagrange method of 2nd and 3 order degree polynomials.
rd
𝒙 1 2 3 4
𝒇 ( 𝒙) 1 2 9 28
f x
x x1 x x2 x x3 f x
x0 x1 x0 x2 x0 x3 0
x x0 x x2 x x3 f x
x1 x0 x1 x2 x1 x3 1
x x0 x x1 x x3 f x
x2 x0 x2 x1 x2 x3 2
x x0 x x1 x x2 f x
x3 x0 x3 x1 x3 x2 3
f 3.5
3.5 2 3.5 3 3.5 4 1 3.5 1 3.5 3 3.5 4 2
1 2 1 31 4 2 1 2 3 2 4
(3.5 − 1)(3.5 − 2)(3.5 − 4) (3.5 − 1)(3.5 − 2)(3.5 − 3)
(9) + (28)
(3 − 1)(3 − 2)(3 − 4) (4 − 1)(4 − 2)(4 − 3)
=0.0625+(-0.625)+8.4375+8.75
=16.625
(𝑥 − 2)(𝑥 − 3)(𝑥 − 4) (𝑥 − 1)(𝑥 − 3)(𝑥 − 4)
𝑁𝑜𝑤 𝑓(𝑥 ) = (1) + (2)
−6 2
(𝑥−1)(𝑥−2)(𝑥−4) (𝑥−1)(𝑥−2)(𝑥−3)
++ (9) + (28)
(−2) 6
2
(𝑥 − 5𝑥 + 6)(𝑥 − 4) (𝑥 2 − 3𝑥 + 2)(𝑥 − 4)
= + (𝑥 2 − 4𝑥 + 3)(𝑥 − 4) + (9)
−6 −2
(𝑥 2 − 3𝑥 + 2)(𝑥 − 3)
+ (28)
6
𝑥 3 − 9𝑥 2 + 26𝑥 − 24 𝑥 3 − 7𝑥 2 + 14𝑥 − 8
= + 𝑥 3 − 8𝑥 2 + 19𝑥 − 12 + (9)
−6 −2
𝑥 3 − 6𝑥 2 + 11𝑥 − 6
+ (28)
6
x3 9 x 2 26 x 24 6 x3 48 x 2 114 x 72 27 x3 189 x 2 378 x 216 308 x 28 x3 168 x 2 168
6
6 x 18 x 18 x
3 2
f x x 3 3x 2 3x
6
f 3.5 3.5 3 3.5 3 3.5 16.625
3 2
x 0 2 3 6
Y=f(x) -4 2 14 158
Soluiotn:
f x
x x2 x x3 x x4 y x x1 x x3 x x4
x1 x2 x1 x3 x1 x4 1 x2 x1 x2 x3 x2 x4
Y2
x x1 x x2 x x4 y x x1 x x2 x x3 Y
x3 x1 x3 x2 x3 x4 3 x4 x1 x4 x2 x4 x3 4
Where x 4, x1 0, x2 2, x3 3, x4 6
4 2 4 3 4 6 4
2 3 6
4 1 2 2 4 2 2 14
2 1 4 3 1 3 3
4 2 1
158
6 4 3
4 224 158 4 18 224 158
2
9 9 9 9
40
Solution:
Since data is unequispaced, we use Lagrange’s interpolation
( x x1 )( x x2 )(x x3 ) ( x x0 )( x x2 )(x x3 )
y y0 y1
( x0 x1 )( x0 x2 )(x 0 x 3 ) ( x1 x0 )( x1 x2 )(x1 x3 )
( x x0 )( x x1 )(x x3 ) ( x x0 )( x x1 )(x x2 )
y2 y3
( x2 x0 )( x2 x1 )(x 2 x3 ) ( x3 x0 )( x3 x1 )(x 3 x2 )
=0.8947 ∴ 𝐼 = 0.8947
5. Find the parabola passing through points (0,1), (1,3) and(3,55) using Lagrange’s
Interpolation Formula.
x 0 1 3
y 1 3 55
Solution: Given Lagrange’s interpolation formula is
( x x1 )( x x2 ) ( x x0 )( x x2 )
y y0 y1
( x0 x1 )( x0 x2 ) ( x1 x0 )( x1 x2 )
( x x0 )( x x1 )
y2
( x2 x0 )( x2 x1 )
( x 1)( x 3) ( x 0)( x 3)
y (3)
(0 1)(0 3) (1 0)(1 3)
( x 0)( x 1)
(55)
(3 0)(3 1)
1
=6 [48𝑥 2 − 36𝑥 + 6]
=8𝑥 2 − 6𝑥 + 1
6. A Curve passes through the points (0,18),(1,10),(3,-18) and (6,90). Find the slope of
the curve at 𝒙 = 𝟐.
x 0 1 3 6
y 18 10 -18 90
Solution: Given data is