3.3 Divided Differenceszxu2/acms40390F12/Lec-3.3.pdfย ยท 3.3 Divided Differences 1 . Representing...

9
3.3 Divided Differences 1

Transcript of 3.3 Divided Differenceszxu2/acms40390F12/Lec-3.3.pdfย ยท 3.3 Divided Differences 1 . Representing...

Page 1: 3.3 Divided Differenceszxu2/acms40390F12/Lec-3.3.pdfย ยท 3.3 Divided Differences 1 . Representing ๐‘›th Lagrange Polynomial โ€ขIf ...

3.3 Divided Differences

1

Page 2: 3.3 Divided Differenceszxu2/acms40390F12/Lec-3.3.pdfย ยท 3.3 Divided Differences 1 . Representing ๐‘›th Lagrange Polynomial โ€ขIf ...

Representing ๐‘›th Lagrange Polynomial

โ€ข If ๐‘ƒ๐‘› ๐‘ฅ is the ๐‘›th degree Lagrange interpolating polynomial that agrees with ๐‘“ ๐‘ฅ at the points {๐‘ฅ0, ๐‘ฅ1, โ€ฆ , ๐‘ฅ๐‘›}, express ๐‘ƒ๐‘› ๐‘ฅ in the form: ๐‘ƒ๐‘› ๐‘ฅ =๐‘Ž0 + ๐‘Ž1 ๐‘ฅ โˆ’ ๐‘ฅ0 + ๐‘Ž2 ๐‘ฅ โˆ’ ๐‘ฅ0 ๐‘ฅ โˆ’ ๐‘ฅ1 +โ‹ฏ+๐‘Ž๐‘› ๐‘ฅ โˆ’ ๐‘ฅ0 ๐‘ฅ โˆ’ ๐‘ฅ1 ๐‘ฅ โˆ’ ๐‘ฅ2 โ€ฆ ๐‘ฅ โˆ’ ๐‘ฅ๐‘›โˆ’1

โ€ข ? How to find constants ๐‘Ž0,โ€ฆ, ๐‘Ž๐‘›?

2

Page 3: 3.3 Divided Differenceszxu2/acms40390F12/Lec-3.3.pdfย ยท 3.3 Divided Differences 1 . Representing ๐‘›th Lagrange Polynomial โ€ขIf ...

Divided Differences

โ€ข Zeroth divided difference: ๐‘“ ๐‘ฅ๐‘– = ๐‘“(๐‘ฅ๐‘–)

โ€ข First divided difference:

๐‘“ ๐‘ฅ๐‘– , ๐‘ฅ๐‘–+1 =๐‘“ ๐‘ฅ๐‘–+1 โˆ’ ๐‘“ ๐‘ฅ๐‘–๐‘ฅ๐‘–+1 โˆ’ ๐‘ฅ๐‘–

โ€ข Second divided difference:

๐‘“ ๐‘ฅ๐‘– , ๐‘ฅ๐‘–+1, ๐‘ฅ๐‘–+2 =๐‘“ ๐‘ฅ๐‘–+1, ๐‘ฅ๐‘–+2 โˆ’ ๐‘“ ๐‘ฅ๐‘– , ๐‘ฅ๐‘–+1

๐‘ฅ๐‘–+2 โˆ’ ๐‘ฅ๐‘–

โ€ข ๐‘˜th divided difference: ๐‘“ ๐‘ฅ๐‘– , ๐‘ฅ๐‘–+1, โ€ฆ , ๐‘ฅ๐‘–+๐‘˜

=๐‘“ ๐‘ฅ๐‘–+1, ๐‘ฅ๐‘–+2, โ€ฆ , ๐‘ฅ๐‘–+๐‘˜ โˆ’ ๐‘“ ๐‘ฅ๐‘– , ๐‘ฅ๐‘–+1, โ€ฆ , ๐‘ฅ๐‘–+๐‘˜โˆ’1

๐‘ฅ๐‘–+๐‘˜ โˆ’ ๐‘ฅ๐‘–

3

Page 4: 3.3 Divided Differenceszxu2/acms40390F12/Lec-3.3.pdfย ยท 3.3 Divided Differences 1 . Representing ๐‘›th Lagrange Polynomial โ€ขIf ...

โ€ข Finding constants ๐‘Ž0,โ€ฆ, ๐‘Ž๐‘›.

1. ๐‘ฅ = ๐‘ฅ0: ๐‘Ž0 = ๐‘ƒ๐‘› ๐‘ฅ0 = ๐‘“ ๐‘ฅ0 = ๐‘“ ๐‘ฅ0

2. ๐‘ฅ = ๐‘ฅ1: ๐‘“ ๐‘ฅ0 + ๐‘Ž1 ๐‘ฅ1 โˆ’ ๐‘ฅ0 = ๐‘ƒ๐‘› ๐‘ฅ1 =๐‘“ ๐‘ฅ1

โŸน ๐‘Ž1 =๐‘“ ๐‘ฅ1 โˆ’ ๐‘“ ๐‘ฅ0๐‘ฅ1 โˆ’ ๐‘ฅ0

