Untitled 4
Untitled 4
f(xi) - f(xj)
Let us assume that the function f(x) is linear then we have
(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) - f(xj)
f [xi, 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)
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
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 [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
x0 x1 x2
f0 f1 f2
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(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
x1 f1
f2 - f 1
f [x1, x2] =
x2 - x1
f [x2, x3] - f [x1, x2]
x2 f2
f [x1, x2,x3] =
x3 - x1
f3 - f 2 f [x2, x3,x4] - f [x1, x2,x3]
f [x2, x3] = f [x1, x2,x3,x4] =
x3 - x2 x4 - x1
f [x3, x4] - f [x2, x3]
x3 f3 f [x2, x3,x4] =
x4 - x2
f4 - f 3
f [x3, x4] =
x4 - x3
x4 f4
x 0 1 3 4 7
f 1 3 49 129 813
xi fi
0 1
2
1 3 7
23 3
3 49 19
80 3
4 129 37
228
7 813
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]
= 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.
= 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)
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)
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].
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].
x 0 0.5 1 2
f(x) 1 1.8987 3.7183 11.3891
The data is given for f(x) = x2 + ex and the analytical value for f(1.5) = 6.7317
Solution of Transcendental Equations | Solution of Linear System of Algebraic Equations | Interpolation & Curve Fitting
Numerical Differentiation & Integration | Numerical Solution of Ordinary Differential Equations
Numerical Solution of Partial Differential Equations
search