0% found this document useful (0 votes)
69 views11 pages

Assignment Numerical Analysis: Topic

Here are the steps to solve this problem using Newton's divided difference formula: 1. Construct the divided difference table: x f(x) f[x] f[x,x0] f[x,x1,x0] 0 648 648 2 704 56/(2-0) 3 729 24/(3-2) 2. Write the cubic interpolation polynomial: f(x) = 648 + 56(x-0) + 24(x-0)(x-2) 3. Evaluate the polynomial at x = 4: f(4) = 648 + 56

Uploaded by

Laiba Laiba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views11 pages

Assignment Numerical Analysis: Topic

Here are the steps to solve this problem using Newton's divided difference formula: 1. Construct the divided difference table: x f(x) f[x] f[x,x0] f[x,x1,x0] 0 648 648 2 704 56/(2-0) 3 729 24/(3-2) 2. Write the cubic interpolation polynomial: f(x) = 648 + 56(x-0) + 24(x-0)(x-2) 3. Evaluate the polynomial at x = 4: f(4) = 648 + 56

Uploaded by

Laiba Laiba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Assignment Numerical Analysis

Topic:
NEWTON'S DIVIDED DIFFERENCE FORMULA

Group Members:
Muhammad Talha Saeed (MCF 1900271)
Faisal Abbas (MCF 1900101)
Muhammad Behzad (MCF 1900228)
Laiba (MCF 1900356)
Rabia Nawaz (MCF 1800530)

Submitted By:
Group# 2(MSC 3rd Morning)

Submitted to:
DR. Umer Saleem sb
Outlines
• Divided Difference Operator

• Newton’s Divided Difference Method

• Example
Divided Difference Operator:
Let 𝑓(𝑥𝑜 ),f(𝑥1), f(𝑥2), 𝑓(𝑥 3), …
f(𝑥 𝑛 ) be the entry of values of the function y= f(𝑥 𝑛 )
at argument 𝑥0, 𝑥1,𝑥2,𝑥3,...., 𝑥 𝑛 which are not
equally spaced.
Divided difference can now be
defined as
the difference between two successive value
of the
entry divided by the difference between the
corresponding value of the argument.
𝑓 (𝑥 1 )− 𝑓 ( 𝑥 0 )
Therefore, the first
and is denoted by f(𝑥divided
0, 𝑥1 ) or [𝑥0, 𝑥1 ]
𝑥 1− 𝑥 𝑜
difference of 𝑓(𝑥 1 )− 𝑓 (𝑥 0 )
𝑜, 1 𝑜 1
f(𝑥) for f(𝑥 𝑥 ) = [𝑥 ,𝑥𝑥0 and
the arguments ] 𝑥𝑥 1−
1 is
𝑥 0defined as
Similarly,
=
𝑓(𝑥 2 )− 𝑓 (𝑥 1 )
f(𝑥 , 𝑥 ) = [𝑥 , 𝑥 ] = and so on.
1 2 1 2 𝑥 2 −𝑥 1
The second divided difference of f ( 𝑥 ) for three
arguments 𝑥𝑜,𝑥1𝑎𝑛𝑑 𝑥2 is defined as
𝑓(𝑥 1 ,𝑥 2 )−𝑓(𝑥 1 ,𝑥 𝑜 )
f(𝑥𝑜, 𝑥 1, 𝑥 2)= [𝑥 ,𝑜𝑥 ,1𝑥2]=
𝑥 2 −𝑥 0

Which is also denoted by ∆2 f( 𝑥 ) .

The Divided Difference Table is:


Argument Entry 1st divided 2nd divided 3rd divided
(𝑥) f( 𝑥 ) difference difference difference ∆3 f ( 𝑥 )
∆ 1 f( 𝑥 ) ∆2 f( 𝑥 )
𝑥0 f(𝑥 𝑜 )
f(𝑥0,𝑥1)
𝑥1 f(𝑥1) f(𝑥𝑜, 𝑥1, 𝑥 2 )
f(𝑥1,𝑥2) f(𝑥𝑜 𝑥1𝑥2𝑥3)
𝑥2 f(𝑥 2) f(𝑥1, 𝑥2, 𝑥 3 )
f(𝑥2,𝑥3)
𝑥3 f(𝑥 3)

