DIVIDED DIFFERENCES

In mathematics 'divided differences' is a recursive division process.
The method can be used to calculate the coefficients in the interpolation polynomial in the Newton form.

Contents
Definition
Notation
Example
Properties
Matrix form
Alternative definitions
Expanded form
Partial fractions
Peano form
Taylor form
First order
Higher order
Polynomials and power series
Forward differences
Definition
Example
See also

Definition


Given ''n'' data points
:(x_0, y_0),ldots,(x_{n-1}, y_{n-1})
the 'divided differences' are defined as
:[y_{
u}] := y_{
u} qquad mbox{ , }
u in { 0,ldots,n-1}
:[y_{
u},ldots,y_{
u+j}] := rac{[y_{
u+1},ldots y_{
u+j}] - [y_{
u},ldots y_{
u+j-1}]}{x_{
u+j}-x_{
u}} qquad mbox{ , }
uin{0,ldots,n-j}, jin{1,ldots,n-1}.

Notation


If the data points are given as a function f
:(x_0, f(x_0)),ldots,(x_{n-1}, f(x_{n-1}))
we sometimes write
:f[x_{
u}] := f(x_{
u}) qquad mbox{ , }
u in { 0,ldots,n-1 }
:f[x_{
u},ldots,x_{
u+j}] := rac{f[x_{
u+1},ldots x_{
u+j}] - f[x_{
u},ldots x_{
u+j-1}]}{x_{
u+j}-x_{
u}} qquad mbox{ , }
uin{0,ldots,n-j}, jin{1,ldots,n-1}.
Several notations for the divided difference of the function f on the knots x_0,ldots,x_n are used:

[x_0,ldots,x_n]f,

[x_0,ldots,x_n;f],

D[x_0,ldots,x_n]f etc.

Example


For the first few [y_{
u}] this yields
:
egin{array}{lcl}
[y_0] &=& y_0 \
[y_0,y_1] &=& rac{y_1-y_0}{x_1-x_0} \
[y_0,y_1,y_2] &=& rac{ rac{y_2-y_1}{x_2-x_1}- rac{y_1-y_0}{x_1-x_0}}{x_2-x_0} \
end{array}

To make the recursive process more clear the divided differences can be put in a tabular form
:
egin{matrix}
x_0 & y_0 = [y_0] & & & \
& & [y_0,y_1] & & \
x_1 & y_1 = [y_1] & & [y_0,y_1,y_2] & \
& & [y_1,y_2] & & [y_0,y_1,y_2,y_3]\
x_2 & y_2 = [y_2] & & [y_1,y_2,y_3] & \
& & [y_2,y_3] & & \
x_3 & y_3 = [y_3] & & & \
end{matrix}

Properties



Linearity
:: (f+g)[x_0,dots,x_n] = f[x_0,dots,x_n] + g[x_0,dots,x_n]
:: (lambdacdot f)[x_0,dots,x_n] = lambdacdot f[x_0,dots,x_n]

Leibniz rule
:: (fcdot g)[x_0,dots,x_n] = f[x_0]cdot g[x_0,dots,x_n] + f[x_0,x_1]cdot g[x_1,dots,x_n] + dots + f[x_0,dots,x_n]cdot g[x_n]

★ From the mean value theorem for divided differences it follows that
::lim_{(x_0,dots,x_n) o(xi,dots,xi)} f[x_0,dots,x_n] = rac{f^{(n)}(xi)}{n!}
Matrix form

The divided difference scheme can be put into an upper triangular matrix.
Let T_f(x_0,dots,x_n)=
egin{pmatrix}
f[x_0] & f[x_0,x_1] & f[x_0,x_1,x_2] & ldots & f[x_0,dots,x_n] \
0 & f[x_1] & f[x_1,x_2] & ldots & f[x_1,dots,x_n] \
dots & ddots & ddots & ddots & dots \
0 & ldots & 0 & 0 & f[x_n]
end{pmatrix}.
Then it holds

