NEWTON'S DIVIDED DIFFERENCE FORMULA
Let us assume that the function f(x) is linear then
we have |
f(xi) - f(xj)
|
|
|
(xi - xj)
|
where xi and xj are any
two tabular points, is independent of xi and xj.
This ratio is called the first divided difference of f(x) relative
to
xi and
xj and is denoted by f
[xi, xj]. That is
f [xi, xj] = |
f(xi) - f(xj)
|
= f [xj, xi] |
|
(xi - xj)
|
Since the ratio is independent of xi and
xj
we can write f [x0, x] = f [x0, x1]
f(x) - f(x0)
|
|
|
|
= |
f [x0, x1]
|
(x - x0)
|
|
|
f(x) = f(x0) + (x - x0)
f [x0, x1]
= |
1
|
| |
f(x0) |
x0 - x
|
| |
|
f1 - f0
|
|
f0x1 - f1x0
|
|
|
|
= |
|
x + |
|
x - x0
|
f(x1) |
x1 - x
|
|
x1 - x0
|
|
x1 - x0
|
So if f(x) is approximated with a linear polynomial
then the function value at any point x can be calculated by using
f(x)
@ P1(x) = f(x0) + (x -
x1) f [x0, x1]
where f [x0, x1] is the first
divided difference of f relative to x0
and x1.
Similarly if f(x) is a second degree polynomial then
the secant slope defined above is not constant but a linear function of
x.
Hence we have
f [x1, x2] - f [x0, x1]
|
|
x2 - x0
|
is independent of x0, x1 and
x2. This ratio is defined as second divided difference of
f
relative
to x0, x1 and x2. The secind
divided difference are denoted as
|
|
f [x1, x2] - f [x0, x1]
|
f [x0, x1, x2] |
= |
|
|
|
x2 - x0
|
Now again since f [x0, x1,x2]
is independent of x0, x1 and x2
we have
f [x1, x0, x] = f [x0, x1,
x2]
f [x0, x] - f [x1, x0] |
|
|
|
= |
f [x0, x1, x2] |
x - x1
|
|
|
f [x0, x] = f [x0, x1] + (x - x1)
f [x0, x1, x2]
f [x] - f [x0] |
|
|
|
= |
f [x0, x1] + (x - x1) f [x0,
x1, x2] |
x - x0
|
|
|
f(x) = f [x0] + (x - x0) f [x0,
x1] + (x - x0) (x - x1) f [x0,
x1, x2]
This is equivalent to the second degree polynomial approximation
passing through three data points
So whenever f(x) is approximated with a second degree
polynomial, the value of f(x) at any point x can be computed
using the above polynomial.
In the same way if we define recursively kth divided
difference by the relation
|
|
f [x1, x2, . . ., xk] - f [x0,
x1, . . ., xk-1]
|
f [x0, x1, . . ., xk] |
= |
|
|
|
xk - x0
|
The kth degree polynomial approximation to
f(x)
can be written as
f(x) = f [x0] + (x - x0) f [x0,
x1] + (x - x0) (x - x1) f [x0,
x1, x2]
+ . . . + (x - x0) (x - x1) . . . (x - xk-1)
f [x0, x1, . . ., xk].
This formula is called Newton's Divided Difference Formula.
Once we have the divided differences of the function f relative
to the tabular points then we can use the above formula to compute f(x)
at any non tabular point.
Computing divided differences using divided difference table:
Let us consider the points (x1, f1), (x2,
f2), (x3, f3) and (x4,
f4) where x1, x2, x3
and x4 are not necessarily equi-distant points then the
divided difference table can be written as
xi
|
fi
|
f [xi, xj]
|
f [xi, xj, xk ]
|
f [xi, xj, xk, xl]
|
|
|
|
|
|
x1
|
f1
|
|
|
|
|
|
f [x1, x2] = |
f2 - f1
|
|
x2 - x1
|
|
|
|
x2
|
f2
|
|
|
|
f [x2, x3] - f [x1, x2]
|
f [x1, x2,x3] |
= |
|
|
|
x3 - x1
|
|
|
|
|
f [x2, x3] = |
f3 - f2
|
|
x3 - x2
|
|
|
|
|
f [x2, x3,x4] - f [x1,
x2,x3]
|
f [x1, x2,x3,x4] |
= |
|
|
|
x4 - x1
|
|
x3
|
f3
|
|
|
|
f [x3, x4] - f [x2, x3]
|
f [x2, x3,x4] |
= |
|
|
|
x4 - x2
|
|
|
|
|
f [x3, x4] = |
f4 - f3
|
|
x4 - x3
|
|
|
|
x4
|
f4
|
|
|
|
Example : Compute
f(0.3)
for the data
x
|
0
|
1
|
3
|
4
|
7
|
f
|
1
|
3
|
49
|
129
|
813
|
using Newton's divided difference formula.
Solution : Divided
difference table
xi
|
fi
|
|
|
|
0
|
1
|
|
|
|
|
|
2
|
|
|
1
|
3
|
|
7
|
|
|
|
23
|
|
3
|
3
|
49
|
|
19
|
|
|
|
80
|
|
3
|
4
|
129
|
|
37
|
|
|
|
228
|
|
|
7
|
813
|
|
|
|
Now Newton's divided difference formula is
f(x) = f [x0] + (x - x0) f [x0,
x1] + (x - x0) (x - x1) f [x0,
x1, x2] + (x - x0) (x - x1)
(x - x2)f [x0, x1, x2,
x3]
f(0.3) = 1 + (0.3 - 0) 2 + (0.3)(0.3 - 1) 7 + (0.3) (0.3 - 1) (0.3
- 3) 3
= 1.831
Since the given data is for the polynomial f(x) = 3x3
- 5x2 + 4x +1 the analytical value is f(0.3) = 1.831
The analytical value is matched with the computed value because
the given data is for a third degree polynomial and there are five data
points available using which one can approximate any data exactly upto
fourth degree polynomial.
Properties
:
1. If f(x) is a polynomial
of degree
N, then the Nth divided difference of
f(x)
is a constant.
Proof : Consider
the divided difference of xn
|
|
(x1+ h)n - xn
|
|
n h xn-1+ . . .
|
Dxn |
= |
|
= |
|
|
|
x + h - x
|
|
h
|
= a polynomial
of degree (n - 1)
Also since divided difference operator
is a linear operator, D of any Nth
degree polynomial is an (N-1)th degree polynomial
and second D is an (N-2)
degree polynomial, so on the Nth
divided difference of an Nth
degree polynomial is a constant.
2. If x0, x1, x2
. . . xn are the (n+1) discrete points then the Nth
divided difference is equal to
|
f0
|
|
fn
|
f[x0, x1, x2 . . . xn]
= |
|
+ . . . + |
|
|
(x0 - x1) . . . (x0 - xn)
|
|
(xn - x0) . . . (xn - xn-1)
|
Proof : If n = 0 Þ
f(x0) = f(x0) hence the result is true let us
assume that the result is valid upto n = k
|
f0
|
|
fk
|
Þ f[x0, x1,
. . . xk] = |
|
+ . . . + |
|
|
(x0 - x1) . . . (x0 - xk)
|
|
(xk - x0) . . . (xk - xk-1)
|
Consider the case n = k + 1
|
f[x1, x2, . . . xk+1]
- f[x0, x1, . . . xk]
|
Þ f[x0, x1,
. . . xk, xk+1] = |
|
|
(xk+1 - x0)
|
|
1
|
[
|
f1
|
|
fk+1
|
]
|
=
|
|
|
+ . . . +
|
|
|
(xk+1 - x0)
|
(x1 - x2) . . . (x1 - xk+1)
|
|
(xk+1 - x1) . . . (xk+1 - xk)
|
|
1
|
[
|
f0
|
|
fk
|
]
|
-
|
|
|
+ . . . +
|
|
|
(xk+1 - x0)
|
(x0 - x1) . . . (x0 - xk)
|
|
(xk - x0) . . . (xk - xk-1)
|
|
f0
|
+
|
f1
|
( |
1
|
|
1
|
) |
|
fk+1
|
=
|
|
|
|
- |
|
+...+ |
|
|
(x0-x1)...(x0-xk+1)
|
(x1-x2)...(x1 - xk)(xk+1
- x0)
|
x1-xk+1 |
|
x1-x0 |
|
(xk+1-x0)...(xk+1-xk)
|
|
f0
|
+
|
f1
|
|
fk+1
|
=
|
|
|
+ . . . +
|
|
|
(x0 - x1) . . . (x0 - xk+1)
|
(x1 - x0) (x1 - x2)
. . . (x1 - xk+1)
|
|
(xk+1 - x0) . . . (xk+1 - xk)
|
3. Sheppard Zigzag rule :
Consider the divided difference table for the data points (x0,
f0), (x1, f1), (x2, f2)
and (x3, f3)
In the difference table the dotted line and the solid line
give two differenct paths starting from the function values to the higher
divided difference's posssible to the function values. The Sheppard's zigzag
rule says the function value at any non-tabulated from the dotted line
or from the solid line are same provided the order of xi
are taken in the direction of the zigzag line. That is any f(x) through
the dotted line can be approximated as
f(x) = f0 + (x - x0) f [x0,
x1] + (x - x0) (x - x1) f [x0,
x1,x2] + (x - x0) (x - x1)
(x - x2)f [x0, x1, x2, x3].
Similarly f(x) over the solid line is euivalent to
f(x) = f2 + (x - x2) f [x1,
x2] + (x - x2) (x - x1) f [x1,
x2,x3] + (x - x2) (x - x1)
(x - x3)f [x0, x1, x2, x3].
Example : Find f(1.5) from the data points
x
|
0
|
0.5
|
1
|
2
|
f(x)
|
1
|
1.8987
|
3.7183
|
11.3891
|
f(1.5) along the dotted line is
f(1.5) = 1 + 1.5 x 1.7974 + 1.5
(1) x 1.8418 + (1.5) (1) (0.5) x
0.4229
= 6.770
Similarly f(1.5) along the solid line is
f(1.5) = 3.7183+(1.5 - 1)x3.6392+(1.5
- 1)(1.5 - 0.5)x2.6877+(1.5 -1)(1.5 -
0.5)(1.5 - 2)x0.4229
= 6.770
The data is given for f(x) = x2 + ex and
the analytical value for f(1.5) = 6.7317
|