KIRINYAGA UNIVERSITY
DEPARTMENT OF PURE AND APPLIED SCIENCES
COURSE CODE : SPM2321
COURSE TITLE: NUMERICL ANALYSIS I
LECTURER: ANTHONY KINYANJUI
MODULE 05: FORWARD AND BACKWARD FINITE DIFFERENCE
TABLES
OBJECTIVE: AT THE END OF LECTURE, A STUDENT WILL BE ABLE
TO CONSTRUCT FORWARD AND BACKWARD FINITE DIFFERENCE
TABLES
1
Construction of finite difference tables
Consider a tabulated function (𝑥𝑖 , 𝑓𝑖)) from the table
𝑥𝑖 𝑓𝑖 ∆𝑓𝑖 ∆2𝑓𝑖 ∆3𝑓𝑖 ∆4𝑓𝑖 ∆5𝑓𝑖
𝑥0 𝑓0
𝑥1 𝑓1 ∆𝑓0
∆2𝑓0
𝑥2 𝑓2 ∆𝑓1
∆2𝑓1 ∆3𝑓0
𝑥3 𝑓3 ∆𝑓2 ∆4𝑓0
∆2𝑓2 ∆3𝑓1 ∆5𝑓0
𝑥4 𝑓4 ∆𝑓3 ∆4𝑓1
∆2𝑓3 ∆3𝑓2
𝑥5 𝑓5 ∆𝑓4
The above table is called a diagram difference table. The first term in the table is 𝑓0
is called the leading term. The difference ∆𝑓0∆2𝑓0 ∆2𝑓0 are called the leading
difference.
The difference ∆𝑛 𝑓𝑛 with a fixed subscript are called Forward difference.
𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆2𝑓(𝑥) ∆3𝑓(𝑥)
𝑥+ℎ 𝑓(𝑥 + ℎ) ∆𝑓(𝑥)
∆2𝑓(𝑥)
𝑥 + 2ℎ 𝑓(𝑥 + 2ℎ) ∆𝑓(𝑥 + ℎ) ∆3𝑓(𝑥)
2
𝑥 + 3ℎ 𝑓(𝑥 + 3ℎ) ∆𝑓(𝑥 + 2ℎ) ∆2𝑓(𝑥 + ℎ)
Solved problem
Construct a forward difference table from the following table
𝑥 0 10 20 30
𝑓(𝑥) 0 0.174 0.347 0.518
Solution
𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆2𝑓(𝑥) ∆3𝑓(𝑥)
0 0
0.174
10 0.174 −0.001
0.173 −0.001
20 0.347 −0.002
0.171
30 0.518
Construct a difference table for 𝑓 (𝑥 ) = 𝑥 3 + 2𝑥 + 1 𝑓𝑜𝑟 𝑥 = 1,2,3,4,5
𝑥 𝑓(𝑥) ∆𝑓(𝑥) ∆2𝑓(𝑥) ∆3𝑓(𝑥)
3
1 4
9
2 13 12
21 6
3 34 18
39 6
4 73 24
63
5 136
Backward difference
Let 𝑦 = 𝑓(𝑥) be a function given the values 𝑦0 , 𝑦1 , . . 𝑦𝑛 which it takes for the
equally spaced values 𝑥0 , 𝑥1 , . . 𝑥𝑛 of the independent variable x. then 𝑦 − 𝑦1 , 𝑦2 −
𝑦1 , 𝑦𝑛 − 𝑦𝑛−1 are called the first backward difference of 𝑦 = 𝑓(𝑥) They are
denoted by ∇𝑦0 , ∇𝑦1 , …∇𝑦𝑛 respectively. Thus we have
𝑦1 − 𝑦0 = ∇𝑦1
𝑦2 − 𝑦1 = ∇𝑦2
𝑦𝑛 − 𝑦𝑛−1 = ∇𝑦𝑛
Where ∇ is called the backward difference operator.
𝑥 𝑦 ∆𝑦 ∆2 𝑦 ∆3 ∆4 𝑦 ∆5 𝑦
𝑥0 𝑦0
∇𝑓0
4
𝑥1 𝑦1 ∇𝑓1
∇2𝑓0
𝑥2 𝑦2 ∇𝑓2 ∇3𝑓0
∇2𝑓1 ∇4𝑓0
𝑥3 𝑦3 ∇𝑓3 ∇3𝑓1 ∇5𝑓0
∇2𝑓2 ∇4𝑓1
𝑥4 𝑦4 ∇3𝑓2
∇2𝑓3
∇f(𝑎) = 𝑓 (𝑎) − 𝑓(𝑎 − ℎ)
Solved problem
Tabulate 𝑓(𝑥 ) = 𝑥 2 + 4𝑥 + 1 𝑓𝑟𝑜𝑚 1 𝑡𝑜 10. Hence use the results to find:
(i) ∇2𝑓2 𝑎𝑡 𝑥 = 2
(ii) ∆2𝑓2 𝑎𝑡 𝑥 = 3
(iii) δf3 at x = 4
(iv) 𝜇𝑓2 𝑎𝑡 𝑥0 = 4
(v) 𝛿 2 𝑓2 𝑎𝑡 𝑥0 = 2
Solution
5
𝑥 𝑓(𝑥) ∆𝑓 ∆2 𝑓 ∆3 𝑓
1 6 7
2
2 13 9 0
2
3 22 11 0
2
4 33(𝑓0) 13(∆𝑓0) 0
2
5 46 15 0
2
6 61 17 0
2
7 78 19 0
2
8 97 21 0
2
9 118 23
10 141
(i) ∆𝑓𝑖 = 𝑓𝑖+1 − 𝑓𝑖 ∆𝑓2 = 𝑓3 − 𝑓2
6
∆2𝑓𝑖 = 𝑓𝑖+2 − 2𝑓𝑖+1 + 𝑓𝑖
= 𝑓𝑖+2 − 2𝑓𝑖+1 + 𝑓𝑖
= 𝑓4 − 2𝑓3 + 𝑓2
= 61 − 2(46) + 33
=2
𝑥 𝑓(𝑥) ∇𝑓 ∇2 𝑓 ∇3 𝑓
1 6
−7
2 13 2
−9 0
3 22 2
−11 0
4 33 2
−13 0
5 46 2
−15 0
6 61 2
−17 0
7 78 2
−19 0
8 97 2
−21 0
9 118 2
−23
7
10 141
𝛻𝑓2 𝑎𝑡 𝑥0 = 3
= −13
∇2 𝑓2 = 2
𝛿𝑓3 𝑎𝑡 𝑥0 = 4
𝛿𝑓𝑖 = 𝑓𝑖+1 − 𝑓𝑖−1
2 2
𝛿𝑓3 = 𝑓3.5 − 𝑓2.5
= 87.5 − 6 9.5
= 18
𝛿 2 𝑓2 𝑎𝑡 𝑥0 = 2
𝛿 2 𝑓𝑖 = 𝑓𝑖+1 − 2𝑓𝑖 + 𝑓𝑖−1
𝛿 2 𝑓2 = 𝑓3 − 2𝑓2 + 𝑓1
= 46 − 2(33) + 22
=2
8
1
𝜇𝑓𝑖 = (𝑓𝑖+1 − 𝑓𝑖−1 )
2 2 2
𝜇𝑓3=𝑓3.5−𝑓2.5
2
1
= (87.5 + 6 9.5 )
2
= 61.5
Tutorial problem
1. Tabulate 2𝑥 2 − 2𝑥 + 1 from 1 to 8 and hence use the value to find
(i) ∇𝑓2 𝑎𝑡 𝑥 = 3
(ii) ∆3 𝑓𝑖 𝑎𝑡 𝑥 = 2
(iii) 𝜇𝑓4 𝑎𝑡 𝑥 = 1
(iv) 𝛿 3 𝑓2 𝑎𝑡 𝑥 = 2