Interpolation with unequal interval

40,050 views 67 slides May 03, 2012
Slide 1
Slide 1 of 67
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67

About This Presentation

Interpolation methods, Lagrange's interpolation formula, Lagrange's inverse interpolation formula, Newton's divided difference forumla, Cubic Spline


Slide Content

Numerical Methods - Interpolation
Unequal Intervals
N. B. Vyas
Department of Mathematics,
Atmiya Institute of Tech. and Science, Rajkot (Guj.)
[email protected]
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Interpolation
To nd the value ofyfor anxbetween dierentx- values
x0; x1; : : : ; xnis called problem ofinterpolation.
To nd the value ofyfor anxwhich falls outside the range ofx
(x < x0orx > xn) is called the problem ofextrapolation.
Theorem byWeierstrassin 1885, \Every continuous
function in an interval (a,b) can be represented in that
interval to any desired accuracy by a polynomial."
Let us assign polynomialPnof degreen(or less) that assumes
the given data values
Pn(x0) =y0,Pn(x1) =y1,: : :,Pn(xn) =yn This polynomialPnis calledinterpolation polynomial. x0; x1; : : : ; xnis called thenodes(tabular points,pivotal
pointsorarguments).
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Interpolation
To nd the value ofyfor anxbetween dierentx- values
x0; x1; : : : ; xnis called problem ofinterpolation.
To nd the value ofyfor anxwhich falls outside the range ofx
(x < x0orx > xn) is called the problem ofextrapolation.
Theorem byWeierstrassin 1885, \Every continuous
function in an interval (a,b) can be represented in that
interval to any desired accuracy by a polynomial."
Let us assign polynomialPnof degreen(or less) that assumes
the given data values
Pn(x0) =y0,Pn(x1) =y1,: : :,Pn(xn) =yn This polynomialPnis calledinterpolation polynomial. x0; x1; : : : ; xnis called thenodes(tabular points,pivotal
pointsorarguments).
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Interpolation
To nd the value ofyfor anxbetween dierentx- values
x0; x1; : : : ; xnis called problem ofinterpolation.
To nd the value ofyfor anxwhich falls outside the range ofx
(x < x0orx > xn) is called the problem ofextrapolation.
Theorem byWeierstrassin 1885, \Every continuous
function in an interval (a,b) can be represented in that
interval to any desired accuracy by a polynomial."
Let us assign polynomialPnof degreen(or less) that assumes
the given data values
Pn(x0) =y0,Pn(x1) =y1,: : :,Pn(xn) =yn This polynomialPnis calledinterpolation polynomial. x0; x1; : : : ; xnis called thenodes(tabular points,pivotal
pointsorarguments).
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Interpolation
To nd the value ofyfor anxbetween dierentx- values
x0; x1; : : : ; xnis called problem ofinterpolation.
To nd the value ofyfor anxwhich falls outside the range ofx
(x < x0orx > xn) is called the problem ofextrapolation.
Theorem byWeierstrassin 1885, \Every continuous
function in an interval (a,b) can be represented in that
interval to any desired accuracy by a polynomial."
Let us assign polynomialPnof degreen(or less) that assumes
the given data values
Pn(x0) =y0,Pn(x1) =y1,: : :,Pn(xn) =yn This polynomialPnis calledinterpolation polynomial. x0; x1; : : : ; xnis called thenodes(tabular points,pivotal
pointsorarguments).
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Interpolation
To nd the value ofyfor anxbetween dierentx- values
x0; x1; : : : ; xnis called problem ofinterpolation.
To nd the value ofyfor anxwhich falls outside the range ofx
(x < x0orx > xn) is called the problem ofextrapolation.
Theorem byWeierstrassin 1885, \Every continuous
function in an interval (a,b) can be represented in that
interval to any desired accuracy by a polynomial."
Let us assign polynomialPnof degreen(or less) that assumes
the given data values
Pn(x0) =y0,Pn(x1) =y1,: : :,Pn(xn) =yn This polynomialPnis calledinterpolation polynomial. x0; x1; : : : ; xnis called thenodes(tabular points,pivotal
pointsorarguments).
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Interpolation
To nd the value ofyfor anxbetween dierentx- values
x0; x1; : : : ; xnis called problem ofinterpolation.
To nd the value ofyfor anxwhich falls outside the range ofx
(x < x0orx > xn) is called the problem ofextrapolation.
Theorem byWeierstrassin 1885, \Every continuous
function in an interval (a,b) can be represented in that
interval to any desired accuracy by a polynomial."
Let us assign polynomialPnof degreen(or less) that assumes
the given data values
Pn(x0) =y0,Pn(x1) =y1,: : :,Pn(xn) =yn This polynomialPnis calledinterpolation polynomial. x0; x1; : : : ; xnis called thenodes(tabular points,pivotal
pointsorarguments).
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Interpolation
To nd the value ofyfor anxbetween dierentx- values
x0; x1; : : : ; xnis called problem ofinterpolation.
To nd the value ofyfor anxwhich falls outside the range ofx
(x < x0orx > xn) is called the problem ofextrapolation.
Theorem byWeierstrassin 1885, \Every continuous
function in an interval (a,b) can be represented in that
interval to any desired accuracy by a polynomial."
Let us assign polynomialPnof degreen(or less) that assumes
the given data values
Pn(x0) =y0,Pn(x1) =y1,: : :,Pn(xn) =yn This polynomialPnis calledinterpolation polynomial. x0; x1; : : : ; xnis called thenodes(tabular points,pivotal
pointsorarguments).
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Interpolation with unequal intervals
Lagrange's interpolation formula with unequal intervals:
Lety=f(x) be continuous and dierentiable in the interval
(a; b).
Given the set ofn+ 1 values (x0; y0);(x1; y1); : : : ;(xn; yn) ofx
andy, where the values ofxneed not necessarily be equally
spaced.
It is required to ndPn(x), a polynomial of degreensuch thaty
andPn(x) agree at the tabulated points.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Interpolation with unequal intervals
Lagrange's interpolation formula with unequal intervals:
Lety=f(x) be continuous and dierentiable in the interval
(a; b).
Given the set ofn+ 1 values (x0; y0);(x1; y1); : : : ;(xn; yn) ofx
andy, where the values ofxneed not necessarily be equally
spaced.
It is required to ndPn(x), a polynomial of degreensuch thaty
andPn(x) agree at the tabulated points.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Interpolation with unequal intervals
Lagrange's interpolation formula with unequal intervals:
Lety=f(x) be continuous and dierentiable in the interval
(a; b).
Given the set ofn+ 1 values (x0; y0);(x1; y1); : : : ;(xn; yn) ofx
andy, where the values ofxneed not necessarily be equally
spaced.
It is required to ndPn(x), a polynomial of degreensuch thaty
andPn(x) agree at the tabulated points.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Interpolation with unequal intervals
Lagrange's interpolation formula with unequal intervals:
Lety=f(x) be continuous and dierentiable in the interval
(a; b).
Given the set ofn+ 1 values (x0; y0);(x1; y1); : : : ;(xn; yn) ofx
andy, where the values ofxneed not necessarily be equally
spaced.
It is required to ndPn(x), a polynomial of degreensuch thaty
andPn(x) agree at the tabulated points.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Lagrange's Interpolation
This polynomial is given by the following formula:
y=f(x)Pn(x) =
(xx1)(xx2): : :(xxn)
(x0x1)(x0x2): : :(x0xn)
y0
+
(xx0)(xx2): : :(xxn)
(x1x0)(x1x2): : :(x1xn)
y1+: : :+
(xx0)(xx1): : :(xxn1)
(xnx0)(xnx1): : :(xnxn1)
yn
NOTE:
The above formula can be used irrespective of whether the values
x0; x1; : : : ; xnare equally spaced or not.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Lagrange's Interpolation
This polynomial is given by the following formula:
y=f(x)Pn(x) =
(xx1)(xx2): : :(xxn)
(x0x1)(x0x2): : :(x0xn)
y0
+
(xx0)(xx2): : :(xxn)
(x1x0)(x1x2): : :(x1xn)
y1+: : :+
(xx0)(xx1): : :(xxn1)
(xnx0)(xnx1): : :(xnxn1)
yn
NOTE:
The above formula can be used irrespective of whether the values
x0; x1; : : : ; xnare equally spaced or not.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Lagrange's Interpolation
This polynomial is given by the following formula:
y=f(x)Pn(x) =
(xx1)(xx2): : :(xxn)
(x0x1)(x0x2): : :(x0xn)
y0
+
(xx0)(xx2): : :(xxn)
(x1x0)(x1x2): : :(x1xn)
y1+: : :+
(xx0)(xx1): : :(xxn1)
(xnx0)(xnx1): : :(xnxn1)
yn
NOTE:
The above formula can be used irrespective of whether the values
x0; x1; : : : ; xnare equally spaced or not.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Lagrange's Interpolation
This polynomial is given by the following formula:
y=f(x)Pn(x) =
(xx1)(xx2): : :(xxn)
(x0x1)(x0x2): : :(x0xn)
y0
+
(xx0)(xx2): : :(xxn)
(x1x0)(x1x2): : :(x1xn)
y1+: : :+
(xx0)(xx1): : :(xxn1)
(xnx0)(xnx1): : :(xnxn1)
yn
NOTE:
The above formula can be used irrespective of whether the values
x0; x1; : : : ; xnare equally spaced or not.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Lagrange's Interpolation
This polynomial is given by the following formula:
y=f(x)Pn(x) =
(xx1)(xx2): : :(xxn)
(x0x1)(x0x2): : :(x0xn)
y0
+
(xx0)(xx2): : :(xxn)
(x1x0)(x1x2): : :(x1xn)
y1+: : :+
(xx0)(xx1): : :(xxn1)
(xnx0)(xnx1): : :(xnxn1)
yn
NOTE:
The above formula can be used irrespective of whether the values
x0; x1; : : : ; xnare equally spaced or not.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Lagrange's Inverse Interpolation
In the Lagrange's interpolation formulayis treated as dependent
variable and expressed as function of independent variablex.
Instead ifxis treated as dependent variable and expressed as the
function of independent variabley, then Lagrange's interpolation
formula becomes
x=g(y)Pn(y) =
(yy1)(yy2): : :(yyn)
(y0y1)(y0y2): : :(y0yn)
x0
+
(yy0)(yy2): : :(yyn)
(y1y0)(y1y2): : :(y1yn)
x1+: : :+
(yy0)(yy1): : :(yyn1)
(yny0)(yny1): : :(ynyn1)
xn
This relation is referred asLagrange's inverse interpolation
formula. N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Lagrange's Inverse Interpolation
In the Lagrange's interpolation formulayis treated as dependent
variable and expressed as function of independent variablex.
Instead ifxis treated as dependent variable and expressed as the
function of independent variabley, then Lagrange's interpolation
formula becomes
x=g(y)Pn(y) =
(yy1)(yy2): : :(yyn)
(y0y1)(y0y2): : :(y0yn)
x0
+
(yy0)(yy2): : :(yyn)
(y1y0)(y1y2): : :(y1yn)
x1+: : :+
(yy0)(yy1): : :(yyn1)
(yny0)(yny1): : :(ynyn1)
xn
This relation is referred asLagrange's inverse interpolation
formula. N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Lagrange's Inverse Interpolation
In the Lagrange's interpolation formulayis treated as dependent
variable and expressed as function of independent variablex.
Instead ifxis treated as dependent variable and expressed as the
function of independent variabley, then Lagrange's interpolation
formula becomes
x=g(y)Pn(y) =
(yy1)(yy2): : :(yyn)
(y0y1)(y0y2): : :(y0yn)
x0
+
(yy0)(yy2): : :(yyn)
(y1y0)(y1y2): : :(y1yn)
x1+: : :+
(yy0)(yy1): : :(yyn1)
(yny0)(yny1): : :(ynyn1)
xn
This relation is referred asLagrange's inverse interpolation
formula. N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Lagrange's Inverse Interpolation
In the Lagrange's interpolation formulayis treated as dependent
variable and expressed as function of independent variablex.
Instead ifxis treated as dependent variable and expressed as the
function of independent variabley, then Lagrange's interpolation
formula becomes
x=g(y)Pn(y) =
(yy1)(yy2): : :(yyn)
(y0y1)(y0y2): : :(y0yn)
x0
+
(yy0)(yy2): : :(yyn)
(y1y0)(y1y2): : :(y1yn)
x1+: : :+
(yy0)(yy1): : :(yyn1)
(yny0)(yny1): : :(ynyn1)
xn
This relation is referred asLagrange's inverse interpolation
formula. N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Lagrange's Inverse Interpolation
In the Lagrange's interpolation formulayis treated as dependent
variable and expressed as function of independent variablex.
Instead ifxis treated as dependent variable and expressed as the
function of independent variabley, then Lagrange's interpolation
formula becomes
x=g(y)Pn(y) =
(yy1)(yy2): : :(yyn)
(y0y1)(y0y2): : :(y0yn)
x0
+
(yy0)(yy2): : :(yyn)
(y1y0)(y1y2): : :(y1yn)
x1+: : :+
(yy0)(yy1): : :(yyn1)
(yny0)(yny1): : :(ynyn1)
xn
This relation is referred asLagrange's inverse interpolation
formula. N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Lagrange's Inverse Interpolation
In the Lagrange's interpolation formulayis treated as dependent
variable and expressed as function of independent variablex.
Instead ifxis treated as dependent variable and expressed as the
function of independent variabley, then Lagrange's interpolation
formula becomes
x=g(y)Pn(y) =
(yy1)(yy2): : :(yyn)
(y0y1)(y0y2): : :(y0yn)
x0
+
(yy0)(yy2): : :(yyn)
(y1y0)(y1y2): : :(y1yn)
x1+: : :+
(yy0)(yy1): : :(yyn1)
(yny0)(yny1): : :(ynyn1)
xn
This relation is referred asLagrange's inverse interpolation
formula. N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Example
Ex.
x 150 152 154 156
y=
p
x12.24712.32912.41012.490
Evaluate
p
155 using Lagrange's interpolation formula.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Example
Sol.: x0= 150,x1= 152,x2= 154 andx3= 156
y0= 12:247,y1= 12:329,y2= 12:410 andy3= 12:490By Lagrange's interpolation formula,
f(x)Pn(x) =
(xx1)(xx2)(xx3)
(x0x1)(x0x2)(x0x3)
y0
+
(xx0)(xx2)(xx3)
(x1x0)(x1x2)(x1x3)
y1+
(xx0)(xx1)(xx3)
(x2x0)(x2x1)(x2x3)
y2+
(xx0)(xx1)(xx2)
(x3x0)(x3x1)(x3x2)
y3forx= 155
)f(155) =
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Example
Sol.: x0= 150,x1= 152,x2= 154 andx3= 156
y0= 12:247,y1= 12:329,y2= 12:410 andy3= 12:490By Lagrange's interpolation formula,
f(x)Pn(x) =
(xx1)(xx2)(xx3)
(x0x1)(x0x2)(x0x3)
y0
+
(xx0)(xx2)(xx3)
(x1x0)(x1x2)(x1x3)
y1+
(xx0)(xx1)(xx3)
(x2x0)(x2x1)(x2x3)
y2+
(xx0)(xx1)(xx2)
(x3x0)(x3x1)(x3x2)
y3forx= 155
)f(155) =
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Example
Sol.: x0= 150,x1= 152,x2= 154 andx3= 156
y0= 12:247,y1= 12:329,y2= 12:410 andy3= 12:490By Lagrange's interpolation formula,
f(x)Pn(x) =
(xx1)(xx2)(xx3)
(x0x1)(x0x2)(x0x3)
y0
+
(xx0)(xx2)(xx3)
(x1x0)(x1x2)(x1x3)
y1+
(xx0)(xx1)(xx3)
(x2x0)(x2x1)(x2x3)
y2+
(xx0)(xx1)(xx2)
(x3x0)(x3x1)(x3x2)
y3forx= 155
)f(155) =
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Example
Sol.: x0= 150,x1= 152,x2= 154 andx3= 156
y0= 12:247,y1= 12:329,y2= 12:410 andy3= 12:490By Lagrange's interpolation formula,
f(x)Pn(x) =
(xx1)(xx2)(xx3)
(x0x1)(x0x2)(x0x3)
y0
+
(xx0)(xx2)(xx3)
(x1x0)(x1x2)(x1x3)
y1+
(xx0)(xx1)(xx3)
(x2x0)(x2x1)(x2x3)
y2+
(xx0)(xx1)(xx2)
(x3x0)(x3x1)(x3x2)
y3forx= 155
)f(155) =
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Example
Sol.: x0= 150,x1= 152,x2= 154 andx3= 156
y0= 12:247,y1= 12:329,y2= 12:410 andy3= 12:490By Lagrange's interpolation formula,
f(x)Pn(x) =
(xx1)(xx2)(xx3)
(x0x1)(x0x2)(x0x3)
y0
+
(xx0)(xx2)(xx3)
(x1x0)(x1x2)(x1x3)
y1+
(xx0)(xx1)(xx3)
(x2x0)(x2x1)(x2x3)
y2+
(xx0)(xx1)(xx2)
(x3x0)(x3x1)(x3x2)
y3forx= 155
)f(155) =
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Example
Sol.: x0= 150,x1= 152,x2= 154 andx3= 156
y0= 12:247,y1= 12:329,y2= 12:410 andy3= 12:490By Lagrange's interpolation formula,
f(x)Pn(x) =
(xx1)(xx2)(xx3)
(x0x1)(x0x2)(x0x3)
y0
+
(xx0)(xx2)(xx3)
(x1x0)(x1x2)(x1x3)
y1+
(xx0)(xx1)(xx3)
(x2x0)(x2x1)(x2x3)
y2+
(xx0)(xx1)(xx2)
(x3x0)(x3x1)(x3x2)
y3forx= 155
)f(155) =
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Example
Sol.: x0= 150,x1= 152,x2= 154 andx3= 156
y0= 12:247,y1= 12:329,y2= 12:410 andy3= 12:490By Lagrange's interpolation formula,
f(x)Pn(x) =
(xx1)(xx2)(xx3)
(x0x1)(x0x2)(x0x3)
y0
+
(xx0)(xx2)(xx3)
(x1x0)(x1x2)(x1x3)
y1+
(xx0)(xx1)(xx3)
(x2x0)(x2x1)(x2x3)
y2+
(xx0)(xx1)(xx2)
(x3x0)(x3x1)(x3x2)
y3forx= 155
)f(155) =
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Example
Sol.: x0= 150,x1= 152,x2= 154 andx3= 156
y0= 12:247,y1= 12:329,y2= 12:410 andy3= 12:490By Lagrange's interpolation formula,
f(x)Pn(x) =
(xx1)(xx2)(xx3)
(x0x1)(x0x2)(x0x3)
y0
+
(xx0)(xx2)(xx3)
(x1x0)(x1x2)(x1x3)
y1+
(xx0)(xx1)(xx3)
(x2x0)(x2x1)(x2x3)
y2+
(xx0)(xx1)(xx2)
(x3x0)(x3x1)(x3x2)
y3forx= 155
)f(155) =
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Example
Ex. f(0:4) for the table below by the Lagrange's
interpolation:
x 0.30.50.6
f(x)0.610.690.72
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Example
Ex. f(x) for the following
data:
x0125
f(x)2312147
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Example
Ex. xfory= 7 for the following data:
x134
y41219
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Lagrange's Interpolation
Disadvantages:
In practice, we often do not know the degree of the interpolation
polynomial that will give the required accuracy, so we should be
prepared to increase the degree if necessary.
To increase the degree the addition of another interpolation point
leads to re-computation.
i.e. no previous work is useful.
E.g: In calculatingPk(x), no obvious advantage can be taken of
the fact that one already has calculatedPk1(x).
That means we need to calculate entirely new polynomial.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Lagrange's Interpolation
Disadvantages:
In practice, we often do not know the degree of the interpolation
polynomial that will give the required accuracy, so we should be
prepared to increase the degree if necessary.
To increase the degree the addition of another interpolation point
leads to re-computation.
i.e. no previous work is useful.
E.g: In calculatingPk(x), no obvious advantage can be taken of
the fact that one already has calculatedPk1(x).
That means we need to calculate entirely new polynomial.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Lagrange's Interpolation
Disadvantages:
In practice, we often do not know the degree of the interpolation
polynomial that will give the required accuracy, so we should be
prepared to increase the degree if necessary.
To increase the degree the addition of another interpolation point
leads to re-computation.
i.e. no previous work is useful.
E.g: In calculatingPk(x), no obvious advantage can be taken of
the fact that one already has calculatedPk1(x).
That means we need to calculate entirely new polynomial.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Lagrange's Interpolation
Disadvantages:
In practice, we often do not know the degree of the interpolation
polynomial that will give the required accuracy, so we should be
prepared to increase the degree if necessary.
To increase the degree the addition of another interpolation point
leads to re-computation.
i.e. no previous work is useful.
E.g: In calculatingPk(x), no obvious advantage can be taken of
the fact that one already has calculatedPk1(x).
That means we need to calculate entirely new polynomial.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Divided Difference
Letf(x0); f(x1); : : : ; f(xn) be the values of a functionf
corresponding to the argumentsx0; x1; : : : ; xnwhere the intervals
x1x0; x2x1; : : : ; xnxn1are not necessarily equally spaced.
Then therst divided dierenceofffor the arguments
x0; x1; : : : ; xnare dened by ,
f(x0; x1) =
f(x1)f(x0)
x1x0
f(x1; x2) =
f(x2)f(x1)
x2x1
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Divided Difference
Letf(x0); f(x1); : : : ; f(xn) be the values of a functionf
corresponding to the argumentsx0; x1; : : : ; xnwhere the intervals
x1x0; x2x1; : : : ; xnxn1are not necessarily equally spaced.
Then therst divided dierenceofffor the arguments
x0; x1; : : : ; xnare dened by ,
f(x0; x1) =
f(x1)f(x0)
x1x0
f(x1; x2) =
f(x2)f(x1)
x2x1
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Divided Difference
Letf(x0); f(x1); : : : ; f(xn) be the values of a functionf
corresponding to the argumentsx0; x1; : : : ; xnwhere the intervals
x1x0; x2x1; : : : ; xnxn1are not necessarily equally spaced.
Then therst divided dierenceofffor the arguments
x0; x1; : : : ; xnare dened by ,
f(x0; x1) =
f(x1)f(x0)
x1x0
f(x1; x2) =
f(x2)f(x1)
x2x1
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Divided Difference
Letf(x0); f(x1); : : : ; f(xn) be the values of a functionf
corresponding to the argumentsx0; x1; : : : ; xnwhere the intervals
x1x0; x2x1; : : : ; xnxn1are not necessarily equally spaced.
Then therst divided dierenceofffor the arguments
x0; x1; : : : ; xnare dened by ,
f(x0; x1) =
f(x1)f(x0)
x1x0
f(x1; x2) =
f(x2)f(x1)
x2x1
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Divided Difference
Thesecond divided dierenceofffor three arguments
x0; x1; x2is dened by
f(x0; x1; x2) =
f(x1; x2)f(x0; x1)
x2x0
and similarly the divided dierence of ordernis dened by
f(x0; x1; : : : ; xn) =
f(x1; x2; : : : ; xn)f(x0; x1; : : : ; xn1)
xnx0
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Divided Difference
Thesecond divided dierenceofffor three arguments
x0; x1; x2is dened by
f(x0; x1; x2) =
f(x1; x2)f(x0; x1)
x2x0
and similarly the divided dierence of ordernis dened by
f(x0; x1; : : : ; xn) =
f(x1; x2; : : : ; xn)f(x0; x1; : : : ; xn1)
xnx0
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Divided Difference
Properties:
The divided dierences are symmetrical in all their arguments;
that is, the value of any divided dierence is independent of the
order of the arguments.
The divided dierence operator is linear. Then
th
order divided dierences of a polynomial of degreenare
constant, equal to the coecient ofx
n
.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Divided Difference
Properties:
The divided dierences are symmetrical in all their arguments;
that is, the value of any divided dierence is independent of the
order of the arguments.
The divided dierence operator is linear. Then
th
order divided dierences of a polynomial of degreenare
constant, equal to the coecient ofx
n
.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Divided Difference
Properties:
The divided dierences are symmetrical in all their arguments;
that is, the value of any divided dierence is independent of the
order of the arguments.
The divided dierence operator is linear. Then
th
order divided dierences of a polynomial of degreenare
constant, equal to the coecient ofx
n
.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Newton's Divided Difference Interpolation
An interpolation formula which has the property that a
polynomial of higher degree may be derived from it by simply
adding new terms.
Newton's general interpolation formula is one such formula and
terms in it are called divided dierences.
Letf(x0); f(x1); : : : ; f(xn) be the values of a functionf
corresponding to the argumentsx0; x1; : : : ; xnwhere the intervals
x1x0; x2x1; : : : ; xnxn1are not necessarily equally spaced.
By the denition of divided dierence,
f(x; x0) =
f(x)f(x0)
xx0
)
f(x) =f(x0) + (xx0)f(x; x0) (1)
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Newton's Divided Difference Interpolation
An interpolation formula which has the property that a
polynomial of higher degree may be derived from it by simply
adding new terms.
Newton's general interpolation formula is one such formula and
terms in it are called divided dierences.
Letf(x0); f(x1); : : : ; f(xn) be the values of a functionf
corresponding to the argumentsx0; x1; : : : ; xnwhere the intervals
x1x0; x2x1; : : : ; xnxn1are not necessarily equally spaced.
By the denition of divided dierence,
f(x; x0) =
f(x)f(x0)
xx0
)
f(x) =f(x0) + (xx0)f(x; x0) (1)
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Newton's Divided Difference Interpolation
An interpolation formula which has the property that a
polynomial of higher degree may be derived from it by simply
adding new terms.
Newton's general interpolation formula is one such formula and
terms in it are called divided dierences.
Letf(x0); f(x1); : : : ; f(xn) be the values of a functionf
corresponding to the argumentsx0; x1; : : : ; xnwhere the intervals
x1x0; x2x1; : : : ; xnxn1are not necessarily equally spaced.
By the denition of divided dierence,
f(x; x0) =
f(x)f(x0)
xx0
)
f(x) =f(x0) + (xx0)f(x; x0) (1)
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Newton's Divided Difference Interpolation
An interpolation formula which has the property that a
polynomial of higher degree may be derived from it by simply
adding new terms.
Newton's general interpolation formula is one such formula and
terms in it are called divided dierences.
Letf(x0); f(x1); : : : ; f(xn) be the values of a functionf
corresponding to the argumentsx0; x1; : : : ; xnwhere the intervals
x1x0; x2x1; : : : ; xnxn1are not necessarily equally spaced.
By the denition of divided dierence,
f(x; x0) =
f(x)f(x0)
xx0
)
f(x) =f(x0) + (xx0)f(x; x0) (1)
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Newton's Divided Difference Interpolation
An interpolation formula which has the property that a
polynomial of higher degree may be derived from it by simply
adding new terms.
Newton's general interpolation formula is one such formula and
terms in it are called divided dierences.
Letf(x0); f(x1); : : : ; f(xn) be the values of a functionf
corresponding to the argumentsx0; x1; : : : ; xnwhere the intervals
x1x0; x2x1; : : : ; xnxn1are not necessarily equally spaced.
By the denition of divided dierence,
f(x; x0) =
f(x)f(x0)
xx0
)
f(x) =f(x0) + (xx0)f(x; x0) (1)
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Newton's Divided Difference Interpolation
Further
f(x; x0; x1) =
f(x; x0)f(x0; x1)
xx1
which yields
f(x; x0) =f(x0; x1) + (xx1)f(x; x0; x1) (2)
Similarly
f(x; x0; x1) =f(x0; x1; x2) + (xx2)f(x; x0; x1; x2) (3)
and in general
f(x; x0; :::; xn1) =f(x0; x1; :::; xn) + (xxn)f(x; x0; x1; :::; xn) (4)
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Newton's Divided Difference Interpolation
Further
f(x; x0; x1) =
f(x; x0)f(x0; x1)
xx1
which yields
f(x; x0) =f(x0; x1) + (xx1)f(x; x0; x1) (2)
Similarly
f(x; x0; x1) =f(x0; x1; x2) + (xx2)f(x; x0; x1; x2) (3)
and in general
f(x; x0; :::; xn1) =f(x0; x1; :::; xn) + (xxn)f(x; x0; x1; :::; xn) (4)
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Newton's Divided Difference Interpolation
Further
f(x; x0; x1) =
f(x; x0)f(x0; x1)
xx1
which yields
f(x; x0) =f(x0; x1) + (xx1)f(x; x0; x1) (2)
Similarly
f(x; x0; x1) =f(x0; x1; x2) + (xx2)f(x; x0; x1; x2) (3)
and in general
f(x; x0; :::; xn1) =f(x0; x1; :::; xn) + (xxn)f(x; x0; x1; :::; xn) (4)
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Newton's Divided Difference Interpolation
Further
f(x; x0; x1) =
f(x; x0)f(x0; x1)
xx1
which yields
f(x; x0) =f(x0; x1) + (xx1)f(x; x0; x1) (2)
Similarly
f(x; x0; x1) =f(x0; x1; x2) + (xx2)f(x; x0; x1; x2) (3)
and in general
f(x; x0; :::; xn1) =f(x0; x1; :::; xn) + (xxn)f(x; x0; x1; :::; xn) (4)
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Newton's Divided Difference Interpolation
multiplying equation (2) by (xx0)
, (3) by (xx0) (xx1)
and so on,
and nally the last term (4) by
(xx0) (xx1):::(xxn1) and
adding (1), (2) , (3) up to (4)
we obtain
f(x) =
f(x0) + (xx0)f(x0; x1) + (xx0) (xx1)f(x0; x1; x2) +:::+
(xx0) (xx1):::(xxn1)f(x0; x1; :::; xn)
This formula is calledNewton's divided dierenceformula.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Newton's Divided Difference Interpolation
multiplying equation (2) by (xx0)
, (3) by (xx0) (xx1)
and so on,
and nally the last term (4) by
(xx0) (xx1):::(xxn1) and
adding (1), (2) , (3) up to (4)
we obtain
f(x) =
f(x0) + (xx0)f(x0; x1) + (xx0) (xx1)f(x0; x1; x2) +:::+
(xx0) (xx1):::(xxn1)f(x0; x1; :::; xn)
This formula is calledNewton's divided dierenceformula.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Newton's Divided Difference Interpolation
multiplying equation (2) by (xx0)
, (3) by (xx0) (xx1)
and so on,
and nally the last term (4) by
(xx0) (xx1):::(xxn1) and
adding (1), (2) , (3) up to (4)
we obtain
f(x) =
f(x0) + (xx0)f(x0; x1) + (xx0) (xx1)f(x0; x1; x2) +:::+
(xx0) (xx1):::(xxn1)f(x0; x1; :::; xn)
This formula is calledNewton's divided dierenceformula.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Newton's Divided Difference Interpolation
multiplying equation (2) by (xx0)
, (3) by (xx0) (xx1)
and so on,
and nally the last term (4) by
(xx0) (xx1):::(xxn1) and
adding (1), (2) , (3) up to (4)
we obtain
f(x) =
f(x0) + (xx0)f(x0; x1) + (xx0) (xx1)f(x0; x1; x2) +:::+
(xx0) (xx1):::(xxn1)f(x0; x1; :::; xn)
This formula is calledNewton's divided dierenceformula.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Newton's Divided Difference Interpolation
multiplying equation (2) by (xx0)
, (3) by (xx0) (xx1)
and so on,
and nally the last term (4) by
(xx0) (xx1):::(xxn1) and
adding (1), (2) , (3) up to (4)
we obtain
f(x) =
f(x0) + (xx0)f(x0; x1) + (xx0) (xx1)f(x0; x1; x2) +:::+
(xx0) (xx1):::(xxn1)f(x0; x1; :::; xn)
This formula is calledNewton's divided dierenceformula.
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Newton's Divided Difference Interpolation
The divided dierence upto third order
x y 1
st
order 2
nd
order 3
rd
order
dierence dierence dierence
x0y0
[x0; x1]
x1y1 [x0; x1; x2]
[x1; x2] [ x0; x1; x2; x3]
x2y2 [x1; x2; x3]
[x2; x3]
x3y3
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Example
Ex.
x01234
y139-81
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Example
Sol.
By Newton's divided dierence formula
f(x) =
f(x0) + (xx0)f(x0; x1) + (xx0) (xx1)f(x0; x1; x2) +:::
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Example
Sol.
By Newton's divided dierence formula
f(x) =
f(x0) + (xx0)f(x0; x1) + (xx0) (xx1)f(x0; x1; x2) +:::
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals

Example
Ex.
(4;1245);(1;33);(0;5);(2;9);(5;1335)
N. B. Vyas Numerical Methods - Interpolation Unequal Intervals