You are on page 1of 28

CHAPTER 4

FINITE DIFFERENCES

9/8/21 1
FINITE DIFFERENCES
Let y  f (x) be a given function of x and let y 0 , y1 , y 2 , y 3 ,..., y n be

the values of y corresponding to x0 , x1 , x 2 , x3 ,..., x n the values of x .

Consider the differences y1  y 0 , y 2  y1 , ..., y n  y n 1 these results are called the

first differences of y , and are denoted by y .

i.e. y0  y1  y0

y1  y2  y1

y2  y3  y2

yn 1  yn  yn 1

 is called forward difference operator


9/8/21 2
Higher Differences

2 y0   y0    y1  y0   y1  y0

2 y10   y1    y2  y1   y2  y1



2 yn 1   yn 1    yn  yn 1   yn  yn 1

2 is called second order forward difference operator.

Similarly, 3 y1  2 y2  2 y1

In general, n yi  n 1 yi 1  n 1 yi

9/8/21 3
Cont’d
Though x0 , x1 , x2 , x3 ,..., x n need not be equally spaced, for the time being and for

purposes of practical work, we take them as equally spaced.

Consider x0 , x0  h, x0  2h, ..., x0  nh so that x1  x0  x2  x1  ....  xn  x n 1  h ,

here h is called the interval of differencing

Thus f  x   f  x  h   f  x 

2 f  x    f  x    f  x  h   f  x 

  f  x  2h   f  x  h     f  x  h   f  x  

2 f  x   f  x  2h   2 f  x  h   f  x 
9/8/21 4
Cont’d


3 f  x   2  f ( x)    2 f  x  
 f  x  2h   2f  x  h   f  x 

 f  x  3h   f  x  2h   2 f  x  2h   f  x  h   f  x  h   f  x 

 f  x  3h   3 f  x  2h  3 f  x  h   f  x 

and so on.

9/8/21 5
contd
•  =
• =
• =-
• =-+
Continuing in this process, we have;
=-+……….+

9/8/21 6
Backward difference operator

 f (x) =  f  x   f  x  h  

By definition  y1 = y1  y 0 , y 2  y 2  y1 , etc.

 2 f (x) =   f  x   f  x  h   =  f (x) -  f ( x  h)

=  f  x   f  x  h   -  f  x  h   f  x  2h  

= f ( x )  2 f ( x  h)  f ( x  2h )

9/8/21 7
Central difference operator

The central difference operator  is defined by

 h  h
f  x   f  x    f x 
 2  2

Or y x  y h y h
x x
2 2

9/8/21 8
Shifting or displacement or translation
operator (E)
We define the shifting operator E such that

Ef ( x)  f ( x  h)

Ey x  y x  h

This means Ey0  y1 , Ey1  y 2 , Ey 2  y3 etc

E 2 yx  E  yx  h   yx  2h
E 3 y x  y x  3h

Thus E n f  x   f  x  nh  or E n yx  yx  nh

9/8/21 9
Inverse operator (E-1)

We know that E 1 Ef ( x)  f ( x) and so let E 1 f  x     x 

 E  x   f  x 

  x  h  f  x 

   x  f  x  h

Thus, E 1 f  x   f  x  h 

In general, E  r f  x   f  x  rh 

9/8/21 10
Cont’d
v) Averaging operator 
The averaging operator  is defined by

1  
 y x   y h  y h 
2  x 2 x 2 

vi) Differential operator D

The differential operator D is defined by

d
Df  x   f  x
dx

2
d
D2 f  x  2 f  x etc.
dx
9/8/21 11
Relations between the operators

a) Relation between E and 

We know that f  x   f  x  h   f  x   Ef  x   f  x    E  1 f  x 

   E  1 called separation of symbols

Notice that two operators G1 f (x) = G2 f (x) if and only if

G1 & G2 are equal for every function f (x)

 E  1 

9/8/21 12
Cont’d
b) Relation between E and 

f  x   f  x   f  x  h 

= 1. f  x   E 1 f  x 

 
 1  E 1 f  x 

   1  E 1

 E 1  1   so that E  1   
1

9/8/21 13
Cont’d
c) Relation between D and  :

d
Df  x   f  x
dx

We observe that from the famous Taylor’s theorem for a given function f

h2 f ' '  x  h3 f ' ' '  x 


f  x  h  f  x  h f '  x    ...
2! 3!

h2 D2 f  x  h3 D 3 f  x 
 Ef  x   f  x   h Df  x     ...
2! 3!


 1  hD 
( hD ) 2

 hD  3  ...  f  x 
 2! 3! 
 

 E  1  hD 
 hD  2 
 hD  3  ... = e hD
2! 3!

 E  1    e hD

hD  log 1   

2 3
   ...
2! 3!

1 2 3 
D  
    ... 

h 2! 3! 
9/8/21 14
Cont’d
d) Relation between E and  :

 h  h 1
2 2
 1
2
1

f  x   f  x    f  x    E f  x   E f  x   E  E 2 f  x 
1

 2  2
1
  E 2 E
1
2

 E 2  E  1  E 2 
1 1

Also   E 2 1  E 1   E 2 
1 1

Now let us see these operators using tables because in the subsequent

discussions we use such tables very frequently.

9/8/21 15
Forward Difference Table
The finite forward differences of a function are represented below in a tabular

form

x y y 2 y 3 y 4 y 5 y 6 y

x0 y0 y0

x1 y1 2 y0
y1 3 y0
4 y0
x2 y2 2 y2
y2  y1
3 5 y0
4 y1 6 y0
x3 y3  y2
2

y3 3 y2 5 y1
x4 y4 2 y3 4 y2
y4 3 y3
 y4
