Interpolation
Interpolation
Interpolation is an art of reading between lines. When we conduct experiments, in our Engineering labs, we always collect datas relating two or more parameters. Let us say, somebody collected datas relating two parameters, one is independent ( x ) and another one is dependent of ( y ) . Let them be
x : y( x ) :
x1 y1
x2 y2
x3 y3
xi yi
.. ..
xn yn
x = xp ,
say
and
xi + 1
i.e.
x p ( xi , xi +1 )
y( x ) ,
we can is not
y( x )
x and
y( x ) ,
at
x = xp .
is called interpolation
Example:
y( x) A( x 0 , y 0 )
f ( x)
B( x1 , y1 ) Q
( x)
yn yp
y0
x0
xp
xn
f ( x)
Let PQ be the actual functional curve, [actually this curve is hidden curve.)
relating x and
y( x ) .
Choose two points from the given data say ( x0 , y 0 ) and ( x n , y n ) . Construct are straight line with these 2 points. Let AB represents that straight line. This line AB is our replacing function, ( x ) . Now estimate
yp
(approximately) at
x = xp ,
f ( x ) ).
These replacing function, ( x ) can be polynomials, trigonometric function, etc,. Thus the corresponding interpolation are called polynomial interpolation and trigonometric interpolation.
Suppose the data is provided in the range ( x0 , x n ) (i.e) x0 xi x n for
i =1,2 ,3,..., n
yp
corresponding to
x = x j ( x0 , x n )
is called interpolation.
yj
corresponding to
Before learning interpolating methods let us first learn finite difference basic concepts.
Difference between successive member of dependent variables Always subtract the proceeding value from the current. Second forward differences:
2 y o = y1 y 0 2 y1 = y 2 y1 2 y i = y i +1 y i i = 0 ,1,2 ,...
3 2 2 yi = y i +1 yi
r +1 y i = r y i +1 r y i
y1 = y1 y 0 y 2 = y 2 y1 y3 = y3 y 2 y i = y i y i 1
i =1,2,3,...
2 yi = y i y i 1
i =1,2,3,...
In general
r +1 y i = r y i r y i 1
for
i = r +1, r 2 + 2,...
Interpolating methods 1. For equally spaced xi ' s (Equal intervals) 2. For unequally spaced xi ' s (Unequal intervals)
Interpolating methods [For equal intervals] 1. Newtons forward interpolation formula 2. Newtons backward interpolation formula The numerical scheme for forward interpolation formula is
y p = y0 +
Where
py 0 p( p 1) 2 p( p 1)( p 2 ) 3 + y0 + y 0 + ... 1! 2! 3! x x 0 = ph
x x0 p= h
x xn p= h
Interpolating formula for unequal intervals a) Lagrange interpolation formula b) Divided difference interpolation formula The Lagranges interpolating polynomial is given by
y( x ) =
( x x1 ) ( x x2 ) ( x xn ) .y + ( x0 x1 ) ( x0 x2 ) ( x0 xn ) 0 ( x x0 ) ( x x 2 ) ( x x n ) .y + ( x1 x0 ) ( x1 x2 ) ( x1 xn ) 1 ( x x0 ) ( x x1 ) ( x xn 1 ) + ( x n x0 ) ( xn x1 ) ( xn x n1 )
yn
f ( x1 , x 2 ) f ( x 0 , x1 ) = f ( x 0 , x1 , x 2 ) x 2 x0
Assignments 1. The table gives the distance in nautical miles of the visible horizon for the given heights in feet above the earths surface: x = height : 100 150 200 250 300 350 400 y = distanc : 10.63 13.03 15.04 16.81 18.42 19.90 21.27 e (ii ) x = 380 . Find the values of y when (i ) x = 218 ft
2. Given sin 45 = 0.7071, sin 50 = 0.7660 , sin 55 = 0.8192 , sin 60 = 0.8660
find
sin 52 .
3. The area A of a circle of diameter d is given for the following values: d : 80 85 90 95 100 A : 5026 5674 6362 7088 7854 4. Given the values x : 5 7 11 13 17 f ( x) : 150 392 1452 2366 5202 Find f (9 ) using (i) Lagranges formula, (ii) Newtons divided difference formula 5. Given . Find the value of
log 10 656
log 10 654 = 2.8156 , log10 658 = 2.8182 , log10 659 = 2.8189 , log 10 661 = 2.8202
using Lagranges.
find the interpolating polynomial for the above data using Newtons divided difference scheme and hence find f ( 7 ) .
temperature. Use Lagranges formula to find viscosity of the oil at a temperature 140 . Temp : 110 130 160 190 Viscosity : 10.8 8.1 5.5 4.8