lecture 18

5
Jim Lambers MAT 460/560 Fall Semester 2009-10 Lecture 18 Notes These notes correspond to Section 3.2 in the text. Interpolation Using Equally Spaced Points Suppose that the interpolation points x 0 ;x 1 ;:::;x n are equally spaced; that is, x i = x 0 + ih for some positive number h. In this case, the Newton interpolating polynomial can be simplied, since the denominators of all of the divided dierences can be expressed in terms of the spacing h. If we recall the forward dierence operator , dened by x k = x k+1 x k ; where fx k g is any sequence, then the divided dierences f [x 0 ;x 1 ;:::;x k ] are given by f [x 0 ;x 1 ;:::;x k ]= 1 k!h k k f (x 0 ): The interpolating polynomial can then be described by the Newton forward-dierence formula p n (x)= f [x 0 ]+ n X k=1 s k k f (x 0 ); where the new variable s is related to x by s = x x 0 h ; and the extended binomial coecient s k is dened by s k = s(s 1)(s 2) (s k + 1) k! ; where k is a nonnegative integer. Example We will use the Newton forward-dierence formula p n (x)= f [x 0 ]+ n X k=1 s k k f (x 0 ) to compute the interpolating polynomial p 3 (x) that ts the data 1

Upload: anil-yvs

Post on 18-Jul-2016

7 views

Category:

Documents


1 download

DESCRIPTION

lecture

TRANSCRIPT

Page 1: Lecture 18

Jim LambersMAT 460/560

Fall Semester 2009-10Lecture 18 Notes

These notes correspond to Section 3.2 in the text.

Interpolation Using Equally Spaced Points

Suppose that the interpolation points x0, x1, . . . , xn are equally spaced; that is, xi = x0 + iℎ forsome positive number ℎ. In this case, the Newton interpolating polynomial can be simplified, sincethe denominators of all of the divided differences can be expressed in terms of the spacing ℎ. If werecall the forward difference operator Δ, defined by

Δxk = xk+1 − xk,

where {xk} is any sequence, then the divided differences f [x0, x1, . . . , xk] are given by

f [x0, x1, . . . , xk] =1

k!ℎkΔkf(x0).

The interpolating polynomial can then be described by the Newton forward-difference formula

pn(x) = f [x0] +n∑

k=1

(sk

)Δkf(x0),

where the new variable s is related to x by

s =x− x0

ℎ,

and the extended binomial coefficient

(sk

)is defined by

(sk

)=

s(s− 1)(s− 2) ⋅ ⋅ ⋅ (s− k + 1)

k!,

where k is a nonnegative integer.

Example We will use the Newton forward-difference formula

pn(x) = f [x0] +

n∑k=1

(sk

)Δkf(x0)

to compute the interpolating polynomial p3(x) that fits the data

1

Page 2: Lecture 18

i xi f(xi)

0 −1 31 0 −42 1 53 2 −6

In other words, we must have p3(−1) = 3, p3(0) = −4, p3(1) = 5, and p3(2) = −6. Note that theinterpolation points x0 = −1, x1 = 0, x2 = 1 and x3 = 2 are equally spaced, with spacing ℎ = 1.

To apply the forward-difference formula, we define s = (x− x0)/ℎ = x + 1 and compute(s1

)= s

= x + 1,(s2

)=

s(s− 1)

2

=x(x + 1)

2,(

s3

)=

s(s− 1)(s− 2)

6

=(x + 1)x(x− 1)

6,

f [x0] = f(x0)

= 3,

Δf(x0) = f(x1)− f(x0)

= −4− 3

= −7,

Δ2f(x0) = Δ(Δf(x0))

= Δ[f(x1)− f(x0)]

= [f(x2)− f(x1)]− [f(x1)− f(x0)]

= f(x2)− 2f(x1) + f(x0)

= 5− 2(−4) + 3,

= 16

Δ3f(x0) = Δ(Δ2f(x0))

= Δ[f(x2)− 2f(x1) + f(x0)]

= [f(x3)− f(x2)]− 2[f(x2)− f(x1)] + [f(x1)− f(x0)]

= f(x3)− 3f(x2) + 3f(x1)− f(x0)

