Unit 4 - Interpolation, Numerical Differentiatio-Updated
Unit 4 - Interpolation, Numerical Differentiatio-Updated
Unit IV
DEPARTMENT OF MATHEMATICS
INTERPOLATION, NUMERICAL DIFFERENTIATION &INTEGRATION
COURSE NAME: ENGINEERING MATHEMATICS IV COURSE CODE: SMT1204
UNIT IV
Interpolation
y0 2 y0 3 y0 4 y0
y( x) y0 u u (u 1) u (u 1)(u 2) u (u 1)(u 2)(u 3) (a)
1 2 6 24
1
where u ( x x0 )
h
yn 2 yn 3 yn 4 yn
y( x) yn v v(v 1) v(v 1)(v 2) v(v 1)(v 2)(v 3) (b)
1 2 6 24
1
where v ( x xn )
h
Remark:
(i) The process of finding the values of outside the interval is called
extrapolation
(ii) The interpolating polynomial is a function through the data points
i=0,12,..n
(iii) Gregory-Newton’s forward interpolation formula (a) can be applicable if the
interval difference is constant and used to interpolate the value of nearer
to beginning value of the data set
(iv) If is the exact curve and is the interpolating polynomial then
the Error in polynomial interpolation is given by
hn1 y ( n1) (c)
Error ( x x0 )( x x1 ) ( x xn ): x0 x xn , x0 c xn (c)
(n 1)!
(v) Error in Newton’s forward interpolation is
hn1 y ( n1) (c)
Error u(u 1)(u 2) (u n): x0 x xn , x0 c xn (d )
(n 1)!
SATHYABAMA
INSTITUTE OF SCIENCE AND TECHNOLOGY
DEPARTMENT OF MATHEMATICS
COURSE MATERIAL
COURSE NAME: ENGINEERING MATHEMATICS IV COURSE CODE: SMT1204
40 50 60 70 80 90
184 204 226 250 276 304
Solution: Here all the intervals are equal with h=x1-x0=10 we apply Newton interpolation
Difference Table:
40 184 y0 y1 y0 20 y0
50 204 y1 y2 y1 22 y1 2 2 y0 0 3 y0
60 226 y2 y3 y2 24 y2 2 2 y1 0 3 y1 0 4 y0 0 5 yn
70 250 y3 y4 y3 26 y3 2 2 y2 0 3 yn 0 4 yn
90 304 yn
y0 2 y0 3 y0 4 y0
y( x) y0 u u (u 1) u (u 1)(u 2) u(u 1)(u 2)(u 3) (1)
1 2 6 24
1 1 3
where u ( x x0 ) (43 40) 0.3 u 1 0.7, u 2 1.7, u 3 2.7 (2)
h 10 10
20 3 2 3 7 18979
Substituting (2) in (1), we get y( x 43) 184 ( ) ( )( ) 0 189.79
1 10 2 10 10 10
SATHYABAMA
INSTITUTE OF SCIENCE AND TECHNOLOGY
DEPARTMENT OF MATHEMATICS
COURSE MATERIAL
COURSE NAME: ENGINEERING MATHEMATICS IV COURSE CODE: SMT1204
yn 2 yn 3 yn 4 yn
y( x) yn v v(v 1) v(v 1)(v 2) v(v 1)(v 2)(v 3) (3)
1 2 6 24
1 1 6 4 14 24
where v ( x xn ) (84 90) v 1 , v 2 , v 3 (4)
h 10 10 10 10 10
28 6 2 6 4 7174
Substituting (4) in (3), we get y( x 84) 304 ( ) ( )( ) 0 286.96
1 10 2 10 10 25
y0 2 y0 3 y0 4 y0
y( x) y0 u u (u 1) u (u 1)(u 2) u (u 1)(u 2)(u 3) (1)
1 2 6 24
1 1 1 1 1
where u ( x x0 ) ( x 40) u 1 ( x 50), u 2 ( x 60), u 3 ( x 60) (2)1
h 10 10 10 10
1 1
y(43) (18979) 189.79 and y(84) (28696) 286.96
100 100
Problem2: Estimate the number of students whose weight is between 60 lbs and 70 lbs from
the following data
Difference Table:
120 590 yn
Case (i): to find the number of students whose weight less than 60 lbs (
From the difference table the number of students whose weight less than 60 lbs (
Case (ii): to find the number of students whose weight less than 70 lbs (
y0 2 y0 3 y0 4 y0
y( x) y0 u u (u 1) u (u 1)(u 2) u (u 1)(u 2)(u 3) (1)
1 2 6 24
1 1 3 3 2 1 3
where u ( x x0 ) (70 40) u 1 , u 2 , u 2 , u 3 (2)
h 20 2 2 2 2 2
Substituting (2) in (1), we get
120 3 20 3 1 10 3 1 1 20 3 1 1 3
y ( x 70) 250 ( ) ( )( ) ( )( )( ) ( )( )( )( ) 423.59
1 2 2 2 2 6 2 2 2 24 2 2 2 2
= 424-370 = 54
SATHYABAMA
INSTITUTE OF SCIENCE AND TECHNOLOGY
DEPARTMENT OF MATHEMATICS
COURSE MATERIAL
COURSE NAME: ENGINEERING MATHEMATICS IV COURSE CODE: SMT1204
( x x1 )( x x2 ) ( x xn ) ( x x0 )( x x2 ) ( x xn )
y ( x) y0 y1
( x0 x1 )( x0 x2 ) ( x0 xn ) ( x1 x0 )( x1 x2 ) ( x1 xn )
( x x0 )( x x1 ) ( x xn ) ( x x0 )( x x1 ) ( x xn1 )
y2 yn
( x2 x0 )( x2 x1 ) ( x2 xn ) ( xn x0 )( xn x1 ) ( xn xn1 )
Problem 3: Determine the value of from the following data using Lagrange’s
Interpolation
-1 0 2 3
-8 3 1 12
Solution: given
x0 1 x1 0 x2 3 xn 3
y0 8 y1 3 y2 1 yn 12
Since the intervals ere not uniform we cannot apply Newton’s interpolation.
( x x1 )( x x2 )( x xn ) ( x x0 )( x x2 )( x xn )
y ( x) y0 y1
( x0 x1 )( x0 x2 )( x0 xn ) ( x1 x0 )( x1 x2 )( x1 xn )
( x x0 )( x x1 )( x xn ) ( x x0 )( x x1 )( x xn1 )
y2 yn
( x2 x0 )( x2 x1 )( x2 xn ) ( xn x0 )( xn x1 )( xn xn1 )
Inverse interpolation
( y y1 )( y y2 ) ( y yn ) ( y y0 )( y y2 ) ( y yn )
x( y ) x0 x1
( y0 y1 )( y0 y2 ) ( y0 yn ) ( y1 y0 )( y1 y2 ) ( y1 yn )
( y y0 )( y y1 ) ( y yn ) ( y y0 )( y y1 ) ( y yn1 )
x2 xn
( y2 y0 )( y2 y1 ) ( y2 yn ) ( yn y0 )( yn y1 ) ( yn yn1 )
Solution: given
x0 3 x1 5 x2 7 x3 9 xn 11
y0 6 y1 24 y2 58 y3 108 yn 174
( y y1 )( y y2 )( y y3 )( y yn ) ( y y0 )( y y2 )( y y3 )( y yn )
x( y ) x0 x1
( y0 x1 )( y0 y2 )( y0 y3 )( y0 yn ) ( y1 y0 )( y1 y2 )( y1 y3 )( y1 yn )
( y y0 )( y y1 )( y y3 )( y yn ) ( y y0 )( y y1 )( y y2 )( y yn )
x2 x3
( y2 y0 )( y2 y1 )( y2 y3 )( y2 yn ) ( y3 y0 )( y3 y1 )( y3 y2 )( y3 yn )
( y y0 )( y y1 )( y y2 )( y yn1 )
xn
( yn y0 )( yn y1 )( yn y2 )( yn yn 1 )
(100 24)(100 58)(100 108)(100 174) (100 6)(100 58)(100 108)(100 174)
x(100) (3) (5)
(6 24)(6 58)(6 108)(6 174) (24 6)(24 58)(24 108)(24 174)
(100 6)(100 24)(100 108)(100 174) (100 6)(100 24)(100 58)(100 174)
(7) (9)
(58 6)(58 24)(58 108)(58 174) (108 6)(108 24)(108 58)(108 174)
(100 6)(100 24)(100 58)(100 108)
(11)
(174 6)(174 24)(174 58)(174 108)
x(100) 0.35344 1.51547 2.88703 7.06759 0.13686 8.65573
dy 1 2 y0 3 y0 4 y0
y ' ( x) y0 (2u 1) (3u 2 6u 2) (4u 3 18u 2 22u 6)
dx h 2 6 24
d2y 1 2 3 y0 4 y0 1
y ( x) 2 2 y0
''
(u 1) (12u 2 36u 22) where u ( x x0 )
dx h 1 24 h
dy 1 2 yn 3 yn 4 yn
y ' ( x) yn (2v 1) (3v 2 6v 2) (4v3 18v 2 22v 6)
dx h 2 6 24
d2y 1 3 yn 4 yn 1
y '' ( x) 2 2 2 yn (v 1) (12v 2 36v 22) where v ( x xn )
dx h 1 24 h
Problem 5: Find the rate of growth of population in the year 1941&1961 from the following
table
Introduction
Engineers and scientists are frequently faced with the problem of differentiation or
Integration of some functions. If the functions have a closed form representation and are
amenable for standard calculus methods, then differentiation and integration can be carried out.
However, in many situations, we may not know the exact functions. We will be knowing only,
the values of the functions at a discrete set of points. In some instances, the functions are known
but they are so complicated that analytic differentiation, integration is difficult. In both these
situations, we seek the help of numerical techniques to obtain the estimates of derivatives or
integrals. The method of obtaining the derivative of a function using a numerical technique is
known as numerical differentiation.
𝑏
The method of finding the value of an integral of the form ∫𝑎 𝑓(𝑥)𝑑𝑥 using numerical
techniques is called “Numerical Integration”. In this unit, we discuss various numerical
differentiation and numerical integration methods. We have to understand that while analytical
methods give exact answers, the numerical techniques provide only approximate answers.