You are on page 1of 6

VARDHAMAN COLLEGE OF ENGINEERING, HYDERABAD

An Autonomous Institute Affiliated to JNTUH

A6002 – NUMERICAL METHODS AND CALCULUS


Handout # 2
Interpolation
Introduction: If given values of y f ( x) for a set of values of x :

x x0 x1 x2 …….. xn
y y0 y1 y2 …….. yn
Then the process of finding the values of y corresponding to any values of x xi between x0 and xn is
called interpolation. Thus interpolation is the technique of estimating the value of a function for any
intermediate value of the independent variable, while the process of computing the value of the function
outside the given range is called extrapolation.

Finite Differences:
The interpolation depends on finite difference concept. Suppose the function y f ( x) is tabulated for the

equally spaced values x x0 , x0 h, x0 2 h,...., x0 nh giving y y0 , y1 , y2 ,.... yn , then y1 y0 ,

y2 y1 ,...., yn yn 1 is called a finite difference. To determine the values of f ( x) or f '( x) for some

intermediate values of x , the following three types of differences are useful:


1. Forward Differences
2. Backward Differences
3. Central Differences

Forward Differences: The differences y1 y0 , y2 y1 ,...., yn yn 1 respectively are called the

first forward differences where is the forward difference operator. Thus the first forward
differences are y0 y1 y0 , y1 y2 y1 ,...., yn 1 yn yn 1 .

ie., yr yr 1 yr
2
Similarly, the second forward differences are defined by yr yr 1 yr .
n n 1 n 1
In general, yr yr 1 yr defines the nth forward differences.

In a difference table, x is called the argument and y the function or the entry y0 , the first entry is
2 3
called the leading term and y0 , y0 , y0 etc. are called the leading differences.

Dept. of Freshman Engineering Page 1 of 6


Forward Difference Table
First Forward Second Forward Third Forward Fourth Forward
x y f ( x)
difference difference difference difference

x0 y0
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 2
y1 y2 y1
x3 y3 2
y2 y3 y2
y3 y4 y3
x4 y4
Note: If h is the common difference in the values of x and y f ( x) be the given function then
f ( x) f ( x h) f ( x) .
Backward Differences: The differences y1 y0 , y2 y1 ,...., yn yn 1 respectively are called the

first backward differences where is the backward difference operator. Thus the first backward
differences are y0 y1 y0 , y1 y2 y1 ,...., yn 1 yn yn 1 .

ie., yr yr yr 1

2
Similarly, the second backward differences are defined by yr yr yr 1 .
n n 1 n 1
In general, yr yr yr 1 defines the nth backward differences.
Backward Difference Table
First Backward Second Backward Third Backward Fourth Backward
x y f ( x)
difference difference difference difference

x0 y0
y1 y1 y0
x1 y1 2
y2 y2 y1
y2 y2 y1 3
y3 2
y3 2
y2

x2 y2 2
y3 y3 y2
4
y4 3
y4 3
y3

y3 y3 y2 2
y4 y4 y3
x3 y3 2
y4 y4 y3
y4 y4 y3
x4 y4
Note: If h is the common difference in the values of x and y f ( x) be the given function then
f ( x) f ( x) f ( x h) .
Note: y0 y1 y0 y1 y1/2 , where is central difference operator.
Dept. of Freshman Engineering Page 2 of 6
Symbolic Relations and Separation of Symbols:
Average operator: The average operator is defined by the equation
1
yx 2 yx h yx h
2 2

If h is the common difference in the values of x and y f ( x) be the given function then

f x h f x h
2 2
average operator is defined as f ( x) 2

Shift operator: The shift operator E is defined by the equation Ey x yx h

n
Similarly E yx yx nh

If h is the common difference in the values of x and y f ( x) be the given function then
shift operator E is defined as Ef ( x) f ( x h)

Inverse operator: The inverse operator E 1 is defined by the equation E 1 yx yx h

n
Similarly E yx yx nh

Relation between the operators:


1 1 1
(i) E 1 (ii ) 1 E (iii) E 2
E 2

1 1 1
(iv) 1
2 E 2
E 2
(v) E E E 2
(vi ) E e hD

Proofs: (i ) y x yx h yx Ey x yx ( E 1) y x . E 1 or E 1
1 1
(ii) yx yx yx h yx E 1 yx (1 E 1 ) yx . 1 E or E 1
1 1 1 1
(iii) yx yx h
2
yx h
2
E 2 yx E 2
yx E 2
E 2
yx
1 1
E 2
E 2

1 1 1 1
1 1 1
(iv) yx 2 yx h
2
yx h
2 2 E 2 yx E 2
yx 2 E 2
E 2
yx
1 1
1
2 E 2
E 2

(v ) E y x E yx yx h Eyx Eyx h yx h yx yx . E

Ey x yx h yx h yx yx . E
1 1
E 2 yx yx h
2
yx h
2
h
2
yx h
2
h
2
yx h yx yx . E 2

h2
(vi ) Ef ( x) f ( x h) f ( x) hf '( x) f ''( x) ..... (By Taylor’s Series)
2!

