0% found this document useful (0 votes)
26 views

In Our Last Lecture The Work To Do Was

The document discusses using Newton divided difference interpolating polynomials of degrees 1, 2, and 3 to approximate the value of f(0.9), given values of f at points 0.6, 0.7, 0.8, and 1.0. It also calculates the actual value of f(0.9) using the function f(x) = sin(e^x - 2) and compares it to the approximated values from the polynomials. The polynomials of degrees 1 and 2 do not closely approximate the actual value of f(0.9), but the degree 3 polynomial approximation is very close to the actual value.

Uploaded by

Shayan Ahmed
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

In Our Last Lecture The Work To Do Was

The document discusses using Newton divided difference interpolating polynomials of degrees 1, 2, and 3 to approximate the value of f(0.9), given values of f at points 0.6, 0.7, 0.8, and 1.0. It also calculates the actual value of f(0.9) using the function f(x) = sin(e^x - 2) and compares it to the approximated values from the polynomials. The polynomials of degrees 1 and 2 do not closely approximate the actual value of f(0.9), but the degree 3 polynomial approximation is very close to the actual value.

Uploaded by

Shayan Ahmed
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

In our last lecture the work to do was

Q5(d). Use Newton divided difference interpolating polynomials of degrees 1, 2, and 3 to


approximate f (0.9), if f (0.6) = −0.17694460, f (0.7) = 0.01375227, f (0.8) = 0.22363362,
f (1.0) = 0.65809197.
Then, calculate actual value of f(0.9) using the function𝑓(𝑥) = sin(𝑒 𝑥 − 2) and
compare it with values obtained from polynomials of degrees 1, 2, and 3.
Solution:
x f(x) First divided Second divided Third divided
differences differences differences

𝒙𝟎 = 𝟎. 𝟔 𝑓[𝑥0 ] = −0.1769446

1.9069687

𝒙𝟏 = 𝟎. 𝟕 𝑓[𝑥1 ] =0.01375227 0.959224

2.0988135 −1.78573125

𝒙𝟐 = 𝟎. 𝟖 𝑓[𝑥2 ] =0.22363362 0.24492275

2.17229175

𝒙𝟑 = 𝟏. 𝟎 𝑓[𝑥3 ] =0.65809197

So, 𝑃1 (𝑥) = 𝑓(𝑥0 ) + (𝑥 − 𝑥0 )𝑓[𝑥0 , 𝑥1 ]


= −0.1769446 + 1.9069687 (𝑥 − 0.6)
⇒ 𝑃1 (0.9) = 0.39514601
𝑃2 (𝑥) = 𝑓(𝑥0 ) + (𝑥 − 𝑥0 )𝑓[𝑥0 , 𝑥1 ] + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )𝑓[𝑥0 , 𝑥1 , 𝑥2 ]

= −0.1769446 + 1.9069687 (𝑥 − 0.6) + 0.959224(𝑥 − 0.6)(𝑥 − 0.7)


𝑃2 (0.9) = 0.45269945

𝑃3 (𝑥) = 𝑓(𝑥0 ) + (𝑥 − 𝑥0 )𝑓[𝑥0 , 𝑥1 ] + (𝑥 − 𝑥0 )(𝑥 − 𝑥1 )𝑓[𝑥0 , 𝑥1 , 𝑥2 ]


+(𝑥 − 𝑥0 )(𝑥 − 𝑥1 )(𝑥 − 𝑥2 )𝑓[𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 ]

= −0.1769446 + 1.9069687 (𝑥 − 0.6) + 0.959224(𝑥 − 0.6)(𝑥 − 0.7)


− 1.78573125(𝑥 − 0.6)(𝑥 − 0.7)(𝑥 − 0.8)
𝑃3 (0.9) = 0.44198506
Now, actual value of f(0.9) using the function
𝑓(𝑥) = sin(𝑒 𝑥 − 2)
is 𝑓(0.9) = 0.44359244

We can see that 𝑓(0.9) obtained from 𝑃1 (𝑥) and 𝑃2 (𝑥) is not much closer to exact. If
we use lower edge of divided difference table triangle then it is called Newton
backward divided difference formula

𝑃1 (𝑥) = 𝑓(𝑥3 ) + (𝑥 − 𝑥3 )𝑓[𝑥2 , 𝑥3 ]


= 0.65809197 + 2.17229175 (𝑥 − 1.0)
⇒ 𝑃1 (0.9) = 0.4408628

𝑃2 (𝑥) = 𝑓(𝑥3 ) + (𝑥 − 𝑥3 )𝑓[𝑥2 , 𝑥3 ] + (𝑥 − 𝑥3 )(𝑥 − 𝑥2 )𝑓[𝑥1 , 𝑥2 , 𝑥3 ]

= 0.65809197 + 2.17229175 (𝑥 − 1.0) + 0.24492275(𝑥 − 1.0)(𝑥 − 0.8)


𝑃2 (0.9) = 0.43841357

𝑃3 (𝑥) = 𝑓(𝑥3 ) + (𝑥 − 𝑥3 )𝑓[𝑥2 , 𝑥3 ] + (𝑥 − 𝑥3 )(𝑥 − 𝑥2 )𝑓[𝑥1 , 𝑥2 , 𝑥3 ]


+(𝑥 − 𝑥3 )(𝑥 − 𝑥2 )(𝑥 − 𝑥1 )𝑓[𝑥0 , 𝑥1 , 𝑥2 , 𝑥3 ]

= −0.1769446 + 1.9069687 (𝑥 − 0.6)) + 0.24492275(𝑥 − 1.0)(𝑥 − 0.8)


− 1.78573125(𝑥 − 1.0)(𝑥 − 0.8)(𝑥 − 0.7)
𝑃3 (0.9) = 0.44198504

You might also like