Professional Documents
Culture Documents
Chapter Seven - Finite Difference Operators
Chapter Seven - Finite Difference Operators
4
FINITE DIFFERENCES OPERATORS
For a function y=f(x), it is given that y0 , y1 ,..., yn are the values of the variable y
corresponding to the equidistant arguments, x0 , x1 ,..., xn , where
x1 x0 h, x2 x0 2h, x3 x0 3h,..., xn x0 nh . In this case, even though Lagrange and
divided difference interpolation polynomials can be used for interpolation, some simpler
interpolation formulas can be derived. For this, we have to be familiar with some finite
difference operators and finite differences, which were introduced by Sir Isaac Newton.
Finite differences deal with the changes that take place in the value of a function f(x) due
to finite changes in x. Finite difference operators include, forward difference operator,
backward difference operator, shift operator, central difference operator and mean
operator.
For the values y0 , y1 ,..., yn of a function y=f(x), for the equidistant values x0 , x1 , x2 ,..., xn ,
where x1 x0 h, x2 x0 2h, x3 x0 3h,..., xn x0 nh , the forward difference operator is
defined on the function f(x) as,
f xi f xi h f xi f xi 1 f xi
That is,
yi yi1 yi
Then, in particular
f x0 f x0 h f x0 f x1 f x0
y0 y1 y0
f x1 f x1 h f x1 f x2 f x1
y1 y2 y1
etc.,
y0 , y1 ,..., yi ,... are known as the first forward differences.
2 f xi
f xi f xi h f xi
f xi h f xi
f xi 2h f xi h f xi h f xi
f xi 2h 2 f xi h f xi
yi 2 2 yi 1 yi
In particular,
2 f x0 y2 2 y1 y0 or 2 y0 y2 2 y1 y0
f xi 2h 2 f xi h f xi
y 3y 3 y yi
i 3 i2 i 1
In particular,
3 f x0 y3 3 y2 3 y1 y0 or 3 y0 y3 3 y2 3 y1 y0
x y y 2 y 3 y
x0 y0 f ( xo )
y0 y1 y0
x1 y1 f ( x1 ) 2 y0 y1 y0
y1 y2 y1 3 y0 2 y1 2 y0
x2 y 2 f ( x2 ) 2 y1 y2 y1
y2 y3 y2
x3 y3 f ( x3 )
Example Construct the forward difference table for the following x values and its
corresponding f values.
0.1 0.003
0.064
0.3 0.067 0.017
0.081 0.002
0.5 0.148 0.019 0.001
0.100 0.003 0.000
0.7 0.248 0.022 0.001
0.122 0.004 0.000
0.9 0.370 0.026 0.001
0.148 0.005
1.1 0.518 0.031
0.179
1.3 0.697
1
Example Construct the forward difference table, where f ( x) , x = 1(0.2)2, 4D.
x
f 2f
1
f ( x) first second
x x 3f 4f 5f
differe differe
nce nce
1.0 1.000
-0.1667
1.2 0.8333 0.0477
-0.1190 -0.0180
1.4 0.7143 0.0297 0.0082 -0.0045
-0.0893 -0.0098
1.6 0.6250 0.0199 0.0037
-0.0694 -0.0061
1.8 0.5556 0.0138
-0.0556
2.0 0.5000
x: 2 0 2 4
y f ( x) : 4 9 17 22
x y=f(x) y 2 y 3 y
-2 4
y0 =5
0 9 2 y0 =3
y1 =8 3 y0 =-6
2 17 2 y1 =-3
y2 =5
4 22
Then, f ( x) f ( x h) f ( x) k k 0
Proof: By definition,
f ( x) g ( x) ( f g )( x)
( f g )( x h) ( f g )( x)
f ( x h) g ( x h) f ( x ) g ( x )
f ( x h) f ( x ) g ( x h) g ( x )
f ( x) g ( x)
af ( x) bg ( x) af ( x) bg ( x) .
f ( x) g ( x) f ( x h)g ( x) g ( x)f ( x)
Proof:
f ( x) g ( x) ( fg )( x)
( fg )( x h) ( fg )( x)
f ( x h) g ( x h) f ( x ) g ( x )
f ( x ) g ( x ) f ( x h) g ( x h) f ( x h) g ( x ) f ( x h) g ( x ) f ( x ) g ( x )
f ( x h) g ( x h) g ( x ) g ( x ) f ( x h) f ( x )
f ( x h)g ( x) g ( x)f ( x)
f ( x) g ( x) g ( x h)f ( x) f ( x)g ( x)
f ( x ) g ( x ) f ( x ) f ( x ) g ( x )
g ( x) g ( x h) g ( x )
Proof:
f ( x) f ( x h) f ( x)
g ( x) g ( x h) g ( x)
f ( x h) g ( x) f ( x) g ( x h)
g ( x h) g ( x)
f ( x h) g ( x) f ( x) g ( x) f ( x) g ( x) f ( x) g ( x h)
g ( x h) g ( x)
g ( x ) f ( x h) f ( x ) f ( x ) g ( x h) g ( x )
g ( x h) g ( x )
g ( x)f ( x) f ( x)g ( x)
g ( x h) g ( x )
Result 1: The nth forward difference of a polynomial of degree n is constant when the
values of the independent variable are at equal intervals.
Result 2: If n is an integer,
f (a nh) f (a) nC1f (a) nC2 2 f (a) n f (a)
2 f 0 f1 f 0 f 2 f1 f1 f 0 f 2 2 f1 f 0
3 f 0 2 f1 2 f 0 f 2 f1 f1 f 0
f f f f f f f f
3 2 2 1 2 1 1 0
f 3f 3f f
3 2 1 0
In general,
n f f nC f nC f nC f ... ( 1) n f .
0 n 1 n 1 2 n2 3 n3 0
If we write yn to denote fn the above results takes the following forms:
2 y 0 y 2 2 y1 y 0
3 y 0 y3 3 y 2 3 y1 y 0
n y 0 y n n C1 y n 1 n C 2 y n 2 n C3 y n 3 . . . ( 1) n y 0
Exa mp le Show that the value of yn can be expressed in terms of the leading value y0
and the leading differences y 0 , 2 y 0 , . . . , n y 0 .
Solution
(For notational convenience, we treat yn as fn and so on.)
From the forward difference table we have
f 0 f1 f 0 or f1 f 0 f 0
f1 f 2 f1 or f 2 f1 f1
f 2 f 3 f 2 or f 3 f 2 f 2
3 f 0 2 f1 2 f 0 or 2 f1 2 f 0 3 f 0
3 f1 2 f 2 2 f1 or 2 f 2 2 f1 3 f1
f 2 f 0 f 0 f 0 2 f 0
f 0 2 f 0 2 f 0
(1 ) 2 f 0
Hence
f3 f 2 f 2
f1 f1 f 0 2 2 f 0 3 f 0
f 0 3f 0 32 f 0 3 f 0
1 f 0
3
f1 1 f 0 , f 2 1 2 f 0 , f 3 1 3 f 0 .
f n 1 n f 0 .
f n f 0 nC1f 0 n C 2 2 f 0 . . . n f 0
Thus
n
f n nCi i f 0 .
i0
x1 y1 f ( x1 ) 2 y2 y2 y1
y2 y2 y1 3 y3 2 y3 2 y2
x2 y 2 f ( x2 ) 2 y3 y3 y2
y3 y3 y2
x3 y3 f ( x3 )
2.
Proof: Consider the function f(x).
f ( x) f ( x h) f ( x)
f ( x) f ( x) f ( x h)
( f ( x)) f ( x) f ( x)
f ( x h) f ( x ) f ( x ) f ( x h)
f ( x) f ( x h)
f ( x ) f ( x h)
f ( x )
3. E 1
Proof: Consider the function f(x).
f ( x) f ( x) f ( x h) f ( x h) E 1 f ( x) E 1
4. 1 E 1
Proof: Consider the function f(x).
f ( x) f ( x) f ( x h) f ( x) E 1 f ( x) 1 E 1 f ( x) 1 E 1
-2 -8
y1 =3-(-8)=11
0 3 2 y2 =-2-11= -13
Example Show that any value of f (or y) can be expressed in terms of fn (or yn ) and its
backward differences.
Solution
f n f n f n1 implies f n 1 f n f n
2 f n f n f n 1 implies f n 1 f n 2 f n
f n 2 f n 2f n 2 f n .
f n 3 f n 3f n 3 2 f n 3 f n .
f n 1 1 f n , f n 2 1 2 f n , f n 3 1 3 f n .
f n r 1 r f n .
i.e., f n r f n r C1 f n r C2 2 f n . . . (1) r r f n
Centr al Dif f er en c es
Central difference operator for a function f(x) at xi is defined as,
Let y 1 f x0 h . Then,
2 2
y 1 f x0 f x0 f x0
h h h h h
2 2 2 2 2 2
f x0 h f x0 f x1 f x0 y1 y0
y 1 y0
2
xo y0 f ( xo )
y 1 y1 y0
2
x1 y1 f ( x1 ) 2 y1 y 3 y 1
2 2
3 y 3 2 y2 2 y1
y 3 y2 y1 2
x2 y 2 f ( x2 ) 2
2 y2 y 5 y 3
2 2
y 5 y3 y2
x3 y3 f ( x3 ) 2
x0 f0
x1 f1 f1/2 2f1
3f3/2
x2 f2 f3/2 2f2 4f2
3f5/2
x3 f3 f5/2 2f3
f7/2
x4 f4
(a) 2 f m f 2 fm f
m1 m 1
(b) 3 f f 3f 3f f
m2 m1 m 1
m1 m
2
2
(a) fmfm1/2 fm1/2 ( fm1 fm)( fm fm1)
f 2 fm f
m 1 m 1
Let y = f (x) be a function of x, and let x takes the consecutive values x, x + h, x + 2h, etc.
We then define an operator E, called the shift operator having the property
E f(x) = f (x + h) …(1)
Thus, when E operates on f (x), the result is the next value of the function. If we apply the
operator twice on f (x), we get
and similarly
Average Operator
f x 1 f ( x h2 ) f ( x h2 )
2
Differential operator D
Df ( x) d f ( x) f ( x)
dx
2
D 2 f ( x) d 2 f ( x) f ( x)
dx
Therefore,
=E1
Therefore,
E 1
1 E 1 .
E
Therefore,
= E 1/2 E 1/2
The definition of the operators and E yields
1 h 1
f x f x f x E1/ 2 E 1/ 2 f x .
h
2 2 2 2
Therefore,
2
E E 1/ 2 .
1 1/ 2
It is known that
E f (x) = f (x + h).
Using the Taylor series expansion, we have
2
Ef x f x h f x f x . . .
h
2!
h2 2
f x h Df x D x . . .
2!
h D h2 D2
1 . . . f x e hD f x .
1! 2!
Thus E e hD . Or,
hD = log E.
Solution
2
E E 1/ 2 E1/ 2 E 1/ 2 12 E E 1 .
1 1/ 2
Therefore
1 2
E 2 E 2 E E 1
1 2
1 2 2 1
4 4
Also,
2
1 E1/ 2 E 1/ 2 E E 1
1 2 1
1
2 2 2
From equations (1) and (2), we get
2
2
1 2 2 1 .
2
E E 1/ 2
1/ 2 2
2
1 2 / 4 E1/ 2 E 1/ 2 1 E E 1/ 2
1 1/ 2 2
2 2 4
E 2 E 1 1 1/ 2
E E 1/ 2 E1/ 2 E 1/ 2
2 2
E 2 E 1 E E 1
2 2
=E 1
=
(iv) We write
2
E E 1/ 2 E1/ 2 E 1/ 2 12 E E 1
1 1/ 2
1
2
1 E 1 2 12 1 E 1 2 12 EE 1 2 2E .
(v) We can write
2
E E 1/ 2 E1/ 2 E 1/ 2 12 E E 1
1 1/ 2
1
2
1 1 12 .
Using the standard relations given in boxes in the last section, we have
hD log E log 1 log E log E 1 log 1
Also,
2
E E 1/ 2 E1/ 2 E 1/ 2 12 E E 1
1 1/ 2
2
e e hD sin hD
1 hD
Therefore
hD sinh 1 .
Ef 0 f1
1
f f
2 3/ 2 1/ 2
and also
Hence
E E .
x2 x2
ex u0 xu0 2u0 ... u0 u1x u2 ...
2! 2!
x2 2 x x22
e u0 xu0 u0 ... e 1 x
x
... u0
2! 2!
exexu0 ex(1)u0
exEu0
x2 E 2
1 xE ... u0
2!
x2
u0 xu1 u ...,
2! 2
as desired.
Example Using the method of separation of symbols, show that
n(n 1)
nu x n u x nu x 1 u x 2 (1) n u x n .
2
To prove this result, we start with the right-hand side. Thus,
n(n 1)
R.H.S u x nu x 1 u x 2 (1) n u x n .
2
n(n 1) 2
u x nE 1u x E u x (1) n E nu x
2
n(n 1) 2
1 nE 1 E (1) n E n u x
2
1 E 1 u x
n
n
1 u x
1
E
E 1
n
ux
E
n
ux
En
n E nu x
nu x n ,
= L.H.S
Differences of a Polynomial
Let us consider the polynomial of degree n in the form
f ( x ) a0 x n a1 x n 1 a2 x n 2 . . . an 1 x an ,
f ( x h ) a0 ( x h ) n a1 ( x h ) n 1 a2 ( x h ) n 2 ... an 1 ( x h) an
f ( x) f ( x h) f ( x) a0 ( x h) n x n a1 ( x h) n 1 x n 1 ... an 1 ( x h x )
f x a 0 x n n C1 x n 1h n C 2 x n 2 h 2 . . . h n x n
n 1 n 1
a1[ x n 1 C1 x n 2 h C2 x n 3 h 2
. . . h n 1 x n 1 ] . . . an 1h
a 0 nhx n 1 a 0 n C 2 h 2 a1 n 1C1h x n 2 . . . a n 1h .
Therefore,
f x a 0 nhx n 1 b x n 2 c x n 3 . . . k x l ,
where b, c, . . . , k, l are constants involving h but not x. Thus, the first difference of
a polynomial of degree n is another polynomial of degree (n 1). Similarly,
2 f x f x f x h f x
a0 nh x h x n 1 b x h x n 2
n 1 n2
. . . k x h x
n f x a0 n n 1 n 2 n 3 . . . 2 1 h n
a0 n ! h n constant.
Conversely, if the n th differences of a tabulated function are constant and the (n 1)th ,
(n 2)th,..., differences all vanish, then the tabulated function represents a polynomial of
degree n. It should be noted that these results hold good only if the values of x are equally
spaced. The converse is important in numerical analysis since it enables us to approximate
a function by a polynomial if its differences of some order become nearly constant.
9. Show that E E 1 / 2 .
13. Construct the backward difference table based on the following table.
yn yn 2 yn
-
- -
1
- -
4
6 5
13
- -
18
- -
24
- -