Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

UNIT-III

INTERPOLATION AND EXTRAPOLATION

Interpolation:
Definition:
*If the value of x for which the value of y is to be estimated is an
intermediate value in the given set of values of ‘x’ then the method of determining
‘y’ is called interpolation.

Extrapolation:
Definition:
*If the value of x lies outside the given set of values of ‘x’ then the method
of determining ‘y’ is called extrapolation.

Example:
Difference: 2 1 3 1
Year(x): 1982 1984 1985 1988 1989
Profit(y): 22 23 24 25 26

In this the process of computing for 1983 is called interpolation


In this the process of computing for 1987 is called interpolation
In this the process of computing for 1981 is called extrapolation
In this the process of computing for 1990 is called extrapolation

Methods of interpolation:
1.Newtons forward method(Only if "x" values are equidistant)
2.Newtons backward method(Only if "x" values are equidistant)
3.Binomial method
4.Lagranges method
5.Divided difference Method

Formula
Newton's Forward Difference formula

y(x)=y0+uΔy0+ Δ2y0+ Δ3y0+ Δ4y0+...


Where u=
Examples
1. Find Solution using proper method:
x f(x)=y
1891 46
1901 66
1911 81
1921 93
1931 101

x = 1895

Solution:

The "x" values are equidistant(h=10), so we can use Newton's formula.


The year 1895 lies in the first half, so we can use Newton's forward formula.
The value of table for x and y

x 1891 1901 1911 1921 1931


y 46 66 81 93 101

Newton's forward difference interpolation method to find solution

Newton's forward difference table is


X y Δy Δ2y Δ3y Δ4y
1891 46
20
1901 66 -5
15 2
1911 81 -3 -3
12 -1
1921 93 -4
8
1931 101

The value of x at you want to find the f(x):x=1895

h=x1-x0=1901-1891=10

u= = =0.4 and Δy=20, Δ2y=-5, Δ3y=2, Δ4y=-3

Newton's forward difference interpolation formula is


y(x)= y0+uΔy0+ Δ2y0+ Δ3y0+ Δ4y0

y(1895)=46+[0.4×20]+[ ]×-5+[ ]×2+


×-3

y(1895)=46+8+0.6+0.128+0.1248

y(1895)=54.8528

Solution of newton's forward interpolation method


y(1895)=54.8528

2. Find Solution using Newton's Forward Difference formula


x f(x)
0 1
1 0
2 1
3 10

x = -1
Solution:
Difference 1 1 1
x: 0 1 2 3
f(x): 1 0 1 10
Step 1: Check if "x" values are equidistant.

The "x" values are equidistant, with common difference h=1, so we can use
Newton's method.

Step 2:
The position of x=-1 lies before the starting value, so we use Newton's forward
formula.

The value of table for x and y

x012 3
y 1 0 1 10

Newton's forward difference interpolation method to find solution

Newton's forward difference table is


x y Δy Δ2y Δ3y
0=x0 1=y0
0-1=-1= Δy0
1=x1 0=y1 1-(-1)=1+1=2= Δ2y0
1-0=1= Δy1 8-2=6= Δ3y0
2=x2 1=y2
10-1=9= Δy2 9-1=8= Δ2y1
3=x3 10=y3

The value of x at you want to find the f(x):x=-1

h=x1-x0=1-0=1
u= = =-1
x  x0  1  0
u   1
h 1

Newton's forward difference interpolation formula is


y(x)= y0+uΔy0+ Δ2y0+ Δ3y0
u u  1 2 u u  1u  2 3
y ( x)  y 0  uy 0   y0   y0
2! 3!
y (1)  1   1 1 
 1 1  1 2   1 1  1 1  2 6
2 6
y (1)  1  1 
 1 22   1 2 36
2 6
y (1.)  1  1  2  6
y (1)  2

y(-1)=1+(-1)×(-1)+ ×2+ ×6

y(-1)=1+1+2-6

y(-1)=-2

Solution of Newton's forward interpolation method y(-1)=-2

Exercise:
1.Using Newton’s forward interpolation formula, find the polynomial f(x) satisfying
the following data. Hence, evaluate y at x=5.
x 4 6 8 10
y 1 3 8 10
Ans:y=1.25
Newton's Backward Difference formula

v=
y(x)=yn+ vΔyn-1+ Δ2yn-2+ Δ3yn-3+ Δ4yn-4+….

Examples
1. Find Solution using proper method:
x f(x)
1891 46
1901 66
1911 81
1921 93
1931 101

x = 1925

Solution:
Step 1: Check if the "x" values are equidistant.
Difference: 10 10 10 10
x: 1891 1901 1911 1921 1931
f(x): 46 66 81 93 101

Here "x" values are equidistant with common difference h=10, so we can use
Newton's method.

Step 2: x value given in question is 1925.


It lies in the second half, so we can use Newton's backward formula.

The value of table for x and y


x 1891 1901 1911 1921 1931
y 46 66 81 93 101

Newton's backward difference interpolation method to find solution

Newton's forward difference table is


X y Δy Δ2y Δ3y Δ4y
1891=x0 46=y0
20= Δy0
1901=x1 66=y1 -5= Δ2y0
15= Δy1 2 =Δ3y0
1911=x2 81=y2 -3= Δ2y1 -3=Δ4y0
12= Δy2 -1 =Δ3y1
1921=x3 93=y3 -4= Δ2y2
8= Δy3
1931=x4 101=y4

The value of x at you want to find the f(x):x=1925


Here n=4

h=x1-x0=1901-1891=10

v= = =-0.6
Newton's backward difference interpolation formula is
y(x)=yn+vΔyn-1+ Δ2yn-2+ Δ3yn-3+ Δ4yn-4

y(1925)=101+(-0.6)×8+ }×-4+ ×-1+


×-3

y(1925)=101-4.8+0.48+0.056+0.1008

y(1925)=96.8368

Solution of newton's backward interpolation method


y(1925)=96.8368

2. Find Solution using Newton's Backward Difference formula


x f(x)
0 1
1 0
2 1
3 10

x=4

Solution:
The value of table for x and y

x012 3
y 1 0 1 10

Newton's backward difference interpolation method to find solution

Newton's backward difference table is


x Y Δy Δ2y Δ3y
0 1
-1
1 0 2
1 6
2 1 8
9
3 10

The value of x at you want to find the f(x):x=4

h=x1-x0=1-0=1

v= =4-31=1

Newton's backward difference interpolation formula is


y(x)=yn+vΔyn+ Δ2yn+ Δ3yn+ Δ4yn

y(4)=10+(1×9)+ ×8+ ×6

y(4)=10+9+8+6

y(4)=33

Solution of newton's backward interpolation method


y(4)=33
Formula
Langrange's formula

y(x)= × y0+ ×y1

×y2+...+ ×yn

You might also like