CHAPTER XX
APPROXIMATE INTEGRATION
- In many cases integration, or continuous summation of the values of a function, cannot be accomplished, either because the quantity to be integrated cannot be expressed as a mathematical function, or because the function itself is not capable of being integrated directly.
In these cases formulas of approximation can be used, which may conveniently be divided into two classes, viz. formulas expressing the value of the definite integral in terms of(i) the sum of the successive values of the function and of its derivatives,or (ii) the values of isolated values of the function, not necessarily successive.We shall now proceed to consider formulas of the first of these classes.
- The Euler-Maclaurin Expansion.
LetE f (x) = F(x),so thatf (x) = AF (x).n-iThenf (x)=f(0)+f (1)+...+f(n-1)0= F(n) - F (0).[See Chapter VII, 4]NowF (x) = f (x)(x)= (eD -1)-' f (x), since A = eD - 1,which, by actual division,_((1 1 D D31.D+12 720+' )f(x)D (x)-1 f(x) + 1 df(x)1 d3f(x)- + ...ifZ12 dx720 dx3= f f (x) dx (x) + i;E.f ~ (x) th f,,, (x) + ... .ThereforeF (n) - F (0) = fo f (x) dx - (.f (n) -.f (0)} +112- f' (n) - f' (0)1-th(f",(n)-f""(0)}+....ButF(n)-F(0)=f(0)+f(1)+...+f(n-1).
APPROXIMATE INTEGRATION 115
Hence
Jf(x)dx=U(0) +f(1)+ ... +f(n 1)+ (n)TIT {.f'(n).f'(0)}
+, h{f" (n)f"'(0)}... (1).
This result is not limited to the case where the ordinates are at unit distance apart, for, as has been remarked in connection with Finite Differences, by changing the origin and unit of measurement the formula can be given a more general form. Thus
1 fa -
~. ~a f(x)dx=if (a)+,f(a+r)+...+f(a+islr)+ f(a+nr)
- —*r { f' (a + nr) .f ' (a)} + 770 i.f,,, (a + na) -f"' (a--)}
- -30240 {f <<) (a + nr) f (v) (a)} + ... .(2). Example. Calculate f20 X Taking values at unit intervals we have, remembering that
dd3=1 and= x''6d~~df : dx x' 120 + 211 + 1 22 + 123 + 124 + 1 ' 25211121~ 25 ' +210 'J111-r 120 'v 254 + 204
= 025000 047619 045455 043478 041667 020000
223219 11s (.0009) + Th (.00000369)='223144.The value of the integral is clearly equal to loge 2i, which to five places of decimals is 22314.3. tiVoolhouse's Formula.
This formula gives a relationship between the sum of consecutive ordinates and the sum of equidistant ordinates at greater intervals. It can be derived from the Euler-Maclaurin formula as follows.
82
116 INTEGRAL CALCULUS
1:1(x) Formula (1) gives
dx= f(0)+f(1)+...+f(n1)+ f(n) {f (n)f'(0)}
+ { (n) f"(0)} .... If the interval is 1 the formula becomes
l
m j:f(x) dx = f(0) +f (a)+1(2)+...
+ if (n) 12nc t f (n ) .f (0)1 + 720nc3 {.f" (n) f"(0)1 ...,
whence from the first of the above equations .1 f(x)dx=m {f(0)+f(1)+...+(n)l
2 {f(0)+f(n)} 2{f'(n)f'(o)+720{ fn(n) f,.,(0)}... and from the second equation
r n Jo f O = xdx + f +...+ n 0+ f(n
{f(0) (~t~ fO {f O )}
12nc { f (n) .f'(0)} + 720ms {f"(n) f'"(0)1 ...,
whence, by subtraction,
.f(0)+f(m)+...+f(n)=m{.f(0)+f(1)+...+f(n)}
m -1 If (0) + f (n)} ~n 1 If ' (n) f' (0)}
`~ 12m
+ 72011 s If, (n) f"'(0)1 ... (3).
4. By changing the unit of measurement in formula (1) the following result can be obtained:
f(0)+f(1)+f(2)+ ... +f (Inn) = n {.f (0)+f(n) +f(2n) + ...
+ f (mn)} n 2 1 { f (0) +f (mn)} n2
121 { f' (mu) f' (0)} n4 -1
[f" (mn4 ) f,,,(0)1 ... . O. + 720
This formula enables the sum of consecutive terms of a series to be expressed in terms of those at greater intervals. Thus the
APPROXIMATE INTEGRATION 117
work may often be shortened, particularly where the values of interms of the series require to be obtained by calculation in the first instance.
5. Lubbock's Formula.
Lubbock's formula is similar to that of Woolhouse, but it subfinite differences for the differential coefficients.
Now D=01,Q2+i-A3I04+...
and D'=0'2 D4+....
Therefore, substituting in the above formula (3), we get
f(0)+f (1) +.f (2)+... +f(n)
m in
m{f(0)+f(1)+f(2)+...+f(n)' m2-1 If (o) +f (n)}
m2 {Af(n) Of(0)}+2 -1 {,12f(n)A2.f(0)1
118 INTEGRAL CALCULUS
7. In cases where the terms of a series decrease steadily and the term corresponding to the upper limit tends to the value zero, the above formulas can be simplified somewhat, since the final term of the series, its differences and derived functions all vanish. Also it is frequently the case that the end terms of the series are unimand thus m and n may be taken at any suitable figures so as to correspond with tabulated values of the function.
To illustrate this we will calculate, first by Woolhouse's formula
x=m
and then by Lubbock's, the value of (1.1)-x.
s=10
Example 1. By Woolhouse's formula.
Let us use formula (4) and take n = 15. The values of (1.1)-x tend to become unimportant when x = 100, therefore we will take m = 6 and ignore the values of the differential coefficients at the upper limit.
Then
f(x)(1.1)-x, f' (x) = (1'1)x log, P1, f" (x) = (1.1)x (loge 1.1 )3.
Also loge 1.1 ='09531. Thus we get
|
x |
(1.1) |
|
|
|
10 |
38554 |
|
152 1 (1.1)-10=2.6988 |
| |
|
|
|
|
25 |
09230 |
|
| |
|
|
40 |
02209 |
152-1 |
-10 09531= |
|
| |
|
12 |
x (1.1) x |
6859 |
|
55 |
00529 |
|
|
|
| |
|
|
|
|
|
70 |
00127 |
15204_1 |
|
0234 |
| |
|
x (1.1)-1°x |
(09531)3= |
|
|
85 |
00030 |
|
|
|
|
100 |
00007 |
|
|
|
|
|
|
|
|
|
50686 x 15=7.6029
And the final result is
7.6029 2.6988 6859 + 0234 = 4.2416. The true value is, of course,
(11)-70 = 4.2410, 1
11.1
which shows that the error involved by disregarding the final terms of the series is small.
APPROXIMATE INTEGRATION 119
Example 2. By Lubbock's formula.
In this example we will take n = 10, using formula (6).
|
x |
(1.1)-_ |
A |
|
A3 |
A4 |
|
10 |
38554 |
- 23690 |
+'14557 |
- 08946 |
+'05500 |
|
20 |
14864 |
09133 |
05611 |
'03446 |
|
|
30 |
'05731 |
03522 |
02165 |
9 |
|
40 |
'02209 |
01357 |
|
-2f(10)=-1.7349 |
|
50 |
00852 |
|
|
|
120A= - '1954 |
|
60 |
00328 |
|
|
|
70 |
'00127 |
|
|
9 9.1 .0600
- A2= - |
|
80 |
00049 |
|
|
|
240 |
|
90 |
00019 |
|
|
|
99 x 1899 03= _ 0233 |
|
100 |
.00007 |
|
|
| |
|
62740x 10=6.274020,000 |
|
| |
|
|
_ 99 x 899 A4= _ .0102 |
| |
|
|
480,000 |
| |
|
|
- 2.0238 |
The result is 6.2740 -2'0238 = 4'2502 as compared with the true value of 4.2410.
- The above examples illustrate points of disadvantage which may arise in connection with the formulas.
Woolhouse's formula can only be applied to a mathematical function where the differential coefficients can be obtained. In other cases, Lubbock's formula must be used, and then it may often happen that the terms in the formula do not converge sufficiently rapidly to give a good result, unless a large number of terms is used. This accounts for the relatively poor result shown in the example above. If intervals of 15 had been used instead of 10, a worse result would have been shown.Some of these disadvantages can be met by the use of the formulas given in the following Articles.OTHER FORMULAS OF APPROXIMATE INTEGRATION
- The definite integral of any function can be expressed in terms of the individual values of any number of ordinates by assuming that the function can be represented, to a sufficient degree of approximation, by a parabolic function of the requisite degree in x.
^210. Thus to express the value of I f (x) dx in terms off (0), f (1) .oand f (2), letf (x) = a + bx + ex'.
120 INTEGRAL CALCULUS
[N.B. Since we are to express the result in terms of three values of the function, we introduce three terms involving three unknown constants a, b and c in the expression representing f (x).]
2 2
Then fo f(x)dx= f o(a+bx+cx2)dx
= bx2 cx' 2 Lax+ 2-+ 3
0
=2a+2b+3.
Also f (0) = a, f(1)=a+b-}c, f(2)=a+2b+4c.
These equations could be solved for a, b and c, and the resulting values substituted in the value of the integral found above. Alternatively, we may proceed as follows:
Let Jf(x) dx =pf(0) + qf(1) + rf(2).
Then 2a+ 2b+ 3 =pa + q (a + b + c) + r (a + 2b + 4c),
so that p+q+r=2,
q+2r=2,
q+4r=. Whence r=q=*, p=
and I2 f(x)dxf(0)+4 3(1)+f(2) (7). By analogy we may write
.f (x) dx = n
{f (0) + 4f (n) +.f (2n)} (8).
This result is known as Simpson's Rule.
By dividing the whole area from 0 to 2n into n consecutive equal spaces and applying Simpson's rule to each, we obtain
Jo f(x)dx=3{f(0)+4f(1)+2f(2)+4f(3)+2f(4)+... +f(2n)l...(9).
APPROXIMATE INTEGRATION 121
This formula should normally yield better results than a single application of the formula (8) over the whole range of integration. It can, of course, only be applied where a sufficient number of values of the function to be integrated is available.
- Where the number of terms is four, by proceeding in a similar manner to the above, we arrive at the result
f 3n f (x) dx = $ { f (0) + 3f (n) + 3f (2n) +f (3n)} ...(10).
- The process of obtaining the desired formula may be simplified somewhat, when the given terms are arranged symmetrically about the central point, by adopting the central point as origin.
This may be illustrated by proving the well-known Weddle's Rule.In this case f o f (x) dx is to be expressed in terms off (0), ,f (I), ... f (6).Letf(x)=a+Ox+cx'+dx'+ex'+fx°+guy.(+34864374ThenJ ~f(x)dx=6a+18c+ 5 e+7 g.Alsof (0) = a,
- + f ( 1) = 2a + 2c + 2e + 2g,
+ f ( 2) = 2a + 8c + 32e + 128g, f(3)+f(3)=2a+18c+162e+14588.
Solving these equations for a, c, e and g, and substituting the resulting values of these constants in the expression for the inwe obtain
-+3 1
j sf(x)dx=1401272f(0)+27f(1)+f(1) +216f(2)+f(2)+41f(3)+f(3)}.
This is not in a very convenient form for numerical work, so we add
140f(3) 140{20f(0)+15f(1)+f(1)
-6f(2)+f(2)+f(3)+f(3)},
122 INTEGRAL CALCULUS
thus giving
- üf(x) d x+ 140 1 A6f(3)= 1 14 0 {252f(o)+4Vf(1)+f(1)
+ 210f(2) + f (- 2) + 42f(3) +f(- 3)}.
Neglecting the term 1~ O6 f ( 3) which will usually be very small, we arrive at the final result
1 - 3(x) dx = 10
+ 5f ( 2) +f ( 3)}...(11), or, changing the origin,
f/(x) dx=10}f(0)+5f(1)+f(2)+6f(3)+f(4)
+ 5 f (5) +f (6)}...(12).
13. Another powerful formula can be obtained by expressing f 0 f (x) dx in terms of f (0), f (1), f (3), f (5) and f (6).
Having five values of the function, let
f (x) = a +bx+cx2+dx3+ex°.
| Then |
f+3 _3f(x)dx=6a+18c+56e. |
| Also |
|
f (0) = a, |
| |
f(2) |
+ f ( 2) = 2a + 8c + 32e, |
| |
f (3) |
+ f ( 3) = 2a + 18c + 162e. |
Solving for a, c and e, and substituting in the equation for the integral, we find
3f (x) dx = 2'2 f (0) +1 '62 { f (2) + f ( 2)} +'28 { f (3) + f ( 3)}, or, altering the origin and limits, fonf(x)dx=n{'28f(0)+f(6n)+1.62f(n)+f(5n)+2.2f(3n)}
(13). Similarly
Iln
f f (x) dx = n {28 f (6n) + f (12n) + 1.62f (7n) + f (11n)
+ 2.2 f (9n)}.
APPROXIMATE INTEGRATION 123
6n '12n
Then I o f (x) dx =f o f (x) dx +16n f (x) dx + ...
J = n x.28 { f(0) + 2f(6n) + 2 f(12n) + ...} +1.62 {f(n)+f(5n)+f(7n) + ...}
+ 2.2 { f (3n)+f (9n) + ...}].
Now in a series of values decreasing to zero, if 7n be so chosen as to fall just within or just without the limits of the table of the function to be integrated, we obtain the convenient formula
f(x) dx = n {'28 f (0) + 1.62f (n) + 2.2 f (3n) + 1.62f (5n) . o
+ 56 f (6n) + 1.62 f (7 01.. 414).
The formulas in this Article are due to G. F. Hardy and the last is usually known among actuaries as 39 (a), since that is the number assigned to it in the original Text Book, Part II.
- A useful formula, involving only a simple summation of certain terms of the given series, is as follows :
1Oafo f(x)dx=10n[.f(n)+.f(4n)+f(6n)+f(9n)]...(15). 4By expanding f(x) in a series of ascending powers of x by Maclaurin's Theorem, it is easy to show that the formula involves a small second difference error. It can, however, be used conwhere only a rough result is required.
- An alternative method of obtaining formulas of this charis to express f (x) in terms of the given values of the function. This can be done by Lagrange's formula and the resulting exis then integrated between the desired limits.
As an example, we will develop formula (13) in this way.The given values of the function are f (3), f (2), f (0), f ( 2) and f( 3). Thenf(x) (x + 2) x (x 2) (x 3)f((x+3)x(x2)(x3)=lx3x5x63)+ lx2x4x5 f( 2)
+(x+3)(x+2)(x2)(x3)f(0)+(x+3)(x+2)x(x3)f(2)3 x 2 x 2 x 35x4x2x1+(x+3)(x+2)x(x2)f(3)6x5x3x1
124 INTEGRAL CALCULUS
r Therefore
f s f(.) dx = f (- 3) +3 3(x + 2) x (90 2) (x- 3) dx + similar terms
=28f(-3)+1.62f(-2)+2.2f(0)+1.62f(2)+ 28f(3) as before.
16. The above methods are perfectly general and afford means of expressing the value of an integral in terms of any given values of the function.
It will be of value to indicate the method of application and to show the degree of accuracy in each case by applying them to an example.
Thus fe dx= 2 log, 2 =1.38630. . s
(i) Simpson's rule applied once gives
* (i + + $) = 1.42500.
(ii) Simpson's rule applied three times over the values 2-4, 4-6. 6-8 gives
(i+ ++ +i++i)=1.38770.
- (iii)The "three-eighths" rule gives
(i+++i)=1.40625.
- (iv)Weddle's rule gives
(2+ +++i+ +i)=1'38679.
- (v)Formula (13) gives
1.28 (2 + i) + 1.62 ( + +) + -252= 1.38643.
(vi) If formula (15) is used, n = .6 and we get 6[°6+44+516+714 =138839.
As the values of the function are changing rapidly over the period used, the above is a somewhat severe test of the formulas. It will be noticed, however, that Weddle's rule and formula (13) differ from the true value only in the fourth place of decimals.