Newton's Divided Difference Polynomial Method:


To illustrate this method, linear and quadratic
interpolation is presented first. Then, the general
form of Newton's divided difference polynomial
method is presented. To illustrate the general form,
cubic interpolation is shown in Figure 1.
Linear Interpolation:
Given (𝑥𝑜 , 𝑦𝑜 ) 𝑎𝑛𝑑 (𝑥1, 𝑦 1), fit a linear interpolation
through the data. Nothing y=f ( 𝑥 ) and 𝑦1 = 𝑓(𝑥 1),
assume the linear interpolant 𝑓1(𝑥) is given by
Figure 2.
𝑓1(𝑥) = 𝑏𝑜 + 𝑏1(𝑥 − 𝑥 𝑜 )
Since at ( 𝑥 = 𝑥 𝑜 ) ,
𝑓 1( 𝑥 𝑜 ) =
𝑓 ( 𝑥 𝑜 ) = 𝑏𝑜
+ 𝑏1(𝑥 −
𝑥 𝑜 ) = 𝑏𝑜
and𝑏at ( 𝑥𝑓(𝑥
1 = =1 )−𝑥1)𝑓,(𝑥 0 )
𝑥 1− 𝑥 𝑜
So, 𝑓 1( 𝑥 1) = 𝑓 ( 𝑥 1 ) = 𝑏𝑜 + 𝑏1(𝑥 − 𝑥 𝑜 )

𝑏𝑜 = 𝑓(𝑥 𝑜 ) = 𝑓 ( 𝑥 𝑜 ) + 𝑏1(𝑥 − 𝑥 𝑜 )
Giving
𝑏1 = 𝑓(𝑥 1 )− 𝑓 (𝑥 0 )
𝑥 1− 𝑥 𝑜
Giving the linear interpolant as
𝑓1(𝑥) = 𝑏𝑜 + 𝑏 1(𝑥 − 𝑥 𝑜 )
𝑓 ( 𝑥 1)− 𝑓 ( 𝑥 0)
1
𝑓 ( 𝑥) = 𝑓 ( 𝑥 ) + 𝑥 𝑥 ( 𝑥 − 𝑥𝑜 )
𝑜 1− 𝑜
Quadratic interpolation:
Given (𝑥𝑜 , 𝑦𝑜 ), (𝑥1, 𝑦 1) and (𝑥2, 𝑦2), fit a quadratic
interpolation through the data. Nothing y=f(𝑥), 𝑦𝑜 =
𝑓 (𝑥 𝑜 ) , 𝑦1 = 𝑓(𝑥 1) and 𝑦2 = 𝑓(𝑥 2), assume the
quadratic interpolant 𝑓2(𝑥) is given by
𝑓2(𝑥) = 𝑏𝑜 + 𝑏1(𝑥 − 𝑥 𝑜 ) + 𝑏2(𝑥 − 𝑥 𝑜 )( 𝑥 − 𝑥 1)
At ( 𝑥 = 𝑥 𝑜 )
𝑓 2(𝑥 𝑜 ) = 𝑓(𝑥 𝑜 ) = 𝑏𝑜 + 𝑏1(𝑥 − 𝑥 𝑜 ) + 𝑏 2(𝑥 − 𝑥 𝑜 )( 𝑥
− 𝑥1)
= 𝑏𝑜
𝑏𝑜 = 𝑓 ( 𝑥 𝑜 )
At ( 𝑥 = 𝑥 1 )
𝑓2(𝑥1) = 𝑓(𝑥𝑓(𝑥
1 ) 1=)−𝑏𝑜𝑓 (𝑥
+ 0𝑏)1(𝑥1 − 𝑥 𝑜 ) + 𝑏2(𝑥1 − 𝑥 𝑜 )( 𝑥 1
− 𝑥 1) 𝑏1 =
𝑓(𝑥 1 ) 𝑥=1−𝑓(𝑥
𝑥 𝑜 𝑜 ) + 𝑏1(𝑥1 − 𝑥 𝑜 )
At ( 𝑥 = 𝑥 2 )
giving
𝑓2(𝑥2) = 𝑓(𝑥 2 ) =𝑓 (𝑥𝑏1)−
𝑜 +𝑓 (𝑥𝑏)01(𝑥2 − 𝑥 𝑜 ) + 𝑏2(𝑥 2 − 𝑥 𝑜 )( 𝑥 2 − 𝑥 1 )
𝑓(𝑥 2) = 𝑓 ( 𝑥 ) + 𝑥 1− 𝑥 𝑜
( 𝑥2 − 𝑥 𝑜 ) + 𝑏2(𝑥2 − 𝑥 𝑜 )( 𝑥 2 − 𝑥 1 )
𝑜