2
x5 y5
y5
x6 y6

Here y0 is called the leading term.


9/8/21 16
Backward Difference Table
x y y 2 y 3 y 4 y 5 y 6 y

x0 y0
y1
x1 y1  2 y2
y2 3 y3
x2 y2  4 y4
 2 y3 5 y5
y3  y4
3

x3 y3  4 y5  6 y6
 y4
2
y 4 3 y5  5 y6
x4 y4  2 y5  y6
4

y5  3 y6
x5 y5  2 y6
 y6
x6 y6

Here y6 is called the leading term


9/8/21 17
Cont’d
To find y k in terms of y 0 ,  y 0 ,  2 y 0 , … where k is a positive integer.

yk  E k y0

 1    y 0
k

 k  k  2 
 1        ...    y0
k

 1  2 

k  k  2
= y0   y0    y0  ...  k y0 (*)
1  2

Now let us see some examples how we can efficiently use this result to find a

solution for different problems.


9/8/21 18
Example 1
Find the next term of the sequence 2, 9, 28, 65, 126, 217, …

and also find the general term.

Solution

For this given problem first we establish the forward difference table and we try

to use the above equation (*) in order to find the 7 th term and the general term.

Thus, the table is as follows

x y  y 2 y 3 y 4 y

0 2
7
12
1 9
19 6
18 0
2 28 6
37
24
3 65 0
61 6
4 126 30
91
5 217
9/8/21 19
Solution (cont’d)
 6 6 2 6 3 6 4  6 5 0  6 6
7th term = y6  y0   y0    y0    y0    y0    y    y0
       
1  2  3  4  5 6

 2  6 7   1512  20 6  15 0

= 344

n n  1
yn  2  n 7   12  n n  1 n  2  6
2 3!

= 2  7n  6n 2  6n  n 3  3n 2  2n

= (n  1) 3  1

 y6   6  1  1  344
3

9/8/21 20
Example 2
Find f (x) from the table below and also find f (7) .

x: 0 1 2 3 4 5 6

f (x) : -1 3 19 53 111 199 323

Solution

y x  E x y0  1    y0
x

 x  x  x
= y0   y0   2 y0   3 y0  ...
1  2  3

x x  1
   1  4 x  12  x x  1 x  2  6  0
2 6

 x3  3x 2  1

f (7) = 489
9/8/21 21
Cont’d
Using backward difference operator we can also develop a method how to solve

some problems similar to the forward difference operator.

We know that y n  y n  y n 1

 yn 1  yn  yn  1    yn

Similarly yn  2  1    yn 1

= 1    y n
2

y n 3  1    y n etc.
3

y n  k  1    y n
k
Thus

k  k 
= yn   yn    2 yn ...    1  k yn
k

1  2
9/8/21 22
Example 3
Find y (1) if y (0)  2, y (1)  9, y (2)  28, y (3)  65, y (4)  126, y (5)  217 .

Solution

x y y 2 y 3 y 4 y

0 2
7
12
1 9
19 6
18 0
2 28
37 6
24 0
3 65
61 6
30
4 126
91
5 217

9/8/21 23
Solution (cont’d)
Now y (1)  y 1  y 56

 6  6 2  6 3 6 6
 y5  y5    y5    y5  ...    y5
1  2  3 6

 217 6(91)  15(30) 20(6)  0

1

To verify y (0)  y 0  y 55

 5 5 2  5 5
 y5   y5    y5  ...    y5
   
1  2  5

 217  5 91  10 30  10 6

2
9/8/21 24
Example 4
Given y3  2, y 4  6, y5  8, y 6  9 and y 7  17 . Calculate 4 y3 .

Solution

4 y 3  ( E  1) 4 y3  ( E 4  4 E 3  6 E 2  4 E  1) y3

= E 4 y3  4 E 3 y 3  6 E 2 y3  4 Ey3  y 3

= y7  4 y6  6 y5  4 y 4  y3

= 17  4(9)  6(8)  4(6)  2

= 55
9/8/21 25
Example 4

Find y 6 if y 0  9, y1  16, y 2  30, y 3  45 given that third differences

are constants.

Solution

Since the third differences are constants, 4 y 0  0  5 y 0  6 y 0

y 6  E 6 y 0  (1  ) 6 y 0  1 6C1   6 C 2   6C 3   6C 4   6C 5   6  y 0

= (1  6  152  203 ) y 0 since 4 y 0  0  5 y 0  6 y 0

= (1  6( E  1)  15( E  1) 2  20( E  1) 3 ) y 0

= (20 E 3  45 E 2  36 E  10) y 0

= 20 y 3  45 y 2  36 y1  10 y 0

= 20(45)  45(30)  36(16)  10(9)

= 76
9/8/21 26
Example 4
From the following table, find the missing value

x: 2 3 4 5 6

y: 45.0 49.2 54.1 - 67.4

Solution

Since only four values of f (x) are given, we assume that the polynomial which

fits the data, the interpolating polynomial, is of degree three.

Hence, fourth differences are zero. i.e. 4 y 0  0 .

 ( E  1) 4 y 0  0  ( E 4  4 E 3  6 E 2  4 E  1) y 0  0

 y 4  4 y 3  6 y 2  4 y1  y 0  0

 67.4  4 y 3  6(54.1)  4(49.2)  45.0  0

y 3  60.05
9/8/21 27
Exercise

1. Estimate the production for 1964 and 1966 from the

following data:
Year: 1961 1962 1963 1964 1965 1966 1967

Production: 200 220 260 - 350 - 430


2. Find the missing term in the following
x: 1 2 3 4 5 6 7
y: 2 4 8 - 32 64 128

9/8/21 28

You might also like