Programming in TKSL/386 is very easy. The menu system in TKSL/386
is very similar to that in TURBO PASCAL 6.0.
Using TKSL/386 is demonstrated again on the equation (3)
The corresponding source text in TKSL/386 is
var y;
const a=2,
tmax=10,
dt=0.2,
eps=1e-20;
system
y'= a*y*cos(t) & 1;
sysend.
All variables that will be needed are declared in the line starting with var. All necessary constants are declared in the line starting with const ( a is a constant in the equation, tmax is the maximal computation time , dt is the step size and eps is the required accuracy).
The equation (3) is declared in block mode (between system and sysend). The initial condition for differential equation (3) is written in the form & initial condition.
The two typical windows which are displayed on the screen
immediately after the program is started can be seen in Fig.2.1. In
the right-hand part of Fig.2.1 the symbol
marks the variable
which is plotted on the horizontal axis (in this case the
time T).
The variable T is increased by the preset step size dt and at the same time the corresponding values of the variables ORD and y (ORD stands for the method order) are shown in the right-hand part of Fig.2.1. In the left-hand part of Fig.2.1 two functions of time are shown in the course of the computation. There are graphs of y and ORD . The last function has not yet been published in any paper on this subject.
In the above example ( for a=2, integration step h=0.05s ) the value of ORD ranges between the values 11 and 13.
If the value of integration step increases to h=0.1s , the corresponding resulting solution of the equation (3) (again for a=2) is in Fig.2.2 . The value Y of the numerical solution at time T=10s is of course the same, only the value of ORD, as expected, has increased ( ORD ranges between 13 and 16).
The value of the coefficient a can be changed easily in the simulation language TKSL/386. The numerical solution of the equation (3) (for a=100, h=0.02 ) and the value of ORD as functions of time are shown in Fig.2.3 .
It is typical of the Modern Taylor Series Method that the value of ORD
changes during the computation.
The high accuracy of the TKSL/386 is demonstrated on the following system of equations
The system of equations (8), (9), (10) was deliberately
designed for the variable z to characterize the accuracy of the
computation.
For the test function
since the exact solution of (8) is
y = ea sint
and the exact solution of (9) is
x = e-a sint.
The accuracy of the computation is preserved even if the variables reach values of 1043 and 10-44 by order of magnitude. The numerical solution of the system (8),(9),(10) reaches these values for a=100 (Fig.2.5).
The corresponding test function Z and the values of ORD as a function of time ( for h=0.01s, a =100) are shown in Fig.2.6 - in the part labelled EXPCOS5. In the part labelled EXPCOS6 time functions of Z and ORD (for h= 0.1s, a=100) are shown. The value of the test function z is constantly at z=1, only the values of the function ORD increase as h grows, as expected.