Let us solve the differential equation
A numerical solution of (20) by the Taylor series method
(using (2)) is
( y = y' = y'' = ...... = y(p) ),
or
The numerical solution of (20) ( using (22) or (23)) will
depend on the number of Taylor series terms used.
Note : The analytical solution of (20) is
In Fig.4.1 the solution of (20) is shown. Fig.4.1 consists of two parts. The part labelled TEST3 shows a calculation of the differential equation (20) for integration step h=0.1s.
The part labelled TEST5 shows a computation with an integration step h=0.5s. As expected, the value of ORD has automatically increased as h grows. The value of y at time T=1s is of course the same in both parts of Fig.4.1.
Results illustrating the use of the Taylor series for applying a numerical integration method are shown in Tab.5. Tab.5 demonstrates the results of a numerical solution of the differential equation (20) after one computation step (with the integration step h=1s).
In each line of Tab.5 the "Reduced value y(1)" of the numerical solution of the differential equation (20) and the corresponding value of the "Absolute error" - for the method order ORD used are printed.
In the column "Absolute error" we can read the difference
between the exact and numerical solutions. For the exact solution
of the equation (20) for t1= h=1s, in view of the equation (23),
we have
y(1) = e1 = 2.718281828459045235.....
| Reduced value y(1) | ORD | Absolute error |
| 2. | 1 | -0.718281828459045235 |
| 2. | 2 | -0.218281828459045235 |
| 2. | 3 | -0.051615161792378683 |
| 2.7 | 4 | -0.009948495125712053 |
| 2.71 | 5 | -0.001615161792378750 |
| 2.718 | 6 | -0.000226272903489866 |
| 2.7182 | 7 | -0.000027860205077168 |
| 2.7182 | 8 | -0.000003058417775609 |
| 2.718281 | 9 | -0.000000302885853176 |
| 2.7182818 | 10 | -0.000000027312660911 |
| 2.71828182 | 11 | -0.000000002260552523 |
| 2.718281828 | 12 | -0.000000000172876824 |
| 2.7182818284 | 13 | -0.000000000012286394 |
| 2.71828182845 | 14 | -0.000000000000815681 |
| 2.71828182845 | 15 | -0.000000000000050959 |
| 2.71828182845904 | 16 | -0.000000000000003220 |
| 2.71828182845904 | 17 | -0.000000000000000444 |
| 2.71828182845904 | 18 | -0.000000000000000333 |
| 2.71828182845904 | 19 | -0.000000000000000333 |
| 2.71828182845904 | 20 | -0.000000000000000333 |
Tab.5: Long real arithmetic
In order to make the results of the numerical solution more clear and illustrative only the digits tallying the digits of the exact solution are shown.
It follows from Tab.5 that the requirement of a higher method order is justifiable - with the same integration step h a higher method order (i. e. with more terms of the Taylor series) can yield a higher accuracy (it approximates better the exact solution).
However, the increase in the accuracy of the result is not unlimited. In Tab.5 the accuracy stops increasing when the ORD reaches the value of 18. This is caused by an underflow during the computation of the higher order Taylor series terms. The addition of these terms changes neither the resulting value of yn+1 nor the absolute error - the absolute error has reached its saturated value ESAT (the value of ESAT depends on the word width of the arithmetic of the computer used).