0% found this document useful (0 votes)
75 views

Unit 4 - Interpolation, Numerical Differentiatio-Updated

Uploaded by

yeswanth3604
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views

Unit 4 - Interpolation, Numerical Differentiatio-Updated

Uploaded by

yeswanth3604
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

SATHYABAMA

Unit IV
DEPARTMENT OF MATHEMATICS
INTERPOLATION, NUMERICAL DIFFERENTIATION &INTEGRATION
COURSE NAME: ENGINEERING MATHEMATICS IV COURSE CODE: SMT1204

UNIT IV

Interpolation

The process of computing intermediate values of for a function from a given


set of values of a function

Gregory-Newton’s forward interpolation formula

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

Gregory-Newton’s backward interpolation formula

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
hn1 y ( n1) (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
hn1 y ( n1) (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

(vi) Error in Newton’s backward interpolation is


hn1 y ( n1) (c)
Error  v(v  1)(v  2)  (v  n): x0  x  xn , x0  c  xn    (e)
(n  1)!

Problem1: Estimate at from the following table .also find

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

80 276  y4 yn  yn1  20.18  yn 2  2 yn

90 304  yn

Case (i): to find the value of at

Since is nearer to we apply Newton’s forward 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)    (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

Case (ii): to find the value of at

Since is nearer to we apply Newton’s backward Interpolation

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

To find polynomial , from (1) we get

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

Substituting (4) in (3), we get


20 1 2 1 1 1 2
y( x)  184  ( x  40)  ( x  40) ( x  50)  0  184  2 x  80  ( x  90 x  2000)
1 10 2 10 10 100
1 2
 y ( x)  ( x  110 x  12400)          (5)
100

To Estimate at , put in (5), we get

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

Weight(lbs) 0-40 40-60 60-80 80-100 100-120


No.Students 250 120 100 70 50
SATHYABAMA
INSTITUTE OF SCIENCE AND TECHNOLOGY
DEPARTMENT OF MATHEMATICS
COURSE MATERIAL
COURSE NAME: ENGINEERING MATHEMATICS IV COURSE CODE: SMT1204

Solution: let -Weight less than 40 lbs, -Number of Students,


Here all the intervals are equal with h=x1-x0=20 we apply Newton
interpolation

Difference Table:

40 250  y0 y1  y0  120  y0


60 370  y1 y2  y1  100  y1 20   2 y0 10  3 y0

80 470  y2 y3  y2  70  y2 30   2 y1 10  2 yn 20   4 y0  4 yn

100 540  y3 yn  yn1  50  yn 20   2 yn

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 (

Since is nearer to we apply Newton’s forward 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)      (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

The number of students whose weight less than 70 lbs ( =424

= 424-370 = 54
SATHYABAMA
INSTITUTE OF SCIENCE AND TECHNOLOGY
DEPARTMENT OF MATHEMATICS
COURSE MATERIAL
COURSE NAME: ENGINEERING MATHEMATICS IV COURSE CODE: SMT1204

Lagrange’s interpolation formula Unequal intervals

( 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  xn1 )
 y2      yn
( x2  x0 )( x2  x1 )  ( x2  xn ) ( xn  x0 )( xn  x1 )  ( xn  xn1 )

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.

Hence by Lagrange’s interpolation for unequal intervals

( 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  xn1 )
 y2  yn
( x2  x0 )( x2  x1 )( x2  xn ) ( xn  x0 )( xn  x1 )( xn  xn1 )

( x  0)( x  2)( x  3) ( x  1)( x  2)( x  3)


y ( x)  (8)  (3)
(1  0)(1  2)(1  3) (0  1)(0  2)(0  3)
( x  1)( x  0)( x  3) ( x  1)( x  0)( x  2)
 (1)  (12)    (1)
(2  1)(2  0)(2  3) (3  1)(3  0)(3  2)

To compute put in (1), we get

(1  0)(1  2)(1  3) (1  1)(1  2)(1  3)


y( x  1)  (8)  (3)
(1  0)(1  2)(1  3) (0  1)(0  2)(0  3)
(1  1)(1  0)(1  3) (1  1)(1  0)(1  2)
 (1)  (12)
(2  1)(2  0)(2  3) (3  1)(3  0)(3  2)
 y( x  1)  2
SATHYABAMA
INSTITUTE OF SCIENCE AND TECHNOLOGY
DEPARTMENT OF MATHEMATICS
COURSE MATERIAL
COURSE NAME: ENGINEERING MATHEMATICS IV COURSE CODE: SMT1204

To find polynomial , from (1) we get


2 1
y( x)  ( x3  5x 2  6 x)  ( x3  4 x 2  x  6)
3 2
1 1
 ( x3  2 x 2  3x)  ( x3  x 2  2 x)    (1)
6 1
2 1 1 10 4 2 12 1 3 6
y( x)  x3 (    1)  x 2 (    1)  x (    2)  ( )
3 2 6 3 2 6 3 2 6 2
 y( x)  2 x  6 x  3x  3      (2)
3 2

To compute put in (2), we get y ( x  1)  2  6  3  3  2

Inverse interpolation

For a given set of values of and , the process of finding given


is called 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  yn1 )
 x2      xn
( y2  y0 )( y2  y1 )  ( y2  yn ) ( yn  y0 )( yn  y1 )  ( yn  yn1 )

Problem 4: Estimate the value of given from the following data,


, , ,

Solution: given

x0  3 x1  5 x2  7 x3  9 xn  11

y0  6 y1  24 y2  58 y3  108 yn  174

By applying Lagrange’s inverse interpolation


SATHYABAMA
INSTITUTE OF SCIENCE AND TECHNOLOGY
DEPARTMENT OF MATHEMATICS
COURSE MATERIAL
COURSE NAME: ENGINEERING MATHEMATICS IV COURSE CODE: SMT1204

( 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  yn1 )
 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

Newton’s forward formula for Derivatives

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

Newton’s backward formula for Derivatives

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

year 1931 1941 1951 1961 1971


Population 40.62 60.80 79.95 103.56 132.65
Solution: Here all the intervals are equal with h=x1-x0=10 we apply Newton interpolation

Difference Table: let -year, -Population


Numerical Differentiation and Integration

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.

Definition (Numerical differentiation):


Numerical differentiation is the process by which we can find the derivative or
derivatives of a function at some values of the independent variable when we are given a set of
values of that function.
Uses of Numerical differentiation:
The numerical differentiation techniques can be used in the following situations:
1. The function values corresponding to distinct values of the argument are known but the
function is unknown. For example, we may knowing the values of 𝑓(𝑥) at various values of 𝑥,
say 𝑥𝑖 , 𝑖 = 1,2,3, . .. 𝑛 in a tabulated form.
2. The function to be differentiated is complicated, and so, it is difficult to differentiate by usual
procedures.
3. Numerical Integration
The error in Simpson’s rule is of the order ℎ4 and the error in Trapezoidal’s rule is of the
order ℎ2 .
Practice Problems

You might also like