= −6− 3(5) + 3(−4)− 3

2

Page 3: Lecture 18

= −36.

It follows that

p3(x) = f [x0] +

3∑k=1

(sk

)Δkf(x0)

= 3 +

(s1

)Δf(x0) +

(s1

)Δ2f(x0) +

(s2

)Δ3f(x0)

= 3 + (x + 1)(−7) +x(x + 1)

216 +

(x + 1)x(x− 1)

6(−36)

= 3− 7(x + 1) + 8(x + 1)x− 6(x + 1)x(x− 1).

Note that the forward-difference formula computes the same form of the interpolating polynomialas the Newton divided-difference formula. □

If we define the backward difference operator ∇ by

∇xk = xk − xk−1,

for any sequence {xk}, then we obtain the Newton backward-difference formula

pn(x) = f [xn] +n∑

k=1

(−1)k(−sk

)∇kf(xn),

where s = (x− xn)/ℎ, and the preceding definition of the extended binomial coefficient applies.

Example We will use the Newton backward-difference formula

pn(x) = f [xn] +n∑

k=1

(−1)k(−sk

)∇kf(xn)

to compute the interpolating polynomial p3(x) that fits the data

i xi f(xi)

0 −1 31 0 −42 1 53 2 −6

In other words, we must have p3(−1) = 3, p3(0) = −4, p3(1) = 5, and p3(2) = −6. Note that theinterpolation points x0 = −1, x1 = 0, x2 = 1 and x3 = 2 are equally spaced, with spacing ℎ = 1.

3

Page 4: Lecture 18

To apply the backward-difference formula, we define s = (x− x3)/ℎ = x− 2 and compute(−s1

)= −s

= −(x− 2),(−s2

)=−s(−s− 1)

2

=s(s + 1)

2

=(x− 2)(x− 1)

2,(

−s3

)=−s(−s− 1)(−s− 2)

6

= −s(s + 1)(s + 2)

6

= −(x− 2)(x− 1)x

6,

f [x3] = f(x3)

= −6,

∇f(x3) = f(x3)− f(x2)

= −6− 5

= −11,

∇2f(x3) = ∇(∇f(x3))

= Δ[f(x3)− f(x2)]

= [f(x3)− f(x2)]− [f(x− 2)− f(x1)]

= f(x3)− 2f(x2) + f(x1)

= −6− 2(5) +−4,

= −20

∇3f(x3) = ∇(∇2f(x3))

= ∇[f(x3)− 2f(x2) + f(x1)]

= [f(x3)− f(x2)]− 2[f(x2)− f(x1)] + [f(x1)− f(x0)]

= f(x3)− 3f(x2) + 3f(x1)− f(x0)

= −6− 3(5) + 3(−4)− 3

= −36.

4

Page 5: Lecture 18

It follows that

p3(x) = f [x3] +

3∑k=1

(−1)k(−sk

)∇kf(x3)

= −6−(−s1

)∇f(x3) +

(−s1

)∇2f(x3)−

(−s2

)∇3f(x3)

= −6− [−(x− 2)](−11) +(x− 2)(x− 1)

2(−20)− −(x− 2)(x− 1)x

6(−36)

= −6− 11(x− 2)− 10(x− 2)(x− 1)− 6(x− 2)(x− 1)x.

Note that the backward-difference formula does not compute the same form of the interpolatingpolynomial pn(x) as the Newton divided-difference formula. Instead, it computes a different Newtonform of pn(x) given by

pn(x) =

n∑j=0

f [xj , xj+1, . . . , xn]

n∏i=j+1

(x− xi)

= f [xn] + f [xn−1, xn](x− xn) + f [xn−2, xn−1, xn](x− xn−1)(x− xn) +

⋅ ⋅ ⋅+ f [x0, x1, . . . , xn](x− x1)(x− x2) ⋅ ⋅ ⋅ (x− xn−1)(x− xn).

The divided-differences f [xj , . . . , xn], for j = 0, 1, . . . , n, can be obtained by constructing a divided-difference table as in the first example. These divided differences appear in the bottom row of thetable, whereas the divided differences used in the forward-difference formula appear in the top row.□

5