The exact solution of (3) is
so that the absolute error of the numerical solution can
be determined as the difference between the numerical and exact
solutions.
To numerically solve (3) by the Taylor series method ( using
(2)) we need to calculate the following formulas:
| = | af[3](t,y)cost-6af[1](t,y)cost+aycost-4af[2](t,y)sint+ | ||
| 4af(t,y)sint; |
| = | |||
| 5af[3](t,y)sint+10af[1](t,y)sint-aysint; |
| = | a f[5](t,y)cost-15af[3](t,y)cost+15af[1](t,y)cost- | ||
| aycost-6a f[4](t,y)sint+20af[2](t,y)sint- | |||
| 6af(t,y)sint; |
| = | af[6](t,y)cost-21a f[4](t,y)cost+35af[2](t,y)cost- | ||
| 7af(t,y)cost-7a f[5](t,y)sint+35af[3](t,y)sint- | |||
| 21af[1](t,y)sint+aysint; |
| = | af[7](t,y)cost-28a f[5](t,y)cost+70af[3](t,y)cost- | ||
| 28af[1](t,y)cost+aycost-8af[6](t,y)sint+ | |||
| 56a f[4](t,y)sint-56af[2](t,y)sint+8af(t,y)sint; |
.
. (5)
Note: One way to calculate the formulas (5) is to use the DERIVE
system (a special program for symbolic differentiation).
Methods of different orders can be used in a computation. For
instance the 1st order method
( ORD=1 ) means that when computing
the new value yn+1 only the first Taylor series
term is taken into account
the 2nd order method
( ORD=2 ) uses
Taylor series terms up to the second power of the step h
etc.
The quality of the computation can be judged by the tables Tab.1 and
Tab.2
(integration step h=0.1s and printing interval 1s were parameters of the
computations). Tab.1 and Tab.2 present
the numerical solution of
(3) using formulas (5).
| t(s) | ORD4(%) | ORD6(%) | ORD8(%) |
| 1.0 | 5.5e-04 | 3.7e-06 | 1.0e-08 |
| 2.0 | 2.7e-04 | 9.2e-07 | 4.5e-09 |
| 3.0 | 7.9e-04 | 2.5e-07 | 7.1e-09 |
| 4.0 | 9.4e-04 | 1.7e-05 | 1.9e-08 |
| 5.0 | 8.0e-05 | 2.6e-05 | 2.3e-08 |
| 6.0 | 7.7e-04 | 3.7e-06 | 9.4e-09 |
| 7.0 | 1.3e-03 | 4.2e-06 | 3.9e-09 |
| 8.0 | 1.1e-03 | 2.8e-06 | 8.3e-09 |
| 9.0 | 1.5e-03 | 2.6e-06 | 4.8e-09 |
| 10.0 | 1.2e-03 | 9.6e-06 | 1.6e-08 |
Tab.1
The absolute value of the relative error of the computation at chosen times (1,2,..10 s) is the main criterion for evaluating the computation ( Tab.1). In the column "ORD4" the absolute values of the relative error of the computation are shown; the 4th order method ( ORD=4) was used. Similarly, the 6th order method (ORD=6) and the 8th order method (ORD=8) were used for the computation of "ORD6" and "ORD8".
In this paper we also define, as an important criterion, the
tallying of the valid figures of a numerical computation with the
analytical solution - for clarity in table Tab.2 only those
digits of the numerical solution of (3) tallying with the analytical solution
are shown.
| t(s) | NUM4 | NUM6 | NUM8 | MTSM |
| 1.0 | 5.3813 | 5.381364 | 5.38136451 | 5.38136451648877 |
| 2.0 | 6.1631 | 6.1631921 | 6.163192175 | 6.16319217563612 |
| 3.0 | 1.326 | 1.32609696 | 1.326096966 | 1.3260969664414 |
| 4.0 | 0.22011 | 0.22011 | 0.2201150333 | 0.220115033306814 |
| 5.0 | 0.146922 | 0.146922 | 0.1469227193 | 0.146922719324015 |
| 6.0 | 0.57187 | 0.5718771 | 0.571877199 | 0.571877199752585 |
| 7.0 | 3.7209 | 3.720928 | 3.720928364 | 3.72092836426954 |
| 8.0 | 7.233 | 7.23345 | 7.233452838 | 7.23345283888572 |
| 9.0 | 2.2801 | 2.2801402 | 2.28014028 | 2.28014028705485 |
| 10.0 | 0.33687 | 0.3368753 | 0.336875375 | 0.336875375797793 |
Tab.2
The 4th order method ( ORD=4) was used for the computation of results shown in the column "NUM4". Similarly, the 6th order method ( ORD=6) and 8th order method ( ORD=8) were used for the computation of "NUM6" and "NUM8". Results in the column "MTSM" were obtained by the Modern Taylor Series Method.
The Modern Taylor Series Method used in the computations
increases the method order ORD automatically, i.e. the values of
the terms
Even though calculating (5) by the DERIVE program requires a substantial amount of time, it stresses the important fact that the numerical calculation is most exact when the method order ORD is accordingly high for the integration step h given.
For completeness' sake, the numerical solution of the differential equation (3) ( for a=2) as a function of time is shown in Fig.1.1.
The Modern Taylor Series Method was used for the solution. In the right-hand part of Fig.1.1 a particular time value T and the corresponding value of Y are shown.