T_{f+g} x = T_f x + T_g x

T_{fcdot g} x = T_f x cdot T_g x
:: This follows from the Leibniz rule. It means that multiplication of such matrices is commutative. Summarised, the matrices of divided difference schemes with respect to the same set of nodes form a commutative ring.

★ Since T_f x is a triangular matrix, its eigenvalues are obviously f(x_0), dots, f(x_n) .

★ Let delta_xi be a Kronecker delta-like function, that is delta_xi(t) = egin{cases}1 &: t=xi\0 &: mbox{else}end{cases}. Obviously fcdot delta_xi = f(xi)cdot delta_xi, thus delta_xi is an eigenfunction of the pointwise function multiplication. That is T_{delta_{x_i}} x is somehow an "eigenmatrix" of T_f x: T_f x cdot T_{delta_{x_i}} x = f(x_i) cdot T_{delta_{x_i}} x . However, all columns of T_{delta_{x_i}} x are multiples of each other, the matrix rank of T_{delta_{x_i}} x is 1. So you can compose the matrix of all eigenvectors from the i-th column of each T_{delta_{x_i}} x. Denote the matrix of eigenvectors with U x. Example
: U(x_0,x_1,x_2,x_3) = egin{pmatrix}
1 & rac{1}{(x1-x0)} & rac{1}{(x2-x0)cdot(x2-x1)} & rac{1}{(x3-x0)cdot(x3-x1)cdot(x3-x2)} \
0 & 1 & rac{1}{(x2-x1)} & rac{1}{(x3-x1)cdot(x3-x2)} \
0 & 0 & 1 & rac{1}{(x3-x2)} \
0 & 0 & 0 & 1
end{pmatrix}
:The diagonalization of T_f x can be written as
: U x cdot operatorname{diag}(f(x_0),dots,f(x_n)) = T_f x cdot U x .

Alternative definitions


Expanded form


egin{array}{lcl}
f[x_0] &=& f(x_0) \
f[x_0,x_1] &=& rac{f(x_0)}{(x_0-x_1)} + rac{f(x_1)}{(x_1-x_0)} \
f[x_0,x_1,x_2] &=& rac{f(x_0)}{(x_0-x_1)cdot(x_0-x_2)} + rac{f(x_1)}{(x_1-x_0)cdot(x_1-x_2)} + rac{f(x_2)}{(x_2-x_0)cdot(x_2-x_1)} \
f[x_0,x_1,x_2,x_3] &=& rac{f(x_0)}{(x_0-x_1)cdot(x_0-x_2)cdot(x_0-x_3)} + rac{f(x_1)}{(x_1-x_0)cdot(x_1-x_2)cdot(x_1-x_3)} + rac{f(x_2)}{(x_2-x_0)cdot(x_2-x_1)cdot(x_2-x_3)} + rac{f(x_3)}{(x_3-x_0)cdot(x_3-x_1)cdot(x_3-x_2)} \
f[x_0,dots,x_n] &=&
sum_{j=0}^{n} rac{f(x_j)}{prod_{kin{0,dots,n}setminus{j}} (x_j-x_k)}
end{array}

