Вы находитесь на странице: 1из 6

Lesson 18

Newton Interpolation
Newtons method for interpolation is derived by seeking a polynomial of the form
P (x) = a0 +a1 (x xn )
+a2 (x xn )(x xn1 )
+a3 (x xn )(x xn1 )(x xn2 )
..
.
+an (x xn )(x xn1 ) (x x1 )

(18.1)

that interpolates the points


P (x0 ) = f (x0 )
P (x1 ) = f (x1 )
..
.
P (xn1 ) = f (xn1 )
P (xn ) = f (xn )

(18.2)
(18.3)

(18.4)
(18.5)

We define the backward difference operator for an element fn of a sequence as


fn = fn fn1
2 fn = fn fn1 = fn 2fn1 + fn2
3 fn = 2 fn 2 fn1 = fn 3fn1 + 3fn2 fn3
..
.

(18.6)
(18.7)
(18.8)

k fn = k1 fn k1 fn1

(18.9)

Letting fn = f (xn ) we have by substituting 18.5 into 18.1 that


f n = a0
123

(18.10)

124

LESSON 18. NEWTON INTERPOLATION

From 18.4 we get


fn1 = fn + a1 (xn1 xn )
= f n a1 h
1
1
a1 = (fn fn1 ) = fn
h
h

(18.11)
(18.12)
(18.13)

Substituting at x = xn2 = xn 2h gives


fn2 = a0 + a1 (xn2 xn ) + a2 (xn2 xn )(xn2 xn2 )
1
= fn + (fn fn1 )(2h) + a2 (2h)(h)
h
= 2fn1 fn + 2h2 a2
1
1
a2 = 2 (fn 2fn1 + fn2 ) = 2 2 fn
2h
2h

(18.14)
(18.15)
(18.16)
(18.17)

Continuing the process we find in general that


ak =

1
k fn
k!hk

(18.18)

Next we define the polynomials Qk by

Qk (x) =

k1
Y

(x xnj )

(18.19)

j=0

Using 18.18 and 18.19 in 18.1


P (x) = a0 + a1 Q1 (x) + a2 Q2 (x) + + an Qn (x)
n
X
= a0 +
ak Qk (x)

(18.20)
(18.21)

k=1

= fn +

n
X
k fn
k=1

k!hk

Qk (x)

(18.22)

Define the parameter s, 1 s 0 in the interval [xn1 , xn ] by


x = xn + sh
Math 481A
California State University Northridge

(18.23)
2008, B.E.Shapiro
Last revised: November 16, 2011

LESSON 18. NEWTON INTERPOLATION

125

From equation 18.19,


Qk (x) =

k1
Y

(xn + sh (xn jh))

(18.24)

j=0

k1
Y

(j + s)h

(18.25)

j=0

= hk

k1
Y

(s + j)

(18.26)

j=0
k

= h s(s + 1)(s + 2) (s + k 1)
Recall the definition of the binomial coefficient for n, m integers,
 
n(n 1)(n 2) (n m + 1)
n!
n
=
=
m
m!(n m)!
m!
we can define, for any real number t, not necessarily integer,
 
t(t 1)(t 2) (t m + 1)
t
=
k
k!
Using this we calculate
 
s(s 1)(s 2) (s k + 1)
s
=
k
k!
(1)k
s(s + 1)(s + 2) (s + k 1)
k!
(1)k
=
Qk (x)
k!hk
Using 18.32 in 18.22 we get
=

P (x) = fn +

n
X

(1)

k=1


s
k fn
k

(18.27)

(18.28)

(18.29)

(18.30)
(18.31)
(18.32)

(18.33)

which is known as Newtons Backward Difference Formula.


We can also derive a formula using forward differences, and the forward difference
operators that we defined in section 13,
fn = fn+1 fn
2 fn = fn+1 fn = fn+2 2fn+1 + fn
..
.

(18.36)

k fn = k1 fn+1 k fn

(18.37)

2008, B.E.Shapiro
Last revised: November 16, 2011

(18.34)
(18.35)

Math 481A
California State University Northridge

126

LESSON 18. NEWTON INTERPOLATION

The result is known as Newtons Forward Difference Formula,


n  
X
s
P (x) = f0 +
k f0
k

