You are on page 1of 23

INTERPOLATIO N

Definition : Interpolation means to find approximate values of a function f(x) for any x between different xvalues x , x ., x at which the values of f(x) are given. Given these values from experiments : F = f(x ), f = f(x ),., f =
0 1 n 0 0 1 1 n

A standard idea in interpolation now is to find a polynomial p (x) of degree n (or less) that assumes the given values; thus P (x )= f , p (x )=f ......., p (x )=f We call this p an
n n 0 0 n 1 1 n n n n

We use p to get (approximate) values of f for xs between x and x interpolation or sometimes outside that interval extrapolation
n 0 n

Lagrange Interpolation Given that n is a nonnegative integer, let P denote the set of all (real valued) polynomials of degree n defined over the set R of real numbers. The simplest interpolation problem can be stated as follows:
.

given x and y in R, find a polynomial p P such that p (x ) = y . The solution to this is, trivially, p (x) y . Linear interpolation is interpolation by the straight line through (x ,f ), (x ,f ) . Thus by that idea,
0 0 0 0 0 0 0 0 0 0 0 1 1

The linear Lagrange polynomial p is a sum


1

p =L f +L f with L the linear


1 0 0 1 1 0 1

polynomial that is 1 at x and 0 at x ; similarly, L is 0 at x and 1 at x obviously,


0 1 0 1

L (x)=
0

L (x)=
1

This gives the Linear Lagrange polynomial

P (x)=L (x)f +L (x)f


1 0 0 1

Example 1: Compute In 9.2 from In9.0=2.1972, In 9.5=2.2513 by linear Lagrange interpolation and determine the error from In 9.2= 2.2192. (4D)

Solution: x0= 9.0, x = 9.5, f = In 9.5 L0(9.2)= 9.2-9.5 = 0.6 9.0-9.5 L1 (9.2)=9.2-9.0 = 0.4 9.5-9.0 The answer In 9.2 p (9.2) = L (9.2)f0+
1 0
1

=0.6* 2.1972+ 0.4 *2.2513=2.2188 The error is 0.0004 Hence the linear interpolation is not sufficient here to get 4D accuracy; it would suffice for 3D- accuracy.

2 Quadratic Interpolationgiven This is interpolation of


(x ,f ,),(x ,f ),(x ,f ), by a second-degree polynomial p (x), which by Lagranges idea is P (x)=L (x)f +L (x)f +L (x)f -------2.1 with L (x )=1, L (x )=1,L (X )=1
0 0 1 1 2 2 2 2 0 0 1 1 2 2 0 0 1 1 2 2

L0(x) =

L1(x) =

2.2

L2(x) =

Note: The numerator makes L (x )=0 if j= k. The denominator makes L (x )=1 because it equals the numerator at x=x
k j k k k

Example 2: Compute ln9.2 by (3) given In9.0=2.1972, In9.5=2.2513 and In 11.0=2.3979

Solution: In (3) L (x)= 20.5 x - 104.5,


0

L0 (9.2) =0.5400 L1(x)= 99) L1 (9.2)=0.4800 = ( 20x +

L2(x)= -18.5x-88.5)

From equation 2.1 gives exact to 4D, In 9.2= 0.5400(2.1972)+0.4800(2.2513)0.0200(2.3979) = 2.2192

Theorem 2.1

..EQ 2.1

Satisfies the condition of EQ 2.1, thus showing the existence of the required

EQ 2.1

Assignment : construct Lagrange interpolation polynomial

You might also like