You are on page 1of 10

School of Distance Education

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.

 Forward difference 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  yi1  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.

The second forward differences are defined as,

Numerical Methods Page 51


School of Distance Education

 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

The third forward differences are,


 
3 f  xi     2 f  xi  
 
    

  f  xi  2h 2 f  xi  h  f  xi  
      

y  3y  3 y  yi
i 3 i2 i 1

In particular,
 3 f  x0   y3  3 y2  3 y1  y0 or  3 y0  y3  3 y2  3 y1  y0

In general the nth forward difference,


 n f  xi    n 1 f  xi  h    n 1 f  xi 

The differences y0 ,  2 y0 , 3 y0 .... are called the leading differences.

Forward differences can be written in a tabular form as follows:

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 )

Numerical Methods Page 52


School of Distance Education

Example Construct the forward difference table for the following x values and its
corresponding f values.

x 0.1 0.3 0.5 0.7 0.9 1.1 1.3

f 0.003 0.067 0.148 0.248 0.370 0.518 0.697

x f f 2f 3f 4f 5f

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

Numerical Methods Page 53


School of Distance Education

Example Construct the forward difference table for the data

x: 2 0 2 4
y  f ( x) : 4 9 17 22

The forward difference table is as follows:

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

Properties of Forward difference operator (  ):

(i) Forward difference of a constant function is zero.

Proof: Consider the constant function f ( x)  k

Then, f ( x)  f ( x  h)  f ( x)  k  k  0

(ii) For the functions f ( x) and g ( x) ;   f ( x)  g ( x)   f ( x)  g ( x)

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)

(iii)Proceeding as in (ii), for the constants a and b,

  af ( x)  bg ( x)   af ( x)  bg ( x) .

(iv)Forward difference of the product of two functions is given by,

  f ( x) g ( x)   f ( x  h)g ( x)  g ( x)f ( x)

Numerical Methods Page 54


School of Distance Education

Proof:

  f ( x) g ( x)     ( fg )( x) 
 ( fg )( x  h)  ( fg )( x)
 f ( x  h) g ( x  h)  f ( x ) g ( x )

Adding and subtracting f ( x  h) g ( x) , the above gives

  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)

Note : Adding and subtracting g ( x  h) f ( x) instead of f ( x  h) g ( x) , it can also be


proved that

  f ( x) g ( x)   g ( x  h)f ( x)  f ( x)g ( x)

(v) Forward difference of the quotient of two functions is given by

 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 )

Following are some results on forward differences:

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.

Numerical Methods Page 55


School of Distance Education

Result 2: If n is an integer,
f (a  nh)  f (a)  nC1f (a)  nC2  2 f (a)     n f (a)

for the polynomial f(x) in x.


Forward Difference Table
x f f 2f 3f 4f 5f 6f
x0 f0
x1 f1 f0 2f0
3f0
x2 f2 f1 2f2 4f0
3f1 5f0
x3 f3 f2 2f2 4f1 6f0
3f2 5f1
x4 f4 f3 2f3 4f2
3f3
x5 f5 f4 2f4
f5
x6 f6

Exa mp le Express 2 f 0 and 3 f 0 in terms of the values of the function f.

 
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 n2 3 n3 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

Numerical Methods Page 56


School of Distance Education

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 

and so on. Similarly,


 2 f 0  f1  f 0 or f1  f 0   2 f 0 

 f1  f 2  f1 or f 2  f1   f1
2 2


and so on. Similarly, we can write

 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 

and so on. Also, we can write f 2 as

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  3f 0  32 f 0  3 f 0

 1    f 0
3

That is, we can symbolically write

f1  1    f 0 , f 2  1   2 f 0 , f 3  1   3 f 0 .

Continuing this procedure, we can show, in general

f n  1   n f 0 .

Using binomial expansion, the above is

Numerical Methods Page 57


School of Distance Education

f n  f 0  nC1f 0  n C 2 2 f 0  . . .  n f 0

Thus
n
f n   nCi  i f 0 .
i0

Backward Difference Operator


For the values y0 , y1 ,..., yn of a function y=f(x), for the equidistant values x0 , x1 ,..., xn , where
x1  x0  h, x2  x0  2h, x3  x0  3h,..., xn  x0  nh , the backward difference operator  is defined
on the function f(x) as,
f  xi   f  xi )  f ( xi  h   yi  yi 1 ,

which is the first backward difference.


In particular, we have the first backward differences,
f  x1   y1  y0 ; f  x2   y2  y1 etc

The second backward difference is given by


 2 f  xi     f  xi      f  xi )  f ( xi  h   f  xi   f  xi  h 
  f  xi )  f ( xi  h     f  xi  h)  f ( xi  2h 
  yi  yi 1    yi 1  yi  2 
 yi  2 yi 1  yi  2

Similarly, the third backward difference, 3 f  xi   yi  3 yi 1  3 yi  2  yi 3 and so on.

Backward differences can be written in a tabular form as follows:


Y y 2 y 3 y
x
xo y0  f ( xo )
y1  y1  y0

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 )

Relation between backward difference and other differences:


1. y0  y1  y0  y1 ;  2 y0  y2  2 y1  y0   2 y2 etc.

Numerical Methods Page 58


School of Distance Education

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

Problem: Construct the backward difference table for the data


x: 2 0 2 4
y  f ( x) :  8 3 1 12

Solution: The backward difference table is as follows:


x Y=f(x) y 2 y 3 y

-2 -8
y1 =3-(-8)=11
0 3 2 y2 =-2-11= -13

y2 =1-3=-2 3 y3 =13-(-13)=26


2 1 2 y3 =11-(2)=13
y3 =12-1=11
4 12

Numerical Methods Page 59


School of Distance Education

Backward Difference Table


x f f 2f 3f 4f 5f 6f
x0 f0
x1 f1 f1 2f2
3f3
x2 f2 f2 2f3 4f4 5f
3f4 5
x3 f3 f3 2f4 4f5 6f6
f4 3f5 5f
x4 f4 2f5 4f6 6
f5 3f6
x5 f5 2f6
f6
x6 f6

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 n1 implies f n 1  f n  f n

and f n 1  f n 1  f n  2 implies f n  2  f n1  f n1

 2 f n  f n  f n 1 implies f n 1   f n   2 f n

From equations (1) to (3), we obtain

f n  2  f n  2f n   2 f n .

Similarly, we can show that

f n  3  f n  3f n  3 2 f n   3 f n .

Symbolically, these results can be rewritten as follows:

f n 1  1    f n , f n  2  1   2 f n , f n  3  1   3 f n .

Thus, in general, we can write

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

If we write yn to denote fn the above result is:


yn  r  yn  r C1 yn  r C2  2 yn  . . .  (1) r  r yn

Numerical Methods Page 60

You might also like