(18.38)

k=1

where x = x0 + hs.
Example 18.1. Find e1.2 using a first, second, third, and fourth order differences
using the data e = 2.71828, e1.5 = 4.48169, e2 = 7.38906, e2.5 = 12.1829, e3 =
20.085554 with Newtons forward difference formula.
Solution. We want to use equation 18.34 at x = 1.2 with x0 = 1. Hence
1.2 = x = x0 + hs = 1 + 0.5s

(18.39)

and so s = 0.4. We can construct the following table of forward differences based on
the input data. The actual data values that we will use are colored yellow.
xk
1

fk
2.71828

fk

2 fk

3 fk

4 fk

1.76341
1.5

4.48169

1.14396
2.90737

7.38906

2.5

12.18249

0.74211
1.88607

4.79344

0.48142
1.22353

3.10961
7.90304

20.08554

We then calculated the following binomial coefficients, using s = 0.4


   
s
0.4
=
= 0.4
1
1
   
(0.4)(0.6)
s
0.4
=
=
= 0.12
2
2
2!
   
(0.4)(0.6)(1.6)
s
0.4
= 0.064
=
=
3
3
3!
   
(0.4)(0.6)(1.6)(2.6)
s
0.4
= 0.0416
=
=
4
4
4!

(18.40)
(18.41)
(18.42)
(18.43)

For n = 1, the interpolated value is


 
s
P (x + sh) = f0 +
f0
1

(18.44)

= 2.71828 + (0.4)(1.76341)
= 3.42364
Math 481A
California State University Northridge

(18.45)
(18.46)

2008, B.E.Shapiro
Last revised: November 16, 2011

LESSON 18. NEWTON INTERPOLATION

127

For n = 2,
 
 
s
s
P (x + sh) = f0 +
f0 +
2 f0
1
2
= 3.42364 + (0.12)(1.14396)
= 3.28636

(18.47)
(18.48)
(18.49)

For n = 3,
 
 
 
s
s
s
2
P (x + sh) = f0 +
f0 +
f0 +
3 f0
1
2
3
= 3.28636 + (0.064)(0.74211)
= 3.33386

(18.50)
(18.51)
(18.52)

For n = 4,
 
 
 
 
s
s
s
s
2
3
P (x + sh) = f0 +
f0 +
f0 +
f0 +
4 f0
1
2
3
4
= 3.33386 + (0.0416)(0.48142)
= 3.31383

(18.53)
(18.54)
(18.55)

The correct value is approximately 3.32012.


We can also use backward differences for numbers closer to the end of the table.
Example 18.2. Using the same data as the previous example, calculate e2.7 using
backward differences.
Solution. We have
2.7 = x = xn + sh = 3 + (0.5)s

(18.56)

Hence s = 0.6. The backwards difference formula gives


 
 
 
0.6
2 0.6
2
3 0.6
P (2.7) = fn + (1)
fn + (1)
fn + (1)
3 fn
3
1
2
 
4 0.6
+ (1)
4 fn +
(18.57)
4
(0.6)(0.4) 2
(0.6)(0.4)(1.4) 3
fn + (1)3
fn
= fn + (1)(0.6)fn + (1)2
2!
3!
(0.6)(0.4)(1.4)(2.4) 4
+ (1)4
fn +
(18.58)
4!
= fn 0.6fn 0.122 fn 0.0563 fn 0.03364 fn +
(18.59)
We now can read data off the lower diagonal in the table.
2008, B.E.Shapiro
Last revised: November 16, 2011

Math 481A
California State University Northridge

128

LESSON 18. NEWTON INTERPOLATION


xk
1

fk
2.71828

fk

2 fk

3 fk

4 fk

1.76341
1.5

4.48169

1.14396
2.90737

7.38906

2.5

12.18249

0.74211
1.88607

4.79344

0.48142
1.22353

3.10961
7.90304

20.08554

Substituting numbers from the table gives us


P (2.7) = 20.08554 0.6(7.90304) 0.12(3.10961)
0.056(1.22353) 0.0336(0.48142)
= 14.88586

Math 481A
California State University Northridge

(18.60)
(18.61)

2008, B.E.Shapiro
Last revised: November 16, 2011

Вам также может понравиться