A simple technique for coding differential equations
A computer program that will solve an arbitrary system of first-order differential equations according to some conventional numerical method may be considered to have two distinct parts. The main program performs all of the operations of input-output, initialization, choice of step-size, and actual solution of the equations. This part of the program is independent of the functional equations relating the derivatives to the variables. A subsidiary program evaluates the derivatives according to the given functional relationships, and this subprogram or subroutine has to be written for each new system of equations [1].