giving 𝑓 (𝑥 2 )− 𝑓 (𝑥 1 ) − 𝑓(𝑥 1 )− 𝑓 (𝑥 0 )
𝑏2 𝑥 2− 𝑥 1

𝑥 1− 𝑥 𝑜 𝑥 2 −𝑥 𝑜
=
Hence the quadratic interpolant is given by
𝑓2(𝑥) = 𝑏𝑜 +𝑓 (𝑥𝑏1)−
1( 𝑥
𝑓 (𝑥−)0 𝑥 𝑜 ) + 𝑏 2 ( 𝑥 − 𝑥 𝑜 )( 𝑥 − 𝑥 1 )
= 𝑓 ( 𝑥 𝑜) + 𝑥 1− 𝑥 𝑜
(𝑥2 − 𝑥 𝑜 ) +
𝑓 (𝑥 2 )− 𝑓 (𝑥 1 ) −𝑓 (𝑥 1 )− 𝑓 (𝑥 0 )
𝑥 2− 𝑥 1 𝑥 1− 𝑥 𝑜
𝑥 2 −𝑥 𝑜 ( 𝑥 − 𝑥 𝑜 )( 𝑥 − 𝑥 1 )

General Form Of Newton's Divided Difference


Polynomial:
In the two previous cases, we found linear and
quadratic interpolants for Newton's divided
difference method. Let us revisit the quadratic
interpolant formula
𝑓2(𝑥) = 𝑏𝑜 + 𝑏1(𝑥 − 𝑥 𝑜 ) + 𝑏2(𝑥 − 𝑥 𝑜 )( 𝑥 − 𝑥 1)
where
𝑏𝑜 = 𝑓 ( 𝑥 𝑜 )
𝑏1 = 𝑓 ( 𝑥 1 ) − 𝑓 ( 𝑥 0 )
𝑥 𝑥
1− 𝑜
𝑓 (𝑥 2 )− 𝑓 (𝑥 1 ) 𝑓(𝑥 1 )− 𝑓 (𝑥 0 )

𝑏2 𝑥 2− 𝑥 1

𝑥 1− 𝑥 𝑜 𝑥 2 −𝑥 𝑜
=
Note that 𝑏𝑜, 𝑏1, 𝑎𝑛𝑑 𝑏2 are finite divided
differences. 𝑏𝑜, 𝑏1, 𝑎𝑛𝑑 𝑏2 are the first, second and
third finite divided differences respectively. We
denote the first divided difference by
f[𝑥𝑜] = 𝑓 ( 𝑥 𝑜 )
the second divided difference by
f[𝑥 , 𝑥 ] = 𝑓 ( 𝑥 1 ) − 𝑓 ( 𝑥 0 )
1
𝑜 𝑥 1− 𝑥 𝑜
and the third divided difference by
𝑓 (𝑥 2 )− 𝑓 (𝑥 1 ) 𝑓(𝑥 1 )− 𝑓 (𝑥 0 )

f[𝑥2 , 𝑥1 , 𝑥 ] 𝑥 2− 𝑥 1

