The use of sub-routines on SEAC for numerical integrations of differential equations and for gaussian quadrature
Authors: P. Rabinowitz
Venue: Proceedings of the 1952 ACM national meeting (Toronto) (1952)

The preparation of subroutines for numerical integration of differential equations, and for numerical quadrature involves problems not encountered in connection with the present standard subroutines on SEAC, which are used mainly for evaluating simple functions and for converting from one number system to another. These latter subroutines have similar characteristics in that they usually operate on a single argument to yield a single result. Consequently, certain conventions were established to standardize their use. Thus, the arguments are always located in a standard location and the results are located in this same location. This has the advantage that it enables one to use the result of one subroutine as the argument of a second subroutine. In addition certain standard locations are assigned for temporary storage to be used only in subroutines. These locations, of course, can be used in successive subroutines since none of the intermediate results of a subroutine are of interest to us. Finally a standard location is set aside for an &ldquo;exit&rdquo; order. The order placed in this exit location before entering the subroutine is the first order to be done after the subroutine is completed. These conventions simplify considerably the task of the programmer when he starts to compile a code. However, several of these conventions have to be modified and different procedures adopted for integration and quadrature subroutines. The reasons for this become quite clear when we remember that one of the variables in such subroutines is a subsidiary routine evaluating an arbitrary function, either yt&equil;f(x,y).or f (x). Since this routine may contain several standard subroutines, our main subroutine cannot use the standard temporary storage locations for its temporary storage which requires retention of information for use after the function is evaluated. Similarly the standard exit location cannot be assigned to this main subroutine since it may be needed for some subroutines used in the subsidiary routine. Hence, we must assign different temporary storage exit locations to what we call 2nd order subroutines, i.e. those which have as a variable, another routine. Among the many different methods available for numerical integration of differential equations, the two main classes suitable for digital computers are those commonly known as single-step methods and the difference methods. (Most of the other methods are either for special cases or require evaluation of other functions beside f(x,y)). The single step methods enable one to compute an approximate value of y at x+h when x,h, and y(x) are given. The difference methods enable one to compute y(x+nh) once y(x) y(x+h),...,y(x+(n-1)h) are obtained with n &equil; 2 and with accuracy a function of n. Each of these two methods has advantages and disadvantages from the point of view of digital computation. The obvious advantages of the single step methods are that they require only the initial values to start the computation and that the interval length h can be varied at will. On the other hand, once n initial values are obtained, the difference method gives greater accuracy (or what is the same, gives equal accuracy with less work in calculating f(x,y)). However, a separate program is required to compute the first n initial values and another special program is required whenever we wish to change the interval length h, as is often desirable either because we are not getting sufficient accuracy or because we are getting too much accuracy (the latter meaning, of course, that we are doing more computation than needed). In addition, more storage is needed when using difference methods since we have to store at least n values of y or f (x,y). Hence in weighing the merits of both methods, we have decided to prepare at first subroutines using single-step methods.