Numerical Analysis/Divided differences

From testwiki
Jump to navigation Jump to search

The Expanded Form of the Definition

The usual definition of divided differences is equivalent to the Expanded form Template:NumBlk With help of a polynomial functions q with q(ξ)=(ξx0)(ξxn) this can be written as

f[x0,,xn]=j=0nf(xj)q(xj).

Since we will need the Expanded form (Template:EquationNote) for our other work below, we first prove that it is equivalent to the usual definition.

Proof of the expanded form

For n=1, (Template:EquationNote) holds because

f[x0,x1]=f[x1]f[x0]x1x0=f(x0)(x0x1)+f(x1)(x1x0).

We now assume (Template:EquationNote) holds for n and show that this implies it also holds for n+1. Thus by induction it holds for all n.

If the formula f[x0,x1,,xn]=j=0nf(xj)q(xj), where q(ξ)=k=0n(ξxk), then denoting q1(ξ)=k=1n+1(ξxk), q2(ξ)=k=0n(ξxk) and Q(ξ)=k=0n+1(ξxk), we have

f[x0,x1,,xn+1]=f[x1,,xn+1]f[x0,,xn]xn+1x0=1xn+1x0(j=0nf(xj+1)q1(xj+1)j=0nf(xj)q2(xj))=1xn+1x0(k=1n+1f(xk)q1(xk)k=0nf(xk)q2(xk))=1xn+1x0(f(xn+1)q1(xn+1)+k=1nf(xk)(1q1(xk)1q2(xk))f(x0)q2(x0)).

We have,

(xn+1x0)q1(xn+1)=(xn+1x0)k=1n(xn+1xk)=k=0n(xn+1xk)=Q(xn+1),
(xn+1x0)q2(x0)=(xn+1x0)k=1n(x0xk)=k=1n+1(x0xk)=Q(x0)

and

1q1(xk)1q2(xk)=j=1,jkn+11xkxjj=0,jkn1xkxj=j=0,jkn+11xkxj(xkx0(xkxn+1))=(xn+1x0)j=0,jkn+11xkxj,

which gives

f[x0,x1,,xn+1]=j=0n+1f(xj)Q(xj+1)=j=0n+1f(xj)k{0,,n}{j}(xjxk).

Hence, since the assertion holds for n=1 and n+1, then by induction, the assertion holds for all positive integer n.

Symmetry property of divided differences

The divided differences have a number of special properties that can simplify work with them. One of the property is called the Symmetry Property which states that the Divided differences remain unaffected by permutations (rearrangement) of their variables.

Now we prove this symmetry property by showing that

f[x0,x1,xn]=f[x1,x0,xn]etc.

When n=1, we have

f[x1,x0]=f[x1]f[x0]x1x0=f(x0)(x0x1)+f(x1)(x1x0)=f[x0]f[x1]x0x1=f[x0,x1].

Hence f[x1,x0]=f[x0,x1], which is the symmetry of the first divided difference.

When n=2, we have

f[x2,x1,x0]=f[x2,x1]f[x1,x0]x2x0=f[x2]f[x1]x2x1f[x1]f[x0]x1x0x2x0=f(x2)(x2x0)(x2x1)+f(x1)(x1x0)(x1x2)+f(x0)(x0x1)(x0x2)=f[x0,x1,x2]=f[x1,x0,x2]etc.

Hence f[x2,x1,x0]=f[x0,x1,x2]=f[x1,x0,x2] etc., which is the symmetry of the second divided difference.

Similarly, when n=3 we have

f[x3,x2,x1,x0]=f[x3,x2,x1]f[x2,x1,x0]x3x0=f(x0)(x0x1)(x0x2)(x0x3)+f(x1)(x1x0)(x1x2)(x1x3)+f(x2)(x2x0)(x2x1)(x2x3)+f(x3)(x3x0)(x3x1)(x3x2)=f[x0,x1,x2,x3]=f[x1,x0,x2,x3]etc.

Hence f[x3,x2,x1,x0]=f[x0,x1,x2,x3]=f[x1,x0,x3,x2] etc., which is the symmetry of the third divided difference.

In general, we can use the Expanded Form (Template:EquationNote) to obtain

f[x0,x1,xn]=j=0nf(xj)k{0,,n}{j}(xjxk)=f[x1,x0,xn]etc.

Hence f[x0,x1,xn]=f[x1,x0,xn] etc., which is the symmetry of the nth divided difference.

Computing the divided differences in tabular form

