CHAPTER IV
FINITE DIFFERENCES. INTERPOLATION
- 1.The subject of interpolation is one of the most important in Finite Differences and may be enunciated as follows.
It frequently happens that we have given a number of values of f (x) corresponding to different values of x, and we wish to find a value of the function for some other value of x. If the form of the function is known or can be deduced from the given values, the problem is, of course, simple, although in many cases it is more convenient to proceed by the methods of Finite Differences. But it is frequently the case, especially in actuarial work, that the function cannot be expressed, algebraically or otherwise, in any simple form, and resort must be had to other devices.
2.
Looked at from the point of view of a problem in graphs, we may regard the given values of the function as representing a number of isolated points on a curve, and it is desired to plot a further point corresponding to a given value of the abscissa.
It follows that if the form of the function (i.e. the equation of the curve) is unknown, some assumption must be made as to the relationship between the different values. The formulas of finite differences assume that this relationship can be expressed in the form
y= a + bx+cx2+da,'+... + / x'i-'.
This assumes (see Chapter III, 8) that all orders of differences higher than the (n 1)th vanish, but, as pointed out in Chapter II,
4, this assumption can be made without introducing important errors in practically all cases where actuarial functions are involved.
3.
The above equation contains n constants, and therefore n values of the function must be known if the values of the constants are to be determined. Conversely, if n values only are known and the methods of finite differences are to be applied, it must be assumed implicitly that all orders of differences higher than the (rt 1)th vanish.
The most obvious method of procedure is to obtain the n equations given by the n values of the function and to find the values of the constants therefrom. The assumed form of the function22
20 FINITE DIFFERENCES
is then completely determined and the value corresponding to any value of x can be obtained.
In the majority of cases, however, this is not the most simple method of working, for other devices can be adopted which will materially shorten the arithmetical work. It is important to note, however, that alternative formulas, in which the same values of the function are used, lead to identical results.
In some cases there is scope for the exercise of the ingenuity of the solver, but usually the problems fall into the main categories which are illustrated in the following examples.
5. Example 1. When n equidistant values of a function are given and it is required to find the value of some intermediate term or terms.
This can be done readily by the application of formula (1) of Chapter III, or by the simpler formula (3). From the given values the successive orders of differences are calculated, and the result is obtained by direct substitution.
Thus, taking the numbers living by the HM table at ages 45, 50, 55, 60 and 65, it is required to find the value for age 57.
In conformance with formula (3) the given values can be denoted by f (0), f (1), ..., so that the required value is f (2.4). Then
1 f(2.4)=f(0)+2.40f(0)+ 24 x2 4 A2f(0)
2.4x1.4x4 2.4x1.4x x6
+ -
| x |
.f lx) |
f (x) |
A'f(x) |
03 f lx) |
f (x) |
| 0 |
77918 |
-5123 |
-1106 |
-389 |
+75 |
| 1 |
72 795 |
- 6229 |
-1495 |
- 314 |
|
| 2 |
66566 |
- 7724 |
-1809 |
|
|
| 3 |
58842 |
- 9533 |
|
|
|
| 4 |
49309 |
|
|
|
|
From above:
f(2.4)=77918+2.4(5123)+1.68(1106) +'224(389)0336(+75) =7791812295.21858187.12.5
= 63675.1.
The value given by the table is 63677.
6 03 f(0) + 24 A4f (0)
The working is as follows:
INTERPOLATION 21
The difference between the interpolated value and the true value is due to the fact that the interpolation curve, which is based on the assumption that all differences of higher order than the fourth vanish, represents only approximately the true function.
6. Example 2. When the values given and the value sought constitute a series of equidistant terms.
If there are n terms given of which n - 1 are known, then, as explained in § 3, it must be assumed that the (n - 1)th order of differences is zero.
Thus, using formula (2) of Chapter III, we have
An-if (0)=0=f('n-1)-(n-1)f(n-2)+ (n21)f(n-3)-...
+ (-1)n-l.f (0)
In this equation there is only one unknown quantity and its value can, therefore, be readily obtained. For example, if
f (0) = log 3'50 = '54407,
- f (1)= log 3.51 ='54531,
= log 3.52 ='54654, f (4) = log 3.54 ='54900,and it is required to find log 3'53, i.e. f (3).From above:f(0)=0=f(4)-4f(3)+6f(2)-4f(1)+f(0),whencef(3) =f (4) + 6.f (2) - 4f (1) +f (0)4= .54777,which agrees with the true value to five decimal places.
7. Example 3. If more than one term is missing from the comseries, a somewhat similar process may be followed. Thus, if two terms are missing, only (n-2) terms are known and the (n-2)th order of differences must be assumed to vanish. It is then possible to construct two equations:
A"-2.f(0)=.f(n-2)-(n-2)f(n-3)+...+(-1)n-'f(0)=0,An_2f(1)=f (n-1)-(n-2)f(n-2)+...+(-1)n-zf(1)=0.
From these equations, the values of the two unknowns can be calculated.Similarly if a larger number of terms is missing, the method can be extended.
22 FINITE DIFFERENCES
8. Example 4. If several equidistant values are given, together with one isolated term.
For instance, if three values f (0), f (1) and f (2) are given, together with a further value f (h). Having four values of the function it must be assumed that the fourth order of differences is zero and it remains to find the values of the other three leading differences. The first two leading differences are obtained at once by differencing the first three terms of the series, and the value of the third difis then given by the equation
.f(h)=f (0)+hOf(0)+(2) 02 f(0)+(3) z f(0)
For example, taking the numbers living by the H`' table at ages 45, 46, 47 and 50, it is required to find values for ages 48 and 49.
| |
0 |
A2 |
| f(0)=77918 |
-954 |
-32 |
| f(1)=76964 |
-986 |
|
| f (2) = 75978 |
|
|
| f (5) = 72795 |
|
|
f(5)=f(0)+5Af(0)+1060f(0)+10.~3f(0),
f(0)° f (5)[f(0)+50f(0)+1002f(0)] 10
72795 [77918 4770 320]
10
=--- - 3.3.
The table is then completed by addition. Thus:
|
Age |
f (x) |
A |
4,2 |
A3 |
|
45 |
'77918 |
954 |
32 |
3.3 |
|
46 |
76964 |
986 |
35.3 |
3.3 |
|
47 |
75978 |
-1021 3 |
38.6 |
3.3 |
|
48 |
74956.7 |
-1059'9 |
41'9 |
|
|
49 |
73896.8 |
-1101.8 |
|
|
|
50 |
72795.0 |
|
|
|
The work is checked by the reproduction of the value for age 50. The tabular values for ages 48 and 49 are 74957 and 73896 respectively.
INTERPOLATION 23
'Values precisely the same as those obtained above would have been given if the two missing terms had been inserted by the method described in Example 3. It is instructive to confirm this by actual calculation and to compare the two methods of procedure.
9. Example 5. Subdivision of Intervals.
This problem arises when a series of equidistant terms of a series is given (usually every fifth term or every tenth term) and it is desired to find by interpolation the values of all the intermediate terms.
The simplest method of procedure is to calculate from the given values the differences corresponding to the individual terms of the series (the subdivided differences) and thence to construct the table by summation. The calculation is checked by the reproduction of the values of the original terms.
Thus assume that the given terms are f (0), f (1), ... f (5) and it is desired to complete the series f (0), f (*), f (a), etc. It is conto adopt the notation
f (1) f (0) = Af (0),
and f (3) f (0) = s f (0).
The problem then becomes to express 3f (0), 82f (0), ... in terms of A f (0), Q2 f (0), ....
Writing f (1), f (2), ... in terms of the subdivided differences,
f (0) = f (0)
f (1)= f (0) + 58f (0) + 1082f (0) + 1083f (0) + 584f (0) + 83/(0)
- f (2)= f (0)+108f (0) + 4582f (0) + 12083f (0) + 21084f (0) + 25285f (0)
= f (0)+158f (0)+10582f (0) + 45583f (0) + 136584f (0) + 300386f (0)=f (0)+208f (0)+19082f (0)+114083f (0) + 484584f (0)+1550485f (0)= f (0)+258f (0)+30082f (0)+230083f (0)+1265084f (0)+531308bf (0)
Differencing successively both sides of the equation, we have
Af(0)=58f(0)+ 1082f(0)+ 1083f(0)+ 584f(0)+85f(0).f(1) =58f (0) + 3582f (0) + I1083f (0) + 20584f (0) + 25185f (0)A f(2)=58f (0) + 6082f (0) + 33583f (0)+115584f (0) + 275185/(0)f(4 )=58 (0) + 1105f ()f (0)f ()fAf1108+ 116083f(0) + 780584f(0) + 3762686f (0) &f(0) = 2582f (0) + 10083f (0) + 20084f (0) + 25086f (0) Alf (1) = 2582f (0)+ 22583f (0) + 95084f (0) + 250085f (0) &f(2)= 2582f(0)+ 35083.f(0)+232584f(0)+ 975085f(0) Alf (3) = 2582f (0) + 47583f (0)+432584f (0) +2512583f (0)A3f (0) = 12583/(0) + 75084f (0) + 225086f (0)A3 f (1) = 12583f (0) + 137584f (0) + 725083f (0) A3f (2) = 12583f (0)+200084f (0)+1537586f (0)A4 f (0) = 62584,f (0) + 500086f (0) A4f (1) = 62584f (0) +812586f (0)A6f (0)=312586f (0)
24 FINITE DIFFERENCES
Whence the values of 8f (0), 82f (0), ... 8y(0) can readily be obtained.
10. Alternatively the formulas for 8, 82, ... can easily be written down by using the method of Separation of Symbols.
| Thus |
(1 |
+ 8)5 f (x) = (1 + 0) f (x). |
| Therefore |
(1 |
+ 8) f (x) = (1 + A) * f (x), |
| and |
|
6 f (x) = [(l + 1] f (x) |
| |
|
_ [' 2 A '08 02 + '048 As ... ] f (x). |
| Hence |
|
82 f (x) = ['2 A '08 02 + '048 As ... ]2 f (x) |
_ ['0402.03203+'0256A4...] f(x) and so on.
For convenience the coefficients of 0, As, ... occurring in the values of 8, 82, ... are given, for the intervals 5 and 10, in the foltables.
Subdivision into 5 intervals
| |
Coefficient of |
|
Value of |
|
| |
A |
A2 |
D2 |
A4 |
As |
| a |
+ '2 |
'08 |
+ 048 |
'0336 |
+'025536 |
| S2 |
|
+'04 |
032 |
+'0256 |
'02112 |
| S3 |
|
|
+'008 |
'0096 |
+'00960 |
| 84 |
|
|
|
+ 0016 |
00256 |
| as |
|
|
|
|
+ '00032 |
Subdivision into 10 intervals
| |
Coefficient of |
|
Value of |
|
| |
A |
e2 |
A2 |
A4 |
As |
| d |
+'1 |
045 |
+ 0285 |
0206625 |
+ 01611675 |
| d2 |
|
+ '01 |
--009 |
+.007725 |
0066975 |
| S3 |
|
|
+'001 |
00135 |
+'0014625 |
| S4 |
|
|
|
+ '0001 |
00018 |
| as |
|
|
|
|
+ 00001 |
INTERPOLATION 25
11. The following example gives an illustration of the method of working.
Given the present values, at 3 per cent. interest, of an annuity of 1 per annum for 20, 25, ... 45 years, it is required to find the intervalues.
We have
|
x |
f (x) |
0 |
0' |
Da |
D4 |
05 |
|
20 |
14'8775 |
2.5356 |
'3483 |
0478 |
0065 |
0007 |
|
25 |
17.4131 |
2.1873 |
'3005 |
'0413 |
'0058 |
|
|
30 |
19.6004 |
1.8868 |
2592 |
0355 |
|
|
|
35 |
21.4872 |
1.6276 |
2237 |
|
|
|
|
40 |
23.1148 |
1.4039 |
|
|
|
|
|
45 |
24.5187 |
|
|
|
|
|
Applying the factors given in the former of the above tables, we have
8 f (20) = [20 .0802 + 048A' 0336A4 + .025536W] f (20)
= 2 x 2.5356 +.08 x 3483+'048 x 0478+'0336 x 0065 + 025536 x 0007
= 5375146752.
Similarly
| 82 = |
.015642784, |
84 _ |
000012192, |
| 83 = |
000451520, |
84 = |
000000224. |
The table is then constructed by addition from these leading differences as shown below.
It is necessary to consider how many decimal places should be retained in the working. This depends, in the first place, on the degree of accuracy desired in the result. Thus if four decimal places are required in f (x), our result must be given to at least one place more. Further, the range of the formula is 25 terms, and in the final term the values of 8, 82, ... 85 are multiplied respectively
by (21) , (2.25), ... (5 ), which are respectively equal to 25, 300,
2300, 12650, 53130. In view of the magnitude of these coefficients, we shall need to retain at least six decimal places more in the value of 84 than are required in the final value of f (x). Since the coof the lower orders of differences are smaller than 53130,
26 FINITE DIFFERENCES
a correspondingly smaller number of decimal places can be retained. In practice, however, there is little to be gained by cutting down, unless only a rough result is required.
The working of the first five terms in the example is shown below. It will be noticed that the accuracy of the work up to this stage is checked by the exact reproduction of the value of f (25). The interpolated values agree exactly with the true values to four places of decimals.
|
x |
f (x) |
g2 |
g3 |
$4 |
b5 |
|
20 |
14.8775 |
5375147 |
'01564278 |
000451520 |
'000012192 |
'000000224 |
|
21 |
15.415015 |
5218719 |
1519126 |
439328 |
11968 |
224 |
|
22 |
15.936887 |
5066806 |
1475193 |
427360 |
11744 |
224 |
|
23 |
16.443568 |
4919287 |
1432457 |
415616 |
11520 |
224 |
|
24 |
16.935497 |
4776041 |
1390895 |
404096 |
11296 |
224 |
|
25 |
17.413101 |
4636951 |
1350485 |
392800 |
11072 |
224 |
12. Example 6. Lagrange's Theorem.
We have now to consider the construction of an interpolation formula which will apply when the given terms of the series are not equidistant.
Let n values of the function be given, namely
f(a),f(b),f(c),...f(n).
Then the function must be assumed to be a parabolic function of x of degree (n 1). (See § 3.) Assume therefore that the function can be represented as
f(x)= A(xb)(xc)... (x n)
+ B (xa)(xc)... (xn) + C(x a)(xb)... (x n) + etc.,
there being n terms in all, each composed of (n 1) factors multi-plied by a constant, the values of the constants having yet to be determined. It is clear that the right-hand side of the equation is of degree (n -1).
To find the values of the constants we proceed as follows:
Put x = a.
Then f(a)=A(ab)(ac)...(an).
INTERPOLATION 27
Therefore A= f (a)
(a b)(a c)...(a n)'
Similarly B = (b a)(bf o)... (b n)'
and so on.
Substituting these values of A, B,... in the original equation, we have
f(x)= f (a) (x b) (x 0... (x n) +f (b)(xa)(xc)...(xn)
(a b) (a c)...(a n) (b a) (b c)...(b n)
+...+f(n)(xa)(xb)(xc) (1).
(n a) (n b)(n c) ...
By an obvious transformation, the formula can be put in a some-what simpler form for calculations, namely
f (x) f (a)
(x a) (x b) ... (xn) (xa)(ab)(ac) ...(an)
f (b) f (n)
+ (b a)(x b)...(b n) + + (n a) (n b) (n c)...(x n)
(2).
In memorising the formula it should be noted that the denomiare made up of the product of the algebraic differences of the values of the variable, the term (a a) being replaced by (x a) and so on.
13. The formula is somewhat laborious to apply, and careful attention to signs is required, but it is convenient to use where only one or two unknown values of the function are required. Since the assumptions underlying it are precisely similar to those previously explained, its use in any particular case will give identical results with those which can be obtained by the use of the ordinary methods of Finite Differences where a sufficiently high order of differences has been taken into account.
To illustrate this point and to provide an example of the use of the formula, we will calculate by Lagrange's formula the value for age 49 in Example 4. In this case we have
f(0)=77918, f(l)=76964, f(2)=75978, f(6)=72795, and it is required to find the value off (4).
28 FINITE DIFFERENCES
We have accordingly
.f (4) _ .f (0)
(40)(41)(42)(45) (40)(01)(02)(05)
f (1) __ _.f(2)
+(10)(41)(12)(15)+(20)(21)(42)(25)
+ f(5) (50)(51)(52)(45)'
or, '2I f (4) = I f (0) + I f (1) j~f (2) I f (5)
Whence we find f (4) = 73896.8, as before.
It should be noted, as a check on the formula, that the sun of the coefficients of the terms on the right-hand side of the equation must equal the coefficient of the term on the left-hand side of the equation.
14. Problems of interpolation between terms at unequal intercan also be dealt with in a simple way by the formulas of Divided Differences (see Chapter VIII).