𝑥 1− 𝑥 𝑜 𝑥 2 −𝑥 𝑜
= 𝑜
where f[𝑥𝑜], f[𝑥1, 𝑥 𝑜 ] and f[𝑥2, 𝑥1, 𝑥 𝑜 ] are called
bracketed functions of their variables enclosed in
square brackets.
Rewriting,
𝑓2(𝑥) =f[𝑥𝑜 ] + f[𝑥1, 𝑥 𝑜 ](𝑥 − 𝑥 𝑜 ) + f[𝑥2, 𝑥1, 𝑥 𝑜 ]( 𝑥 − 𝑥 𝑜 )( 𝑥 −
𝑥1)
This leads up to writing the general form of the
Newton's divided difference polynomial for n+1
data pints, (𝑥𝑜 , 𝑦𝑜), (𝑥1, 𝑦1), … . ( 𝑥 𝑛 , 𝑦 𝑛−1),(𝑥 𝑛 ,
𝑦 𝑛 ),as
𝑓 𝑛 (𝑥) = 𝑏𝑜 + 𝑏1(𝑥 − 𝑥 𝑜 ) … + 𝑏 𝑛 ( 𝑥 − 𝑥 𝑜 )( 𝑥 − 𝑥 1 ) … (𝑥 −
𝑥 𝑛 −1 )
where
𝑏𝑜 = 𝑓 [ 𝑥 𝑜 ]
𝑏1 = f[𝑥1, 𝑥 𝑜 ]
𝑏2 = f[𝑥2, 𝑥1, 𝑥 𝑜 ]
.
.
.
𝑏𝑛−1 = f[𝑥𝑛−1, 𝑥𝑛−2, … . . , 𝑥 𝑜 ]
𝑏𝑛 = f[𝑥𝑛, 𝑥𝑛−1, … . . , 𝑥 𝑜 ]
where the definition of the 𝑚 𝑡 ℎ divided
difference is
𝑏 𝑚 = f[𝑥 𝑚 , … . . … . . , 𝑥 𝑜 ]
𝑓[𝑥 ,…..…..,𝑥1]−𝑓[𝑥𝑚−1,…..…..,𝑥𝑜]
= 𝑚
𝑥 𝑚 −𝑥 𝑜
From the above definition, it can be seen that the
divided differences are calculated recursively.
For example of a third order polynomial given
( 𝑥 𝑜 , 𝑦𝑜), (𝑥1, 𝑦1), (𝑥2, 𝑦 2 ) and (𝑥 3𝑦 3).
𝑓3(𝑥) =f[𝑥𝑜 ] + f[𝑥1, 𝑥 𝑜 ](𝑥 − 𝑥 𝑜 ) + f[𝑥2, 𝑥1, 𝑥 𝑜 ]( 𝑥
− 𝑥 𝑜 )( 𝑥 − 𝑥 1 ) +
𝑓[𝑥3, 𝑥2, 𝑥1, 𝑥 𝑜 ]( 𝑥 − 𝑥 𝑜 )( 𝑥 − 𝑥 1 )
(𝑥 − 𝑥 2 )
Example:
Use Newton's divided difference formula to find f ( 𝑥 ) and f(4).Given
that
𝑥 0 2 3 6
f( 𝑥 ) 648 704 729 792
Solution:
Divided Difference Table:
𝑥 f( 𝑥 ) ∆ f( 𝑥 ) ∆ 2 f( 𝑥 ) ∆3f( 𝑥 )
0 648
28
2 704 −1
25 0
3 729 −1
21
6 792
By using Newton's Divided Difference Formula:
𝑓 ( 𝑥 ) =f[𝑥𝑜 ] + f[𝑥1, 𝑥 𝑜 ](𝑥 − 𝑥 𝑜 ) + f[𝑥2, 𝑥1, 𝑥 𝑜 ](𝑥 − 𝑥 𝑜 )( 𝑥 − 𝑥 1 )
+
𝑓[𝑥3𝑥2𝑥 1𝑥𝑜 ](𝑥 − 𝑥 𝑜 )( 𝑥 − 𝑥 1 )(𝑥 − 𝑥 2 )
=648+(𝑥 − 0)(28)+ (𝑥 − 0)(𝑥 − 1)(−1) + 0
𝑓 ( 𝑥 ) = −𝑥2 + 30𝑥 + 648
When 𝑥 = 4
𝑓 ( 4 ) = −(4)2 + 30(4) + 648
𝑓 ( 4 ) = 752

You might also like