= ๐‘“ ๐‘ฅ0, ๐‘ฅ1

3. In general: ๐‘Ž๐‘˜ = ๐‘“ ๐‘ฅ0, ๐‘ฅ1, โ€ฆ , ๐‘ฅ๐‘˜ for ๐‘˜ = 0,โ€ฆ , ๐‘›

4

Page 5: 3.3 Divided Differenceszxu2/acms40390F12/Lec-3.3.pdfย ยท 3.3 Divided Differences 1 . Representing ๐‘›th Lagrange Polynomial โ€ขIf ...

Newtonโ€™s Interpolatory Divided Difference Formula

๐‘ƒ๐‘› ๐‘ฅ= ๐‘“ ๐‘ฅ0 + ๐‘“ ๐‘ฅ0, ๐‘ฅ1 ๐‘ฅ โˆ’ ๐‘ฅ0+ ๐‘“ ๐‘ฅ0, ๐‘ฅ1, ๐‘ฅ2 ๐‘ฅ โˆ’ ๐‘ฅ0 ๐‘ฅ โˆ’ ๐‘ฅ1 +โ‹ฏ+ ๐‘“ ๐‘ฅ0, โ€ฆ , ๐‘ฅ๐‘› ๐‘ฅ โˆ’ ๐‘ฅ0 ๐‘ฅ โˆ’ ๐‘ฅ1 โ€ฆ(๐‘ฅ โˆ’ ๐‘ฅ๐‘›โˆ’1)

Or ๐‘ƒ๐‘› ๐‘ฅ= ๐‘“ ๐‘ฅ0

+ [๐‘“[๐‘ฅ0, โ€ฆ , ๐‘ฅ๐‘˜] ๐‘ฅ โˆ’ ๐‘ฅ0 โ€ฆ(๐‘ฅ โˆ’ ๐‘ฅ๐‘˜โˆ’1)]

๐‘›

๐‘˜=1

5

Page 6: 3.3 Divided Differenceszxu2/acms40390F12/Lec-3.3.pdfย ยท 3.3 Divided Differences 1 . Representing ๐‘›th Lagrange Polynomial โ€ขIf ...

Table for Computing

6

โ€ฆ

Page 7: 3.3 Divided Differenceszxu2/acms40390F12/Lec-3.3.pdfย ยท 3.3 Divided Differences 1 . Representing ๐‘›th Lagrange Polynomial โ€ขIf ...

Algorithm: Newtonโ€™s Divided Differences

Input: ๐‘ฅ0, ๐‘“ ๐‘ฅ0 , ๐‘ฅ1, ๐‘“ ๐‘ฅ1 , โ€ฆ , ๐‘ฅ๐‘›, ๐‘“ ๐‘ฅ๐‘› Output: Divided differences ๐น0,0, โ€ฆ , ๐น๐‘›,๐‘› //comment: ๐‘ƒ๐‘› ๐‘ฅ = ๐น0,0 + [๐น๐‘–,๐‘– ๐‘ฅ โˆ’ ๐‘ฅ0 โ€ฆ(๐‘ฅ โˆ’ ๐‘ฅ๐‘–โˆ’1)]

๐‘›๐‘–=1

Step 1: For ๐‘– = 0,โ€ฆ , ๐‘› set ๐น๐‘–,0 = ๐‘“(๐‘ฅ๐‘–) Step 2: For ๐‘– = 1,โ€ฆ , ๐‘› For ๐‘— = 1,โ€ฆ , ๐‘–

set ๐น๐‘–,๐‘— =๐น๐‘–,๐‘—โˆ’1โˆ’๐น๐‘–โˆ’1,๐‘—โˆ’1

๐‘ฅ๐‘–โˆ’๐‘ฅ๐‘–โˆ’๐‘—

End End Output(๐น0,0,โ€ฆ๐น๐‘–,๐‘–,โ€ฆ,๐น๐‘›,๐‘›) STOP. 7

Page 8: 3.3 Divided Differenceszxu2/acms40390F12/Lec-3.3.pdfย ยท 3.3 Divided Differences 1 . Representing ๐‘›th Lagrange Polynomial โ€ขIf ...

Theorem. Suppose that ๐‘“ โˆˆ ๐ถ๐‘›[๐‘Ž, ๐‘] and ๐‘ฅ0, ๐‘ฅ1, โ€ฆ , ๐‘ฅ๐‘› are distinct numbers in [๐‘Ž, ๐‘]. Then

โˆƒ๐œ‰ โˆˆ ๐‘Ž, ๐‘ with ๐‘“ ๐‘ฅ0, โ€ฆ , ๐‘ฅ๐‘› =๐‘“ ๐‘› (๐œ‰)

๐‘›!.

Remark: When ๐‘› = 1, itโ€™s just the Mean Value Theorem.

8

Page 9: 3.3 Divided Differenceszxu2/acms40390F12/Lec-3.3.pdfย ยท 3.3 Divided Differences 1 . Representing ๐‘›th Lagrange Polynomial โ€ขIf ...

Example. 1) Complete the following divided difference table. 2) Find the interpolating polynomial.

9