Newton's Divided Differences Formula

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

3.

3 Divided Differences
Suppose that 𝑷𝒏 (𝒙) is the Lagrange polynomial that
interpolates a continuous function 𝒇(𝒙) at {𝒙𝟎 , 𝒙𝟏 , 𝒙𝟐 , … , 𝒙𝒏 }.
Then 𝑷𝒏 (𝒙) can be represented in the following form with
fewer computations than Lagrange:
𝑷𝒏 (𝒙) = 𝒂𝟎 + 𝒂𝟏 (𝒙 − 𝒙𝟎 ) + 𝒂𝟐 (𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 ) + …
+𝒂𝒏 (𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 ) … (𝒙 − 𝒙𝒏−𝟏 )
It is called Newton’s divided differences formula
To find {𝒂𝟎 , 𝒂𝟏 , … , 𝒂𝒏 }
Substituting 𝒙 = 𝒙𝟎
→ 𝒇(𝒙𝟎 ) = 𝑷𝒏 (𝒙𝟎 ) = 𝒂𝟎 → 𝒂𝟎 = 𝒇(𝒙𝟎 ) ≡ 𝒇𝟎
Substituting 𝒙 = 𝒙𝟏
→ 𝒇(𝒙𝟏 ) = 𝑷𝒏 (𝒙𝟏 ) = 𝒂𝟎 + 𝒂𝟏 (𝒙𝟏 − 𝒙𝟎 )
𝒇(𝒙𝟏 ) − 𝒇(𝒙𝟎 )
→ 𝒂𝟏 = ≡ 𝒇𝟎𝟏
𝒙𝟏 − 𝒙𝟎
Substituting 𝒙 = 𝒙𝟐
→ 𝒇(𝒙𝟐 ) = 𝒂𝟎 + 𝒂𝟏 (𝒙𝟐 − 𝒙𝟎 ) + 𝒂𝟐 (𝒙𝟐 − 𝒙𝟎 )(𝒙𝟐 − 𝒙𝟏 )
𝒇𝟏𝟐 − 𝒇𝟎𝟏
→ 𝒂𝟐 = ≡ 𝒇𝟎𝟏𝟐
𝒙𝟐 − 𝒙𝟎
𝒇𝟎 , 𝒇𝟎𝟏 , 𝒇𝟎𝟏𝟐 are called Newton’s divided differences of
order zero, one and two respectively.

1
Newton’s divided differences formula
𝑷𝒏 (𝒙) = 𝒇𝟎 + 𝒇𝟎𝟏 (𝒙 − 𝒙𝟎 ) + 𝒇𝟎𝟏𝟐 (𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 ) + …
+𝒇𝟎𝟏…𝒏 (𝒙 − 𝒙𝟎 )(𝒙 − 𝒙𝟏 ) … (𝒙 − 𝒙𝒏−𝟏 )
Note that this formula is equivalent to Lagrange
interpolation formula but with different form, thus the error
estimate is the same as for Lagrange:
𝒏
𝒇(𝒏+𝟏) (𝒛)
𝑬𝒏 (𝒙) ≅ �|𝒙 − 𝒙𝒊 |
(𝒏 + 𝟏)!
𝒊=𝟎

𝒘𝒉𝒆𝒓𝒆 𝒛 𝒊𝒔𝒂 𝒏𝒖𝒎𝒃𝒆𝒓 𝒘𝒊𝒕𝒉𝒊𝒏 𝒙𝟎 , 𝒙𝟏 , … , 𝒙𝒏 𝒂𝒏𝒅 𝒙

Divided Differences Table

𝒙𝒊 𝒇𝒊 𝒇𝒊,𝒊+𝟏 𝒇𝒊,𝒊+𝟏,𝒊+𝟐 𝒇𝒊,𝒊+𝟏,𝒊+𝟐,𝒊+𝟑


𝒙𝟎 𝒇𝟎
𝒙𝟏 𝒇𝟏 𝒇𝟏 − 𝒇𝟎
𝒇𝟎𝟏 =
𝒙𝟏 − 𝒙𝟎
𝒙𝟐 𝒇𝟐 𝒇𝟐 − 𝒇𝟏 𝒇𝟏𝟐 − 𝒇𝟎𝟏
𝒇𝟏𝟐 = 𝒇𝟎𝟏𝟐 =
𝒙𝟐 − 𝒙𝟏 𝒙𝟐 − 𝒙𝟎
𝒙𝟑 𝒇𝟑 𝒇𝟑 − 𝒇𝟐 𝒇𝟐𝟑 − 𝒇𝟏𝟐 𝒇𝟎𝟏𝟐𝟑
𝒇𝟐𝟑 = 𝒇𝟏𝟐𝟑 =
𝒙𝟑 − 𝒙𝟐 𝒙𝟑 − 𝒙𝟏

2
Example 1 Find the Newton’s divided difference formula
𝟏
that interpolate 𝒇(𝒙) = at {𝒙𝟎 = 𝟏, 𝒙𝟏 = 𝟐, 𝒙𝟐 = 𝟒}.
𝒙
Compute 𝑷𝟐 (𝟎. 𝟓), 𝑷𝟐 (𝟑) and 𝑷𝟐 (𝟓. 𝟓) . Find the exact error
and comment on the results.
Find 𝑷𝟑 (𝒙) if 𝒙𝟑 = 𝟓 and compute 𝑷𝟑 (𝟓. 𝟓).

3
Newton’s divided differences Algorithm
Input: 𝒏; 𝒙𝒊 , 𝒇𝒊 , 𝒊 = 𝟎. . 𝒏
To compute the divided differences:
Set 𝑸[𝒊, 𝟎]: = 𝒇𝒊 for 𝒊 = 𝟎. . 𝒏
𝑸[𝒊,𝒋−𝟏]−𝑸[𝒊+𝟏,𝒋−𝟏]
Calculate 𝑸[𝒊, 𝒋]: =
𝒙𝒊 −𝒙𝒊−𝒋
,

for 𝒋 = 𝟏. . 𝒊; 𝒊 = 𝟏. . 𝒏

To find Newton’s polynomial 𝑷𝒏 (𝒙):


Set 𝑷[𝟎] = 𝑸[𝟎, 𝟎] ∶ 𝒄𝒐𝒆𝒇[𝟎] = 𝟏
For 𝒊 from 1 to 𝒏 do
𝒄𝒐𝒆𝒇[𝒊]: = 𝒄𝒐𝒆𝒇[𝒊 − 𝟏] ∗ (𝒙 − 𝒙[𝒊 − 𝟏])
𝑷[𝒊] = 𝑷[𝒊 − 𝟏] + 𝑸[𝒊, 𝒊] ∗ 𝒄𝒐𝒆𝒇[𝒊]
end do:

Note: For any polynomial of degree 𝒏 the Newton’s divided


differences of order 𝒏 are constant.

4
Example 3: Complete the following divided difference
table and find the Newton’s polynomial of maximum
order:
𝒙 𝟎 = 𝟎 𝒇𝟎 =
𝒙𝟏 =. 𝟒 𝒇𝟏 = 𝒇𝟎𝟏 =
𝒙𝟐 =. 𝟕 𝒇𝟐 = 𝟔 𝒇𝟏𝟐 = 𝟏𝟎 𝒇𝟎𝟏𝟐 = 𝟓𝟎/𝟕

Example 4: The following data are given for a polynomial


𝑷(𝒙) of unknown degree. Determine the polynomial with
maximum degree if all third order divided differences are
1.
𝒙 𝑷(𝒙)
𝟎 𝟐
𝟏 −𝟏
𝟐 𝟒

You might also like