With help of a polynomial function q with q(xi) = (xi-x_1)cdot dots cdot(xi-x_n)
this can be written as
:
f[x_0,dots,x_n] = sum_{j=0}^{n} rac{f(x_j)}{q'(x_j)}
.
Partial fractions

You can represent partial fractions using the expanded form of divided differences.
(This does not simplify computation, but is interesting in itself.)
If p and q are polynomial functions,
where mathrm{deg} p < mathrm{deg} q
and q is given in terms of linear factors by q(xi) = (xi-x_1)cdot dots cdot(xi-x_n),
then it follows from partial fraction decomposition that
: rac{p(xi)}{q(xi)} = left(t o rac{p(t)}{xi-t}
ight)[x_1,dots,x_n]
If limits of the divided differences are accepted,
then this connection does also hold, if some of the x_j coincide.
If f is a polynomial function with arbitrary degree
and it is decomposed by f(x) = p(x) + q(x)cdot d(x) using polynomial division of f by q,
then it holds
: rac{p(xi)}{q(xi)} = left(t o rac{f(t)}{xi-t}
ight)[x_1,dots,x_n].
Peano form

The divided differences can be expressed as
:f[x_0,ldots,x_n] = rac{1}{n!} int_{x_0}^{x_n} f^{(n)}(t)B_{n-1}(t) , dt
where B_{n-1} is a B-spline of degree n-1 for the data points x_0,dots,x_n and f^{(n)} is the n-th derivative of the function f.
This is called the 'Peano form' of the divided differences and B_{n-1} is called the Peano kernel for the divided differences, both named after Giuseppe Peano.
Taylor form

First order

If nodes are cumulated, then the numerical computation of the divided differences is inaccurate, because you divide almost two zeros, each of which with a high relative error due to differences of similar values.
However we know, that difference quotients approximate the derivative and vice versa:
: rac{f(y)-f(x)}{y-x} pprox f'(x) for x pprox y
This approximation can be turned into an identity whenever Taylor's theorem applies.
:f(y) = f(x) + f'(x)cdot(y-x) + f''(x)cdot rac{(y-x)^2}{2!} + f'(x)cdot rac{(y-x)^3}{3!} + dots
:Rightarrow rac{f(y) - f(x)}{y-x} = f'(x) + f''(x)cdot rac{y-x}{2!} + f'(x)cdot rac{(y-x)^2}{3!} + dots
You can eliminate the odd powers of y-x by expanding the Taylor series at the center between x and y:
:x = m-h, y=m+h, that is m = rac{x+y}{2}, h= rac{y-x}{2}
:f(m+h) = f(m) + f'(m)cdot h + f''(m)cdot rac{h^2}{2!} + f'(m)cdot rac{h^3}{3!} + dots
:f(m-h) = f(m) - f'(m)cdot h + f''(m)cdot rac{h^2}{2!} - f'(m)cdot rac{h^3}{3!} + dots
: rac{f(y) - f(x)}{y-x} = rac{f(m+h) - f(m-h)}{2cdot h} =
f'(m) + f'(m)cdot rac{h^2}{3!} + dots
Higher order

The Taylor series or any other representation with function series
can in principle be used to approximate divided differences.
Taylor series are infinite sums of power functions.
The mapping from a function f to a divided difference f[x_0,dots,x_n] is a linear functional.
We can as well apply this functional to the function summands.
Express power notation with an ordinary function: p_n(x) = x^n
Regular Taylor series is a weighted sum of power functions: f = f(0)cdot p_0 + f'(0)cdot p_1 + rac{f''(0)}{2!}cdot p_2 + rac{f'(0)}{3!}cdot p_3 + dots
Taylor series for divided differences: f[x_0,dots,x_n] = f(0)cdot p_0[x_0,dots,x_n] + f'(0)cdot p_1[x_0,dots,x_n] + rac{f''(0)}{2!}cdot p_2[x_0,dots,x_n] + rac{f'(0)}{3!}cdot p_3[x_0,dots,x_n] + dots
We know that the first n terms vanish,
because we have a higher difference order than polynomial order,
and in the following term the divided difference is one:
:
egin{array}{llcl}
orall j & p_n[x_0,dots,x_n] &=& 1 \
& p_{n+1}[x_0,dots,x_n] &=& x_0 + dots + x_n \
& p_{n+m}[x_0,dots,x_n] &=& sum_{ain{0,dots,n}^m ext{ with } a_1 le a_2 le dots le a_m} prod_{jin a} x_j \
end{array}