h2 2 h2 2
f ( x) hDf ( x) D f ( x) ..... 1 hD D ..... f ( x) e hD f ( x)
2! 2!

E ehD

Dept. of Freshman Engineering Page 3 of 6


Example.2.1.1. Evaluate (i ) tan 1 x (ii ) e x log 2 x

Solution. We know that f ( x) f ( x h) f ( x)

(i ) tan 1 x tan 1 ( x h) tan 1 x tan 1 x h x tan 1 h


1 ( x h) x 1 x2 hx

(ii ) e x log 2 x e x h log 2( x h) e x log 2 x

e x h log 2( x h) e x h log 2 x e x h log 2 x e x log 2 x

e x h log x x h ex h
e x log 2 x e x eh log 1 h
x eh 1 log 2 x

Example.2.1.2. Prove with the usual notations that, hD log(1 ) log(1 ) sinh 1 ( )

Solution. We know that e hD E 1 . hD=log(1 )

Also hD= log E log( E 1 ) log(1 )


1 1 1 1
1
2 E 2
E 2
and E 2
E 2

1 1 1 1 1
1
2 E 2
E 2
E 2
E 2 1
2 E E 1
2 ehD e hD
sinh(hD)

Then hD sinh 1 ( )

Differences of a Polynomial: The nth differences of a polynomial of the nth degree are
constant and all higher order differences are zero.
Note: Let the polynomial of nth degree in x ,be ax n bx n 1
cx n 2
........ l
n
Then ( xn ) an !h n , where h is the interval of differencing and
n 1
( xn ) n 2
( xn ) n 3
( x n ) .... 0
2
Example.2.1.3. Evaluate (ab x ) interval of difference being unity

Solution. (ab x ) a (b x ) a (b x 1
bx ) ab x (b 1)
2
(ab x ) (ab x ) a(b 1) b x a(b 1)(b x 1
bx ) a(b 1) 2 b x

Example.2.1.4. Evaluate x( x 1)( x 2) interval of difference being unity

Solution. Let f ( x) x( x 1)( x 2)


We have f ( x) f ( x 1) f ( x) ( h 1)

x( x 1)( x 2) ( x 1)( x 2)( x 3) x( x 1)( x 2)

( x 1)( x 2)( x 3 x) 3( x 1)( x 2)


4
Example.2.1.5. Given y0 1, y1 14, y2 15, y3 5, y4 6. Evaluate y0 .
4
Solution. y0 ( E 1)4 y0 E 1

E 4 4 E 3 6 E 2 4 E 1 y0 E 4 y0 4 E 3 y0 6 E 2 y0 4 Ey0 y0
Dept. of Freshman Engineering Page 4 of 6
y4 4 y3 6 y2 4 y1 y0 E r yn yn r ; r 1, 2,3...

6 4(5) 6(15) 4(14) 1 21


Note: If the missing data is given for n tabular points, it can be interpolated with a polynomial
of degree (n 1) .
Example.2.1.6. Find the missing term in the following data
x 2 3 4 5 6
y 45.0 49.2 54.1 -- 67.4
Solution. Let ‘a’ be the missing term.
The difference table is given below
x y f ( x) y 2
y 3
y 4
y
2 45.0 y0
4.2 y0
2
3 49.2 0.7 y0
3
4.9 a-59.7 y0
4
4 54.1 a-59 240.2-4a y0
a-54.1 180.5-3a
5 a 121.5-2a
67.4-a
6 67.4

4
Consider y f ( x) as a polynomial of degree 3, so that fourth differences is zero i.e., y 0
4
y 0 240.2 4a 0 a 60.05
Exercise 2
2
1. Prove that (i)(1 )(1 ) 1 (ii) (iii)

2. Prove with the usual notations that,


1
(ii ) 1 2
1 2
/4 (iii) 3
y2 3
y5
(i) E 2
2 2

3. Evaluate (i ) 2
cos 2 x (ii) tan 1 n 1
n

4. Evaluate (i ) 2 5 x 12 (ii ) n x
e (iii) 2x interval of difference being unity
x2 5 x 16 x!

6
5. Evaluate (i) 1 x 1 2 x 2 1 3x3 (ii) 10
1 ax 1 bx 2 1 cx3 1 dx 4

6. If y x is a polynomial for which fifth difference is constant and y1 y7 784, y2 y6 686,

y3 y5 1088 . Find y4 .

7. Find the missing terms in the following data

Dept. of Freshman Engineering Page 5 of 6


x 0 5 10 15 20 25
y 6 10 -- 17 -- 31

8. Find the missing terms in the following data


x 45 50 55 60 65
y 3.0 -- 2.0 -- -2.4

Answers
3. (i ) 4sin 2 h cos(2 x 2h) (ii ) tan 1 1
2 n2
2(5 x 16)
4. (i ) ( x 2)( x 3)( x 4)( x 5) (ii )(e 1) n e x (iii)2 x 1
1
x
x

5. (i ) 4320 (ii)abcd10!
6. 571 7. 13.25, 22.5 8. 2.925, 0.225

Dept. of Freshman Engineering Page 6 of 6

You might also like