CHAPTER V
FINITE DIFFERENCES. CENTRAL DIFFERENCES
- It has already been stated that in interpolating between given values of a function the form of the expression connecting these values is assumed to be parabolic, and that this assumption is usually only an approximation to the truth. It remains therefore to be considered by what methods the best result can be obtained by the processes of Finite Differences.
In developing the formulas of this chapter, it will be assumed that a number of equidistant values of the function are given. Let us assume further that it is desired to interpolate a value f (x) intermediate between f (0) and f (1). It is clear that our knowledge of the shape of the curve on which the points lie is increased if we are given values of the function lying on both sides of f (0), and that generally the best value of f (x) will be obtained, if a limited number of terms is to be used, when the required value occupies as nearly as possible a central position in regard to the terms used in the interpolation.The formulas of Central Differences are designed to give effect to these considerations.
- The more familiar formulas of Central Differences are as follows :
STIRLING'S: f(x)=f(0)+x.f(0'+_f(1)+ 2 A2f1)+x(x2-1) A3f(-1)+A2f(-2)+x2(x~-1) f(-2) 3!24!
+x(x21)(x24) A' f ( 2) + A' f ( 3)
5! 2
+x2(x21)(x24)A6f(3)+ (1). 61
30 FINITE DIFFERENCES BESSEL'S :
.f(x)=f(0)2f (1)+(x--1)f(0)
+x(x-1) Alf(-1)+o2f(o)+(x- )x(x1)o3f(1)
2! 2 3!
+(x+1)x(x1)(x2) 0*f(1)+ f(2)
4! 2
(x+)(x+1)x(x1)(x2)0, f(2) +(x
5!
+(x+2)(x+1)x(x1)(x2)(x3) Oef(2)+Aef(3)+...
6! 2
(2).
GAUSS':
f(x)=f(0)+xAf(o)+(2-1)02 f(-1)+(x+13,(x-1)
+(c+l)x(x1)(x 2)A*f(2) 4!
+(x+2)(x+l)x(x1)(x2) p5f(2)+ (3).
5!
EVERETT'S :
(x2 , 1)o2f(0)+x(x9 - 5!(x2 -4)(-1)
+x(x21)(x24)(x29)0"f(2)+... 7'
+yf(6)+y3! 1)A2f(-1)+y(y21)I(y94)p*f(-2)
+y(y21)(y24)(y29)psf(3) + (4)
71 [where y = 14
4. These formulas can be obtained in various ways from the ordinary formulas of advancing differences. Once, however, the scheme of differences entering into a formula is settled, the cocan readily be calculated by the method of Separation of Symbols. An example may be given of the demonstration of Gauss' formula by this method.
CENTRAL DIFFERENCES 31
Example 1.
To express f (x) in terms off (0), A f (0), 6,2 f (- 1), 03f (- 1), ....
Let .f (x) = Ao.f (0)+A1Af (0) + A2Af(-1)+.... Then, since
Of (-1)=1+
A
'f(0); A3.f(-1)=1+3of(0); etc.,
(1+A)x=Ao+A1A+A21+20+A31+3L+...
A2r-1 Qtr
+A2M1(1+0)r'+A2'(1+0)'+.... Multiplying up by (1 + A)r-1, and equating coefficients of A2''-1,
A (r+x-1)(r+x-2)...(x-r+1)
2r-1= (2r-1)!
And, multiplying up by (1 + A)r, and equating coefficients of A2r, (r+x)(r+x-1)... (x-r+l)
Asr-1 + 112r = 2r!
Hence, by subtraction,
A2r-(r+x-1)(r+x-2)...(x-r) 2r!
Therefore f (x) = f (0) + xA f (0)
+x(xy_I 1) 02f(- 1)+(x+l)a (x-1)A3.f(-l)+....
The other formulas should be proved, in a similar way, as exercises by the student*.
5. The formulas of central differences, although in a different form, are intimately associated with those of advancing differences. For example, if an interpolated value is calculated by using the first three terms of Stirling's formula, it is obvious that the values
* See J.I. A. Vol. 50, pp. 28-33.
32 FINITE DIFFERENCES
of f( 1), f (0) and f (l) are brought into the calculation. It is easy to show that the result is identical with that obtained by using the first three terms of the advancing difference formula starting with the term f( 1).
It may be observed that the first two terms of Stirling's formula also involve three values of the function; the third term merely introduces the correction necessary to make the formula true to the order of differences (i.e. the second) implied by the use of three terms of the series. Thus, as the (2r)th and the (2r + 1)th terms of Stirling's formula both involve the use of (2r + 1) values of the function, there is ordinarily little advantage in using the extra (2r + 1)th term in any calculation.
Similarly in Bessel's formula no material increase in precision is gained by using 2r terms rather than 2r 1 terms.
Gauss' and Everett's formulas are each true to the order of differences involved and for general use they would appear to be the best of those propounded.
- In view of the remarks at the beginning of the foregoing article, it may well be asked what are the advantages of central difference formulas, as compared with advancing difference formulas so chosen as to make the interpolated term as nearly as possible the central term of those employed. It may at once be said that the theoretical advantages are small but that the practical ad-vantages may be considerable. Thus if it be desired to introduce further terms of the original series into the calculation, the original calculations relating to the central difference formulas hold good, and the values of fresh terms of the formula can be calculated until the desired degree of approximation is attained. If however an advancing difference formula is used, the introducof fresh terms of the original series, while retaining the interpolated term in a central position, necessitates the changing of the origin and the recalculation of all the terms of the formula. An example will make this point clear.
- Example 2. Required to interpolate the value of a unit accumulated for 17 years with compound interest at 5 per cent. per annum, having given the values for 0, 5, 10, ... 30 years.
For central difference formulas we must take our origin at 15
CENTRAL DIFFERENCES 33
years, and we will take 5 years as the unit. Thus we get the following scheme :
No. of years |
x |
f f.)) |
Q |
e2 |
Q3 |
|
A5 |
|
0 |
-3 |
1. |
27628 |
'07633 |
02110 |
00580 |
'00165 |
|
5 |
-2 |
1.27628 |
35261 |
09743 |
'02690 |
'00745 |
'00206 |
|
10 |
-1 |
1.62889 |
45004 |
'12433 |
03435 |
00951 |
|
|
15 |
0 |
2.07893 |
'57437 |
15868 |
04386 |
|
|
|
20 |
1 |
2.65330 |
.73305 |
20254 |
|
|
|
|
25 |
2 |
:3:38635 |
93559 |
|
|
|
|
|
30 |
3 |
4.32194 |
|
|
|
|
|
As the unit of time is 5 years, the required value is repreby f (4).
Central Differences. We will use Gauss' formula, i.e.
f (x) = f (0) + xhf (0)
+x(x1)(1)+(x+1)x(x1)as)(1)+.... 21 3!
The successive terms, with the corresponding values of f (4), are
|
f (0) = 2.07893, 1st approx. = 2.07893 |
|
4f(0) = 22975, 2nd = |
2.30868 |
|
4x.6A2 f(1)= 01492,3rd = |
2.29376 |
| 1.4 x 4 x 6 03 1 00192, 4th |
2.29184 |
|
6 f( ) = |
|
1 4 x 4 x 6 x _ 1 6 4 f ( 2 ) , 00017 5th = |
2.29201 |
|
24 ' |
|
|
2.4x1.4x4x 6x1.6A5 f(2)= 00002, 6th = |
2.29203 |
| 120 |
|
It is clear that no further terms would affect the calculated value. The true value is 2.29202.
H. T. B. I. 3
34 FINITE DIFFERENCES
Advancing Differences.
1st approximation f(0) = 2.07893,
2nd approximation f (0) + f (0) = 2.30868,
3rd approximation
f(1)+1'4Of(1)+142 4O'f(1) =2.29376,
4th approximation
f(1)+1.46,f(1)+142 4O2f(1)
+ 1.4 x4x6 As 6 O f(1)=229184,
5th approximation
f(2)+ 2.4A.f(2)+242 14f(2)
2.4xP4x4 3
+ f(2)
2.4x1.4x4x6 + 24 &f(_ 2) = 2 .29200,
6th approximation
6
(5th approximation) +24 x 14 x 4 x x -16 120 A°f (2)=2.29202.
It will be observed that in proceeding to the 3rd and 5th approximations using advancing differences every term in the formula has to be recalculated, whereas, in the application of the central difference formula, terms already calculated hold good whatever be the degree of approximation.
It should be noted, however, that both formulas give mathethe same results, the difference of a unit in the final figure being due to the use of only five places of decimals throughout.
8. As regards other practical points, it may be observed that the numerical coefficients in the central difference formulas are smaller than those in the advancing difference formulas (see Example 2).
Other advantages arise in special cases. Thus Bessel's formula
CENTRAL DIFFERENCES 35
can conveniently be applied for the bisection of an interval, since the alternate terms vanish, giving
f(I)=f(0)+f(1)02f(1)+6.2f(0)
2 8 2
+ 3 A4f(-2)+04.f(1)+... (5). 128 2
Everett's formula gives the same value.
- It should be noted as regards Everett's formula, that in cala series of values the work is nearly halved since it will be found that terms in the formula can be made to do duty twice, "x" terms reappearing in the calculation as "y" terms.
This will be seen at once, for,(x2 1)A2.f(o)+x(x2- ( -4)A4f(-1)+... +yf(0)+y(y3i 1)A2.f(1)+y(y25,(y2-4)A4.f(2)+... andf(l+y)=yf('2)+y(Y2A2f(1)+(y21)5y2-4)A'f(0)+ ...+~.f(1)+x(x3-1)6,2f(0)+x(' 2-)(x.2 4),wf(1)+...,the last line being identical with the first. Thus, if we are inserting terms in a series by subdividing the interval into five equal parts, x = .2, .4, ... and y = 8, 6, .... Therefore half of the terms used in the calculation off (2) can be made to do duty in the calculation off (1.8), and similarly for the other terms.
- An example will indicate the method of working.
Example 3. Using Everett's formula, interpolate the missing terms in the following series, between f(40) and .f (50).
| x |
f(x) |
|
|
|
04 |
| 30 |
771 |
91 |
48 |
36 |
5 |
| 35 |
862 |
139 |
84 |
41 |
37 |
| 40 |
1001 |
223 |
125 |
78 |
28 |
| 45 |
1224 |
348 |
203 |
106 |
|
| 50 |
1572 |
551 |
309 |
|
|
| 55 |
2123 |
860 |
|
|
|
| 60 |
I2983 |
|
|
|
|
32
36 FINITE DIFFERENCES
The coefficients of the several terms in Everett's formula are
|
2 |
- 032 |
006336 |
|
.4 |
- 056 |
010752 |
|
6 |
- 064 |
011648 |
|
.8 |
- 048 |
008064 |
The work may be arranged in tabular form:
| r |
_-_. |
|
|
|
|
|
| |
|
$ |
2 2 |
Sum of first |
Sum of |
Inter |
|
x |
a f (1) |
_ x (x 1)
D2 f (0) |
_ _
x (x 1) (x 4)
~4f (-1) |
three terms |
second |
P p
result |
| |
|
31 |
5! |
|
|
|
| |
|
|
|
(2) + (3) + (4) |
tethree rms |
(5) + (6) |
|
(1) |
(2) |
(3) |
(4) |
(5) |
(6) |
(7) |
|
2 |
200.2 |
- 2.6 |
0.0 |
197.6 |
|
|
|
4 |
400.4 |
- 4.7 |
0.1 |
395.8 |
|
|
|
6 |
600.6 |
- 5.4 |
0.1 |
595.3 |
|
|
|
8 |
800.8 |
- 4.0 |
0.0 |
796.8 |
|
|
|
2 |
244.8 |
- 4.0 |
0.2 |
241.0 |
796.8 |
1037.8 |
|
4 |
489.6 |
- 7.0 |
0.4 |
483.0 |
595.3 |
1078.3 |
|
6 |
7344 |
- 8.0 |
0.4 |
726-8 |
395.8 |
1122.6 |
|
8 |
979.2 |
- 6.0 |
0.3 |
973.5 |
197.6 |
1171.1 |
|
2 |
314.4 |
- 6.5 |
0.2 |
3081 |
973.5 |
1281.6 |
|
4 |
628.8 |
-11.4 |
0.3 |
617.7 |
726.8 |
1344.5 |
|
6 |
943.2 |
-13.0 |
0.3 |
930.5 |
483.0 |
1.413.5 |
|
8 |
1257.6 |
- 9.7 |
0.2 |
1248.1 |
241-0 |
1489.1 |
Columns (2), (3) and (4), which represent the first three terms of the formula, are obtained by ordinary multiplication. Column (5) gives the sum of these terms. From what has been said above, it is clear that column (6), which represents the second set of three terms of the formula to fourth central differences, is obtained by writing down, in reverse order, the values of column (5) applicable to the previous group of terms. The addition of columns (5) and (6) then gives the desired result.
The given values of f (x) have been taken from the tabulated values of the probability of dying in a given year of age according to the HM mortality table, multiplied by 105.
The tabular values for the interpolated terms are 1038, 1081, 1122, 1172, 1281, 1345, 1415, 1490. The small differences between these values and the interpolated values are due to the fact that the HM table was constructed by means of a mathematical formula which is only approximately represented by Everett's formula.
CENTRAL DIFFERENCES 37
- Another method of applying the principles of central differences is to express the required function in terms of known values of the function among which it occupies a central position. This can conveniently be done by Lagrange's formula. The formulas are of two types according as the number of terms involved is odd or even. Thus we have by Lagrange :
Number of terms 2n +1. 3-term formula,f(x)_ f(1) _f(0)f(1)x(x21) 2(x+1)x +2(x_1) (6).5-term formula,.f(x)__.f(2) _ f(1) f(0)_ f(1)f(2)x(x'1)(x'4) 24(x+2) 6(x+1)+ 4x 6(x1)+24(x2)
(7).
7-term , formula,.f(x)f(3) __f(2)f(1) x(x'1)(x'4)(x'9) 720(x+3) 120(x+2)+48(x+1)f(0)+f(1)f(2)+f(3)8.36x 48(x1) 120(x2) 720(x3)()Number of terms 2n.
4-term formula,.f (x)=_ f ( 4) + f (i) f (i)+ f(4)(x".)(x' I)6(x+1) 2(x+4) 2(xi) 6(x2)6-term formula,
f(x)___(-4)+ f(-4)(a=1)(x'i)(x' 4)120(x+.) 24(x+i).t() + f (i)_f (I)+.f (4)_(lo).12(x+i) 12(xi) 24(xi) 120(xi)
- These formulas, of course, yield identically the same results as other central difference formulas embracing the same terms. To illustrate this we will recalculate the value of f(.4) in the example given in 7.
38 FINITE DIFFERENCES
Example 4. See Example 2. Seven terms are given, the formula will therefore be
f(4) = ,f(3) _ f(2) f(1)
4(161)(164)(169) 720 x 3.4 120 x 2.4+48 x 1.4
f (o) +f(1) f(2) f(3)
36x448x6 120x1.6+720x 2.6'
or f (4) = 0046592 f ( 3) + .0396032 f ( 2) 169728,f ( 1)
+ 792064, f (0) + 396032 f (1) 0594048 f (2) + .0060928f(3)
|
= |
+ 05055 |
00466 |
| |
1.64665 |
27647 |
| |
1.05079 |
20117 |
| |
02633 |
|
| |
+ 2.77432 |
48230 |
|
= |
2.29202 as before. |
Note, as a check, that the algebraic sum of the coefficients of the terms on the right-hand side of the above equation is unity.
13. For the sake of completeness it is necessary to refer to a system of notation in connection with central differences which was introduced by W. S. B. Woolhouse and is still in use to some extent. This system of notation is compared with that used in the previous chapters in the following scheme :
| Ordinary Notation |
Woolhouse's Notation |
| f(2) |
|
|
f(2) |
|
|
|
|
(2) |
|
|
|
a_2 |
|
|
| f(1)0 |
~2.f(2) |
|
.f(1) |
|
b_1 |
|
|
(1) |
|
Daf(2) |
|
a_1 |
|
c_i |
| f(0) |
A2f (1) |
&f(2) |
f(0) |
(ao) |
bo |
(co) do |
| Of (0) |
|
oaf(1) |
|
al |
|
c1 |
| f(1) |
,,2f(0) |
|
f(1) |
|
bl |
|
| Af(1) |
|
|
|
|
|
|
| f (2) |
|
|
f (2) |
|
|
|
where A f ( 2), 62 f ( 2), etc. are denoted by a_2, b_ etc. and ao = i (ai + a+1), co = 2 (c_1 + c+1).
Under this notation Stirling's formula to fourth differences is x2 x (x2 1) x2 (x2 1)
f(x)=f(o)+xao+bo+ ,, --co+ 4, do
=f(0)+(ao3°,)x+(2i:i)x'+°ixs+fix' ...(11).
CENTRAL DIFFERENCES 39
Similarly Gauss' formula can be written
x(x1) (x+1)x(x1)
f (x) = f (0) + xa, + 2! bo ' 3!
ci
+(x+1)x(x-1)(x-2)d (12).
4,1
14. Another system of notation, which is extensively used, is that due to W. F. Sheppard. Two operators 8 and /h are used, such that
8f( I) =f(0) .f ( 1), µ.f (1) = [.f (0) +f(1)],
sf(2)=.f(1)f(o), wsf(0)=[sf(I)+sf(i)7,
etc. etc.
This notation, although somewhat complicated, gives the usual central difference formulas in very convenient forms.