It follows that the Taylor series for the divided difference essentially starts with
rac{f^{(n)}(0)}{n!}
which is also a simple approximation of the divided difference,
according to the mean value theorem for divided differences.
If we would have to compute the divided differences for the power functions
in the usual way, we would encounter the same numerical problems
that we had when computing the divided difference of f.
The nice thing is, that there is a simpler way.
It holds
:
t^n = (1 - x_0cdot t) dots cdot (1 - x_ncdot t) cdot
(p_0[x_0,dots,x_n] + p_1[x_0,dots,x_n]cdot t + p_2[x_0,dots,x_n]cdot t^2 + dots) .

Consequently we can compute the divided differences of p_n
by a division of formal power series.
See how this reduces to the successive computation of powers
when we compute p_n[h] for several n.
Cf. an implementation in Haskell.
If you need to compute a whole divided difference scheme with respect to a Taylor series,
see the section about divided differences of power series.

Polynomials and power series


Divided differences of polynomials are particularly interesting, because they can benefit from the Leibniz rule.
The matrix J with
:
J=
egin{pmatrix}
x_0 & 1 & 0 & 0 & cdots & 0 \
0 & x_1 & 1 & 0 & cdots & 0 \
0 & 0 & x_2 & 1 & & 0 \
dots & dots & & ddots & ddots & \
0 & 0 & 0 & 0 & & x_n
end{pmatrix}

contains the divided difference scheme for the identity function with respect to the nodes x_0,dots,x_n,
thus J^n contains the divided differences for the power function with exponent n.
Consequently you can obtain the divided differences for a polynomial function arphi(p)
with respect to the polynomial p
by applying p (more precisely: its corresponding matrix polynomial function arphi_{mathrm{M}}(p)) to the matrix J.
: arphi(p)(xi) = a_0 + a_1cdot xi + dots + a_ncdot xi^n
: arphi_{mathrm{M}}(p)(J) = a_0 + a_1cdot J + dots + a_ncdot J^n
::= egin{pmatrix}
arphi(p)[x_0] & arphi(p)[x_0,x_1] & arphi(p)[x_0,x_1,x_2] & ldots & arphi(p)[x_0,dots,x_n] \
0 & arphi(p)[x_1] & arphi(p)[x_1,x_2] & ldots & arphi(p)[x_1,dots,x_n] \
dots & ddots & ddots & ddots & dots \
0 & ldots & 0 & 0 & arphi(p)[x_n]
end{pmatrix}

Now consider increasing the degree of p to infinity,
i.e. turn the Taylor polynomial to a Taylor series.
Let f be a function which corresponds to a power series.
You can compute a divided difference scheme by computing the according matrix series applied to J.
If the nodes x_0,dots,x_n are all equal,
then J is a Jordan block and
computation boils down to generalizing a scalar function to a matrix function using Jordan decomposition.

Forward differences


When the data points are equidistantly distributed we get the special case called 'forward differences'. They are easier to calculate than the more general divided differences.
Definition

Given ''n'' data points
:(x_0, y_0),ldots,(x_{n-1}, y_{n-1})
with
:x_{
u} = x_0 +
u h mbox{ , } h > 0 mbox{ , }
u=0,ldots,n-1
the divided differences can be calculated via 'forward differences' defined as
: riangle^{(0)}y_{i} := y_{i}
: riangle^{(k)}y_{i} := riangle^{(k-1)}y_{i+1} - riangle^{(k-1)}y_{i} mbox{ , } k ge 1.
Example

:
egin{matrix}
y_0 & & & \
& riangle y_0 & & \
y_1 & & riangle^{2} y_0 & \
& riangle y_1 & & riangle^{3} y_0\
y_2 & & riangle^{2} y_1 & \
& riangle y_2 & & \
y_3 & & & \
end{matrix}

See also



Polynomial interpolation

Mean value theorem for divided differences

This article provided by Wikipedia. To edit the contents of this article, click here for original source.

psst.. try this: add to faves