In mathematics, divided differences is an algorithm, historically used for computing tables of logarithms and trigonometric functions.[citation needed] Charles Babbage's difference engine, an early mechanical calculator, was designed to use this algorithm in its operation.[1]
Divided differences is a recursive division process. The method can be used to calculate the coefficients in the interpolation polynomial in the Newton form.
Definition
Given k+1 data points

The forward divided differences are defined as:
![[y_{\nu }]:=y_{\nu },\qquad \nu \in \{0,\ldots ,k\}](https://wikimedia.org/api/rest_v1/media/math/render/svg/f0b559f584afa31efe09d04b4be0e091807e66c6)
![[y_{\nu },\ldots ,y_{{\nu +j}}]:={\frac {[y_{{\nu +1}},\ldots ,y_{{\nu +j}}]-[y_{{\nu }},\ldots ,y_{{\nu +j-1}}]}{x_{{\nu +j}}-x_{\nu }}},\qquad \nu \in \{0,\ldots ,k-j\},\ j\in \{1,\ldots ,k\}.](https://wikimedia.org/api/rest_v1/media/math/render/svg/a3fbf429b65bad77486a9d90314d4af6e5edf0c1)
The backward divided differences are defined as:
![[y_{\nu }]:=y_{{\nu }},\qquad \nu \in \{0,\ldots ,k\}](https://wikimedia.org/api/rest_v1/media/math/render/svg/f0b559f584afa31efe09d04b4be0e091807e66c6)
![[y_{\nu },\ldots ,y_{{\nu -j}}]:={\frac {[y_{\nu },\ldots ,y_{{\nu -j+1}}]-[y_{{\nu -1}},\ldots ,y_{{\nu -j}}]}{x_{\nu }-x_{{\nu -j}}}},\qquad \nu \in \{j,\ldots ,k\},\ j\in \{1,\ldots ,k\}.](https://wikimedia.org/api/rest_v1/media/math/render/svg/a9ca4b8abdebfbfaf509c340f8aa07f1508e8c8b)
Notation
If the data points are given as a function ƒ,

one sometimes writes
![f[x_{\nu }]:=f(x_{{\nu }}),\qquad \nu \in \{0,\ldots ,k\}](https://wikimedia.org/api/rest_v1/media/math/render/svg/7d88b6aba15e3cd2f79af1376a2d5e9b1df1c416)
![f[x_{\nu },\ldots ,x_{{\nu +j}}]:={\frac {f[x_{{\nu +1}},\ldots ,x_{{\nu +j}}]-f[x_{\nu },\ldots ,x_{{\nu +j-1}}]}{x_{{\nu +j}}-x_{\nu }}},\qquad \nu \in \{0,\ldots ,k-j\},\ j\in \{1,\ldots ,k\}.](https://wikimedia.org/api/rest_v1/media/math/render/svg/424ee9e0456399b61b1ed8c66e90ca761fa7dc3e)
Several notations for the divided difference of the function ƒ on the nodes x0, ..., xn are used:
![[x_{0},\ldots ,x_{n}]f,](https://wikimedia.org/api/rest_v1/media/math/render/svg/52676412ab23500b8def307e74643ea7146220fe)
![[x_{0},\ldots ,x_{n};f],](https://wikimedia.org/api/rest_v1/media/math/render/svg/8a0edff404a8cd6ec5f52354e4988a9dfe8badce)
![D[x_{0},\ldots ,x_{n}]f](https://wikimedia.org/api/rest_v1/media/math/render/svg/025c36fb7047d8abf731cb19957cca1f7bd2b23a)
etc.
Example
Divided differences for
and the first few values of
:
![{\begin{aligned}{\mathopen [}y_{0}]&=y_{0}\\{\mathopen [}y_{0},y_{1}]&={\frac {y_{1}-y_{0}}{x_{1}-x_{0}}}\\{\mathopen [}y_{0},y_{1},y_{2}]&={\frac {{\mathopen [}y_{1},y_{2}]-{\mathopen [}y_{0},y_{1}]}{x_{2}-x_{0}}}={\frac {{\frac {y_{2}-y_{1}}{x_{2}-x_{1}}}-{\frac {y_{1}-y_{0}}{x_{1}-x_{0}}}}{x_{2}-x_{0}}}={\frac {y_{2}-y_{1}}{(x_{2}-x_{1})(x_{2}-x_{0})}}-{\frac {y_{1}-y_{0}}{(x_{1}-x_{0})(x_{2}-x_{0})}}\\{\mathopen [}y_{0},y_{1},y_{2},y_{3}]&={\frac {{\mathopen [}y_{1},y_{2},y_{3}]-{\mathopen [}y_{0},y_{1},y_{2}]}{x_{3}-x_{0}}}\end{aligned}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c7c5a021041c0405a351383f2e34f0de88e4e58b)
To make the recursive process more clear, the divided differences can be put in a tabular form:
![{\begin{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}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/d60ef92b00038923edcedaecccbadd25373b07c1)
Properties
![(f+g)[x_{0},\dots ,x_{n}]=f[x_{0},\dots ,x_{n}]+g[x_{0},\dots ,x_{n}]](https://wikimedia.org/api/rest_v1/media/math/render/svg/f9f98450062d604d6056db6fed7a9294708084a8)
![(\lambda \cdot f)[x_{0},\dots ,x_{n}]=\lambda \cdot f[x_{0},\dots ,x_{n}]](https://wikimedia.org/api/rest_v1/media/math/render/svg/5285d5f07af1a864344dc27d700002afb4e4e82e)
![(f\cdot 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}]](https://wikimedia.org/api/rest_v1/media/math/render/svg/534095e5ec06e0a714829f32de106d9c65c62b9e)
- Divided differences are symmetric: If
is a permutation then
![{\displaystyle f[x_{0},\dots ,x_{n}]=f[x_{\sigma (0)},\dots ,x_{\sigma (n)}]}](https://wikimedia.org/api/rest_v1/media/math/render/svg/02ce355ce667f1d9c4825733b42075bb74702610)
where
is in the open interval determined by the smallest and largest of the
's.
Matrix form
The divided difference scheme can be put into an upper triangular matrix.
Let
.
Then it holds


- 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
is a triangular matrix, its eigenvalues are obviously
.
- Let
be a Kronecker delta-like function, that is

- Obviously
, thus
is an eigenfunction of the pointwise function multiplication. That is
is somehow an "eigenmatrix" of
:
. However, all columns of
are multiples of each other, the matrix rank of
is 1. So you can compose the matrix of all eigenvectors from the
-th column of each
. Denote the matrix of eigenvectors with
. Example

- The diagonalization of
can be written as
.
Alternative definitions[edit]
Expanded form[edit]
With the help of a polynomial function
with
this can be written as
![f[x_{0},\dots ,x_{n}]=\sum _{{j=0}}^{{n}}{\frac {f(x_{j})}{q'(x_{j})}}.](https://wikimedia.org/api/rest_v1/media/math/render/svg/d70d0adea806c0745ea62425edf7d02bc19b4215)
Alternatively, we can allow counting backwards from the start of the sequence by defining
whenever
or
. This definition allows
to be interpreted as
,
to be interpreted as
,
to be interpreted as
, etc. The expanded form of the divided difference thus becomes
Yet another characterization utilizes limits:
Partial fractions[edit]
You can represent partial fractions using the expanded form of divided differences. (This does not simplify computation, but is interesting in itself.) If
and
are polynomial functions, where
and
is given in terms of linear factors by
, then it follows from partial fraction decomposition that
![{\frac {p(\xi )}{q(\xi )}}=\left(t\to {\frac {p(t)}{\xi -t}}\right)[x_{1},\dots ,x_{n}].](https://wikimedia.org/api/rest_v1/media/math/render/svg/4c501f97857416ab97cd46a2c7f4ee82c02095e4)
If limits of the divided differences are accepted, then this connection does also hold, if some of the
coincide.
If
is a polynomial function with arbitrary degree
and it is decomposed by
using polynomial division of
by
,
then
![{\frac {p(\xi )}{q(\xi )}}=\left(t\to {\frac {f(t)}{\xi -t}}\right)[x_{1},\dots ,x_{n}].](https://wikimedia.org/api/rest_v1/media/math/render/svg/39b3eb5698ac665c2256ae18c6f25ae8c798e4d5)
Peano form[edit]
The divided differences can be expressed as
![f[x_{0},\ldots ,x_{n}]={\frac {1}{n!}}\int _{{x_{0}}}^{{x_{n}}}f^{{(n)}}(t)B_{{n-1}}(t)\,dt](https://wikimedia.org/api/rest_v1/media/math/render/svg/4ae40d8692899cbc0fdcb156a32205e51c00250b)
where
is a B-spline of degree
for the data points
and
is the
-th derivative of the function
.
This is called the Peano form of the divided differences and
is called the Peano kernel for the divided differences, both named after Giuseppe Peano.
Taylor form[edit]
First order[edit]
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:
for 
This approximation can be turned into an identity whenever Taylor's theorem applies.


You can eliminate the odd powers of
by expanding the Taylor series at the center between
and
:
, that is 



Higher order[edit]
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
to a divided difference
is a linear functional. We can as well apply this functional to the function summands.
Express power notation with an ordinary function:
Regular Taylor series is a weighted sum of power functions:
Taylor series for divided differences:
We know that the first
terms vanish, because we have a higher difference order than polynomial order, and in the following term the divided difference is one:
![{\begin{array}{llcl}\forall j<n&p_{j}[x_{0},\dots ,x_{n}]&=&0\\&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 _{{a\in \{0,\dots ,n\}^{m}{\text{ with }}a_{1}\leq a_{2}\leq \dots \leq a_{m}}}\prod _{{j\in a}}x_{j}.\\\end{array}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/5744582c2f328c1801bd971953ad4f418e94dd9a)
It follows that the Taylor series for the divided difference essentially starts with
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
. The nice thing is, that there is a simpler way.
It holds
![t^{n}=(1-x_{0}\cdot t)\dots \cdot (1-x_{n}\cdot 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 ).](https://wikimedia.org/api/rest_v1/media/math/render/svg/c28497f7cc37231c42f6e0766dac9ac1aa777a90)
Consequently, we can compute the divided differences of
by a division of formal power series. See how this reduces to the successive computation of powers when we compute
for several
.
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[edit]
Divided differences of polynomials are particularly interesting, because they can benefit from the Leibniz rule.
The matrix
with

contains the divided difference scheme for the identity function with respect to the nodes
,
thus
contains the divided differences for the power function with exponent
.
Consequently, you can obtain the divided differences for a polynomial function
with respect to the polynomial
by applying
(more precisely: its corresponding matrix polynomial function
) to the matrix
.

![={\begin{pmatrix}\varphi (p)[x_{0}]&\varphi (p)[x_{0},x_{1}]&\varphi (p)[x_{0},x_{1},x_{2}]&\ldots &\varphi (p)[x_{0},\dots ,x_{n}]\\0&\varphi (p)[x_{1}]&\varphi (p)[x_{1},x_{2}]&\ldots &\varphi (p)[x_{1},\dots ,x_{n}]\\\vdots &\ddots &\ddots &\ddots &\vdots \\0&\ldots &0&0&\varphi (p)[x_{n}]\end{pmatrix}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/e2d023602c65ea4569c811cb08cf09805ba12e81)
This is known as Opitz' formula.[2]
[3]
Now consider increasing the degree of
to infinity,
i.e. turn the Taylor polynomial to a Taylor series.
Let
be a function which corresponds to a power series.
You can compute a divided difference scheme by computing the according matrix series applied to
.
If the nodes
are all equal,
then
is a Jordan block and
computation boils down to generalizing a scalar function to a matrix function using Jordan decomposition.
Forward differences[edit]
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.
Note that the "divided portion" from forward divided difference must still be computed, to recover the forward divided difference from the forward difference.
Definition[edit]
Given n data points

with

the divided differences can be calculated via forward differences defined as


The relationship between divided differences and forward differences is[4]
![{\displaystyle f[x_{0},x_{1},\ldots ,x_{k}]={\frac {1}{k!h^{k}}}\Delta ^{(k)}f(x_{0}).}](https://wikimedia.org/api/rest_v1/media/math/render/svg/2877faf8afce76e86dfec5b133eb20230f37c155)
Example[edit]

See also[edit]