A difference table is again a convenient device for displaying differences, the standard diagonal form being used and thus the generation of the divided differences is outlined in Table below.


xf(x)First Divided DifferenceSecond Divided DifferenceThird Divided DifferenceFourth Divided Differencex0f[x0]f[x0,x1]=f[x1]f[x0]x1x0x1f[x1]f[x0,x1,x2]=f[x1,x2]f[x0,x1]x2x0f[x1,x2]=f[x2]f[x1]x2x1f[x0,x1,x2,x3]=f[x1,x2,x3]f[x0,x1,x2]x3x0x2f[x2]f[x1,x2,x3]=f[x2,x3]f[x1,x2]x3x1f[x0,x1,x2,x3,x4]=f[x1,x2,x3,x4]f[x0,x1,x2,x3]x4x0f[x2,x3]=f[x3]f[x2]x3x2f[x1,x2,x3,x4]=f[x2,x3,x4]f[x1,x2,x3]x4x1x3f[x3]f[x2,x3,x4]=f[x3,x4]f[x2,x3]x4x2f[x3,x4]=f[x4]f[x3]x4x3x4f[x4]

A Numerical Example 1

For a function f, the divided differences are given by

x1=2f[x1]=2x0=1f[x0]=6x2=4f[x2]=12

find f[x0,x1,x2].

A Numerical Example 2

For a function f, the divided differences are given by

x0=0.0f[x0]f[x0,x1]x1=0.4f[x1]f[x0,x1,x2]=507f[x1,x2]=10x2=0.7f[x2]=6

Determine the missing entries in the table.

Algorithm: Computing the Divided Differences

Algorithm: Newton's Divided-Differences

   Given the points (xi,f(xi)),i=0,1,...,n.
   Step 1:  Initialize Fi,0=f(xi),i=0,1,...,n.
   Step 2:  
          For i=1:n.
             For j=1:i.
               Fi,j=Fi,j1Fi1,jxixij
             End
          End
   Result: The diagonal, Fi,j now contains f[x0,...,xi].

Relationship between Generalization of the Mean Value Theorem and the Derivatives

Generalization of the Mean Value Theorem

For any n + 1 pairwise distinct points x0, ..., xn in the domain of an n-times differentiable function f there exists an interior point

ξ(min{x0,,xn},max{x0,,xn})

where the nth derivative of f equals n ! times the nth divided difference at these points:

f[x0,,xn]=f(n)(ξ)n!.

This is called the Generalized Mean Value Theorem. For n=1 we have

f[x0,x1]=f[x1]f[x0]x1x0=f(ξ)

for some ξ between x0 and x1, which is exactly Mean Value Theorem. We have extended MVT to higher order derivatives as

f[x0,,xn]=f(n)(ξ)n!.

What is the theorem telling us?

This theorem is telling us that the Newton's nth divided difference is in some sense approximation to the nth derivatives of f .

A Numerical Example

Let f(x)=cos(x), x0=0.2,x1=0.3,x2=0.4. Then, Show that

  1. f[x0,x1]f(ξ)
  2. f[x0,x1,x2]12f(ξ)

for some ξ between the minimum and maximum of x0,x1 and x2.

Quiz

<quiz display="simple"> {find f[2,4,9,10] where f(x)=x4+x2+1 |type="()"} + 25 - -25

- 50 - -50

{If f[x1,x0]=f[x0,x1] then, this is called symmetry of the |type="()"} - zero divided difference + first divided difference - second divided difference - third divided difference

{Let f(x)=cos(x), x0=0.2,x1=0.3 Then, f[x0,x1]= |type="()"} + -0.2473009 - 0.2473009 - -0.2474404 - 0.2474404

{If f[x0,x1]=f[x1]f[x0]x1x0=f(ξ) for some ξ between x0 and x1 then, this is exactly |type="()"} - Generalized Mean Value Theorem + Mean Value Theorem - Derivative of f - Rolle's Theorem

{If f[x0,x1,x2]=f[x1,x2]f[x0,x1]x2x0 then, this is called |type="()"} - First Divided Difference + Second Divided Difference - Third Divided Difference - Fourth Divided Difference


</quiz>

Reference

  • Guide to Numerical Analysis by Peter R. Turner
  • Numerical Analysis by Richard L. Burden and J. Douglas Faires (EIGHT EDITION)
  • Elementary Numerical Analysis by Kendall Atkinson (Second Edition)
  • Applied Numerical Analysis by Gerald / Wheatley (Sixth Edition)
  • Theory and Problems of Numerical Analysis by Francis Scheid

Template:CourseCat