COMPILEB SOLUTION OP DIFFERENTIAL EQUATIONS WITH DWIAL LIALYZBB-EYPE MPO! By Lorn Enabler Board All ABSTRACT Submitted to the School for Advanced Graduate Studies of Michigan State University of Agriculture and Applied Science in partial fulfillment of the require-ent- fcr the degree of MOB G PHILOSOPHY Department of Electrical Engineering Approved IF? "r‘ mg n.‘ ?Ege CORRECTIONS 1959 Doctoral Thesis in Electrical Engineering: Compiler Solution of ‘Qifferential gguations with DifferentialLAnalyzer-gype Output, Lorn L. Howard Page 51 - Page 58 - Page 72 - Page 75 - Page 75 - Page 76 - Page 76 - correct order pair 330 as follows: 330 40 531E 26 331? correct order pair 444 as follows: 444 L5 592? L0 493? next to last line (part 2) - delete the first sentence and the sentence in parenthesis immediately following it. Substitute therefor the following: "Divide all the terms by the coefficient of the derivative of highest order. (If this yields coefficients whose values are larger than 10,000 the original differential equation must be scaled until the coefficients at this stage are below 10,000 - otherwise the problem will not go into the computer.)" correct the first two terms in equation (1) to read: 0.05 d4! + 931 4 - 2 d: dt correct equation (2a) to read: £1 + 20 «122 - 3900 _g_ + 200y - 200031;; 2: + 20:2 + 40 4 2 dt dt dt correct equation (2b) to read: 0.0001 d4! + 0.002 (122 - 0.3931 4 0.02y . 0.2 sin 2:: + 0.0023 + 0.004 I. 2 dt dt dt correct equation (3) to read: +0N5 +0001N4 +0N3 +002N2 -39Nl +02N0 - +2PSIN+0002NT +002PT2 +004FKIIC +0 +0 +000001 +000001 +0N/INCR +1N I am enclosing three c0pies of corrections which should be made to my 1959 Doctoral Thesis in Electrical Engineering. “WWW \/ 7 ~7 Ray 3, 1965 Lorn L. Howard g1 ._. ..z a. .4 , .‘7. e. l ..‘- n.’ J \ .1. g \H ‘ ea .1 r "\ .. / ~. ’ _ ,J 7.4 ' \ ABSTRACT Differential analyzer-type output is available from a digital computer using the techniques described in this paper. In addition. this is made possible in such a way that anyone who needs the solution to an ordinary linear constant coefficient differential equation may ob- tain it without assistance from programmers or previous knowledge of the. operation or programming of either type of computer.. The user needs only to convert his differential equation directly into a simple code resembling the actual mathematical statement of the equation. punch this code onto computer tape preceded by the compiler routine deve10ped in this paper. and have results immediately after feeding the tape to the computer. The entire process should require at most only a few minutes. As with the differential analyser. the output is a simultaneous presentation of the dependent variable and all of its derivatives as a function of time. A major difference, however. is in the greatly im— proved accuracy of the results over those available from that type of computer. Another desirable feature. of course, is in the large reduc- tion in the time required to obtain the results. Both the solution and the differential analyser-type of output are accomplished without the necessity for the reduction of the differ- ential equation to a series of first~order equations, a procedure which is often required. The standard Runge-Eutta integration procedure is used. The compiler routine developed herein is prepared especially for - l - the Michigan State University automatic digital computer (HISTIO) but may be used readily where other models of this type of computer are available: Iowa State College . University of Illinois. University of swdney..Aberdeen Proving Ground. The programming technique. however, is laid out in detail so that the method may be readily adapted to pro- gramming for other types of digital computers. Availability of storage space (1024 positions) limits use of the program to the solution of equations of first through fifth order. A wide variety of combinations of "driving functions” is allowed, however. Provision is made so that experienced programmers may readily modify the routine to add other driving functions as required. COMPUTER SOLUTION OF DIWIAL EQUATIONS VITH DIFFERENTIAL AHALIZIBJEYPI OUTPUT By Lorn Lambier Howard A THESIS Submitted to the School for Advanced Graduate Studies of Michigan Skate University of.Agriculturs and Applied Science in partial fulfillment of the requirements for the degree of DOCTOR OP PHILOSOEHY Department of Slectrical Engineering Approved ‘4' m*m~-««fi----~mm ---- (1 5/4 9 &// ?/l'fi/ ACKNOWIEDGHBHTS The author wishes. first of all. to thank especially Professor Hyril B. .Reed for his continual encouragement and understanding through- out the many months of preparation for this thesis. Professor Lawrence W. VonTersch suggested the problem of program- ming the digital computer to provide differential analyser-type output. and his helpfulness is appreciated very much. also. The author is also very grateful to Professor Gerard P. Veeg for his thoughtfulness. helpful advice. and for his delightful sense of hu- mor. A graduate student is indebted to many of his contemporaries and to a large number of facultym-both in and out of his field—for his pro- fessional outlook and scientific attitude. Dr. Frederick D. Bennett. Professor George D. Clark. Dr. Carl I. Drumheller. and Professor Villiam J. Try. graduate teachers and advisers, have contributed much in these areas. and contact with them has been a great source of satis- faction. rinally. the efforts of the author would have fallen far short of this work had it not been for the endless devotion. care. and assistance from his wife, Itha. Also. her many capabilities in typing, tape pre- paration, and in making lengthy calculations for verifying results have sped the completion time immeasurably. _- 11..- TABLE 0? OOHTBITS Page ACKNOWLEDGMENTS ii LISTUFIIJDSTRATIONS........... ....... ... iv Part I.INTRCDUGTION...................... 1 II. DIFFERENTIAL ANALYZER SIMULATION . .. . . .. .. .. . 6 III. ORGANIZATIONOPTHECOMPIIERROUTINB ... . . .. 8 IV.EXPERIIGNTALPROCEURE................. 28 Y. THECOIQLITIGOMPIIBBPROGRAM.............. 32 VI. GENERAL INSTRUCTIONS FOR USIOFTHECOHPILER . . . . . . 72 VII. MODIFICATION mocsmmss AND FURTHER DMIDPMEHT OF '1'!!! APPENDIX. ..... 80 BIBLIOGRAPHY......................... 86 -111- Figure 1b. 3. L191? 01' ILLUSTRATIONS Plow Diagram of the Programing for the First Half of the Differential lquation Routine . . . . . . . . . . . Flow Diagram of the Programming for the Second Half of the Differential Equation Routine. . . ... . . . ..... . . . . Plow Diagram for Programming Calculation of the Driving Function in the Differential lquation Routine . . . . . Flow Diagram for Programming the Compiler Routine . . . 16.17 18.19 20.21 24.25 I. INTRODUCTION It has been possible to obtain the solution to differential equa- tions with the aid of electronic equipment ever since the development of the first all-electronic type digital computer. INILC. at the University of Pennsylvania around l9#2 (l). About five years later. another elec- tronic device became available for this purpose: the electronic differ- ential analyzer or analog computer (2). The differential analyzer is frequently found to be faster. more convenient. and more satisfactory in many problems. but the need is of- ten felt for an accuracy and a kind of flexibility obtainable only on the digital machine. This has inspired considerable effort toward the production of either a machine or machine-program which would combine the advantages of both types of computer. The digital differential analyzer was one of the earliest of the I'Ilachine" efforts. It was developed by a group of engineers from the Northrop Aircraft Corporation (3). and was first discussed by Sprague (h) in 1952. This digital-type computer is composed mainly of a set of units which perform an integrating function. These units are analogous to the integrators in the typical electronic analog machine. The accur- acy of this computer appears to be considerably less than that of the usual digital computer; however. it is sometimes approximately that of the ordinary differential analyser. It is slower than the differential analyser. In 1955 Selfridge (5) described a system of programming a digital - 1 - .. 2 .. computer using a scheme very similar to that employed in the coding of an analog computer. His method employs a very simple integration pro- cess in which the increment consists solely of the sum of the inputs multiplied by the mesh sise of the independent variable. Encoding a differential equations problem for solution in this manner on a digital computer is a great simplification; however. extremely small mesh size is required in order to obtain appreciable accuracy. This has the dis- advantage of requiring mach more time for the solution. Some problems do not appear to be readily adaptable to this technique. The Selfridge method allows the use of moral digital computer coding. A different type of coding. using "pseude-cede.‘ was developed by Lesh and Curl (6.7) in 1957 for use with their 'intsrpretive" digital computer routine simulating differential analyser operations. This cod- ing depends upon an interpretive routine (previously fed to the computer) to deduce the analog computer component structure and sequence ef oper- ations from it and to produce the differential equations' solution therefrom. The system. called DEPI (differential equations pseudo-code interpreter). is an aid to users familiar with analog computer oper- ations but who are unfamiliar with digital methods since rapid. accurate digital solutions to differential equation problems may be obtained with» out the necessity for learning digital techniques. In comparative per- formance at similar accuracies the DIPI program is eight times slower than an analog computer solution (6). lven at this speed. DIPI perform- ance is much faster than a digital differential analyser. At slower speeds (reduced increment sise). DIP! accuracy increases to that appro— priate for normal digital computer output. Recently (1959) Stein. Rose. and Parker (8) developed for a digi- -3- tal computer a compiler routine (a program whose sole purpose is to as- semble another program to carry out a specific function) which.mekes use of “analogroriented' input information. Input to the compiler consists of the encoded description of an analog computer set-up diagram. This system differs from either of the two previous programming techniques. first. in that no effort is made to simulate the functional structure of the analog computer. Secondly. the compiler does most of the program- ming for the digital machine. The balance is accomplished by Iortran. an automatic coding system deveIOped by the International Business Mach- ines Corporation. which.acccpts statements resembling mathematical lan- guage. The compiler output is Fortran input. and the entire operation is handled by an IBM 70“ digital computer. Common.usage of the analog computer set-up as a fundamental 'problem»souree"led the authors to be- gin their programming at this point rather than at the point of mathe- matical descriptionl. Deduction of differential equations from analog computer set-up diagrams represents work done earlier by Stein and Rose (9) and forms the basis for use of a code acceptable to the compiler. Preliminary experience in use of this compiler indicates a speed four times slower than a test analog computer on a similar problem at a com— parable accuracy. This is two times as fast as the experience reported with.DBPI. and such a gain in computing speed was predicted by Leah and Curl (6). The general purpose of the present work was to obtain a type of program for the digital computer which would enable it to yield rapid. accurate. differential analyser-type output from extremely simple. yet very flexible input.--input which could be written readily as a mathe- 1Personal communieation from Mr. Rose. -14.- matical expression by users having no familiarity with either type of computer. Some conclusions were drawn from preliminary studies concern- ing the general direction such an effort should take. and programming was completed (within storage limits of the computer available)in m1- fillment of this aim. In particular. a compiler routine has been written for digital computers of the MISTIC type (IIJJAC. SILLIAC. and OBDYAC) to provide differential analyser-type output from simply-encoded differential aqua. tion input. The differential equation may be of any order up to and in- cluding the fifth. One-point boundary conditions must be available for all except the highest order derivative. 'Driving-functions' may con— sist of a constant plus any additive combination of the following func- tions multiplied by their respective coefficients: sin klt. cos kzt. 1n k3t. 31““. t. t2. t3. and t1/2 or t1/3 or t1/“ or t1/5. Bach func- tion may be used only once; however. instructions for easy modification of the compiler to add other driving functions and still remain within the storage capacity of the computer are given later. Also discussed are outlines for extension of the present routine to include simultan- eous equations and equations of higher order (possible with the avail- ability of more storage). All previous effort to combine advantages of both.types of com- puter has presumed knowledge of the programming of at least one of these machines. Use of the compiler routine developed herein requires no such previous knowledge. and its programming for the digital computer yields almost-simultaneous information on the independent variable together with the dependent variable and all of its derivatives. Aside from advantages which accrue in obtaining a composite of -5- the benefits of both types of computer. there is an economic urgency in the development of compilers which is often pointed out by Hopper (9.10. 11). This fact obtains at installations of computers of the MISTIC type mentioned previously as well as in industry. Insofar as is known to this writer. however. there has been no compiler development for solv- ing differential equations on any of thesennachines. even though the physicist. chemist. engineer. or researcher there should be able to get this "bread-and-butter'Job done as readily as his counterpart in indus- try where compilers are commonplace. On the following pages is described the preliminary study lead- ing to the first programming efforts. assembly of the compiler routine with a discussion of limitations. and final testing. The complete com- piler routine is then given. together with instructions for its use. An example is also prepared in detail. II. DIEMEIAL ANAHZQ SIMULATION Most ef the attempts to simulate the differential analyser have sought its speed. ease‘ofl‘programming. flexibility. and scene”. The first attempts (h) aimed at duplicating the physical action in an inte- grating circuit by amassing a stored quantity at a programmed rate. Some ease of programming and flexibility were gained. perhaps. but at a loss of speed and accuracy for some problems. Further developments have made some improvement in these areas. Inter. Lesh and Curl's interpre— tive routine (6) imitated only the structure of the analog program. This routine made marked progress in achieving some of each of the de- sirable attributes of the analog machine. Its authors pointed out. howb ever. that the analog structure of their program appeared to be artifi- cial and that improvement could probably be made by its elimination. They also suggested a compiler routine for increased speed. noting howu ever. that it would be much more difficult to write and at the same time keep flexible. It was with the development of their modification ideas in view that the present work was begun. There are several considerations which make this type of compiler seem promising. First of all. both the Sel- fridge routine (5) and the interpretive routine require sequential cal- culation. This. in itself. precludes an output speed equal to that of the analog device. Further. it appears likely that so long as digital computers are sequential devices similar to present-day types. there is little promise of completely duplicating the speed of the analog comput- - 6 - - 7 - er. The compiler-type program. however. represents an improvement over the relatively slow interpretive routine. Secondly. the other desirable characteristics principally involve the input and output of the machine. and it would seem reasonable to expect that. although the time and ef- fort required might be appreciable. both the input and output of a digi- tal computer could be tailored to provide much of the flexibility. ease of programming. and type of output found on the differential analyzer. And then in particular. real economy of time might be realized by Rep- per's Ilayman." (11), or inexperienced computer user. if such a compiler were available. Finally. the solution of differential equations need not depend upon the integrating processes nor the component configura- tion.inherent in the differential analyzer. but could be obtained more readily by using a suitably-programmed numerical method. Both the first and last of these considerations have been utilized in a recent compiler program (8.9). The idea of simulating the differential analyzer as such then was abandoned. and in its place was planned a compiler program which would retain all the desirable features common to the analyzer as a differen- tial equation solver except some of its speed. ‘lven in this area. it was planned to choose and provide routines to allow as close an approach as possible to analog speed. III. ORGANIZATIQN OF THE COMPILQR ROUTINE General Description The Compiler is a complete routine in itself. designed to be put on tape and fed into the computer Just ahead of a small amount of coding (also on a tape) describing the differential equation to be solved. The coding is discussed later. but it is the Job of the Com- piler to bring this cede into the computer. to obtain. and then to out- put the solution to the differential equation represented thereon. The Compiler must necessarily contain a number of subroutines designed to do specific Jobs if the calculations are te be obtained ef- ficiently. The routines are listed below in the order in which they appear en the Compiler tape. (Their memory locations are given at the end of the Compiler Routine and in the.ippendix.) 1. Input the balance of the Compiler (Decimal Order In- put) Differential Equation (including “Driving Function“ Routine) hissembly rest Sine-Cosine Integral‘Bcot lxponential Logarithm Decimal Fraction Input - 8 - - 9 - 9. Decimal.!racticn Print This list comprises everything in the Compiler with the exception of special control orders. The complete Compiler program. except for standard library routines noted in the following discussion, is given order by order in part V. In operation. the Decimal Order Input brings in the rest of the Compiler. Control is then transferred to the Assembly routine which proceeds to bring in the encoded differential equation. As this equa- tion code is being brought in. the Assembly routine makes choices and sets counters to organise a program to solve the differential equation. Program control is transferred to the differential equation-solving rou- tine at the end of this read-in. That routine then proceeds to carry out a program to evaluate the differential equation. Control is often transferred out of the routine and into subroutines for frequently—repeated operations such as print- ing or punching out information or calculating the driving function. In the case of the latter process. program control frequently leaves its subroutine also to go to other subroutines such as the exponential. sina. logarithm. et cetera. finally returning to the Driving Function routine. and then later to the main routine. One increment of each of the vari- ables after another is calculated and output. The machine will continue to run until stopped or until hanguup occurs due to overflow. Since the computer operates with fractional quantities. the pro- gram is designed to carry out calculations at a value of the variables which is at least 0.0001 of their actual value (see part VI) in order to allow for considerable growth of the variables before overflow or hang- up. This implies that in determining the range of allowable computa—. - 10 - tions the user must consider that normal unsealed values in the solution my not exceed 9.999 (when a factor of 0.0001 only is used). In fact. they not be considerably less than this if the calculation is to pro- ceed usefully for very long. Scaling oust also be considered in the use of the various driving function subroutines such as those listed (limits are discussed later on in this part). Fixed-point programing is used throughout. This does not seem to limit seriously most problems of the usual engineering type encoun- tered. A decision to provide floating-point programming would have al- lowed considerably less storage space for essential operations. The routine to input the balance of the Compiler is the stand- ard Decimal Order Input routine available at any of the MISTIC-type com- puter installations. Differential Equation Routine The Numerical Method The Differential Iquaticn routine is prepared especially for this compiler. Its purpose is to carry out the numerical solution of the dif- ferential equation using the Runge-Kutta method (four- step). It is de- sirable to consider some reasons for such a choice. Numerical methods for solving differential equations on digital computers have been studied extensively since 1942 and a partial list of the work reported in the literature is given in the bibliography (13-20). A recent comprehensive study was made by Williams (20). He found that the best accuracy obtained in a comparison including several four-point methods. a series method. the Runge-Iutta-Gill technique. and the Iilf - 11 - method came from use of the RungeAKutta—Gill procedure. The price for this accuracy is a somewhat reduced speed. however. Gill himself points out that his modification of the Bungeéxutta process is slower than the original (21). Actually. this general process (Runge-Iutta) has been chosen by several authors as the outstanding method for machine solution. The earliest seems to have been Proberg (In) in 1950. Also. it was used by Dosh and Curl (6). and by Stein. Rose and Parker (8). It is essentially a refinement of what may be called averaging methods. and has the very desirable characteristic that it requires no special formulas to get the solution started. Further. for purposes of this work. it lends itself readily to programming without the annoying necessity for reducing equa- tions of order greater than one down to the first order. In addition. it is easy to obtain the usual values one expects to find at the output of a differential analyzer. i.e.. y. i. y. et cetera. in passing normal- ly through the calculation procedure. The Bungeéxutta method has no check on accuracy. and the error cannot be determined although it is near the order of the fifth power of the increment of the independent variable (22). Improvement in accuracy can be obtained by taking smaller increments-up to a point. Such a de- crease always reduces the speed and increases the possible round-off error. Another method. such as Milne's. might be added to the Bunge- Iutta method after starting in order to provide for a regular check on the accuracy. It is felt that this would require excessive storage- already in short supply for the present programp—and it has not been done. -12- Egg-Kg: ta Squat i one The unmodified verson of the Rungedlutta method was chosen after preliminary testing (see part IV) demonstrated its suitability insofar as speed and accuracy were concerned. The equations (22). including all steps necessary to make calculations for two increments of all the de- pendent variables in an ordinary linear constant coefficient fifth order differential equation. are given on pages 13 and 1“. Note that the equa- tions for 332 increments are given; also. that all steps necessary for the calculation of a fifth order equation are included. The assembly routine decides the order of the equation being input and makes a choice as to whether all or part of these equations are used-vdepending upon the order of the equation. The major modification of the steps for an equation of order less than five requires calculating the highest deri- vative of the equation as a function of the other terms in the equation- in a manner similar to that shown for the fifth order equation-rather than as shown for that derivative in the chart. As for the fifth deri- vative. the function is evaluated using the values of the variables cor- responding to the step in which the highest derivative is being evalu- ated. Consider the procedure for obtaining the solution to a fifth or- der differential equation using the steps shown in the chart. The first line (except for the highest derivative) at the top of the two pages consists of initial conditions. and the first calculation requires the use of these in evaluating the highest derivativemyil. The next calcup lation is of'yiz. and then the calculating proceeds to the left until ‘12 is calculated. Following this. 3K2 is calculated using the values obtained in the calculations which proceeded leftward along the second ...: t11 "' to ’11 =’o ‘12“11+92" ’12”11+’11%’ t"13"‘t11'pb‘72't' ’13"11+’12%.i t1“ = ’11 4- At ’1“ _ ’11 + 913 A" ’11 2’0 ’11 ”’11 0’12 =” 11 +’11‘42" "12 2’11 *u’ i1 95’ 2'11 ='5"11+'"‘11 91’- "'11-“i'1+“12 2-”- .’1u ‘3'11 4’13 m min = "'11 "’13 At A’ 1= 95% "11 4‘2 ’12 +2’13 +3.34) A’1" 93"" 11 +2 ’ 12 +2’i3 ’.’iu) t21 2 t11 + M ’21 =’11 + A’i 1"22 =t21 +92" ’22 =’21 +’21'éé't' t23""“21 4'92" ’23 ”21+’22A2" ‘211 = t21 + M ’24 ‘5 ’21 ”'23 “t "21 ="’11 + A’l M21 "’ ”i1 + A’i ’22 ”21 “’21 '92" ’22 ___...2.1 £5731 A22 ’24 ”’21 ‘V’23 M ”21+ ="’21 ”.23 M .. At .. A’2’ "6'“ ’21 *2 ’22 +2 ’23 +’211) A"2” 9?" "21 +2 ’22 +2 ’23 + ’2u ) The Bunge-Iutta Equations for Calculating the First Two Incre- -—1l1 .. . C '. At ’12"11+’11 2 . O '. & ’13”11+’12 2 ’11; =’11 +’13 1“ ’11 =’o .. ,. At ’12 ’11 “”11 2 .. =.. ,, fit ’13 ’11 +’12 2 ’1u =’11 +’13 5‘ At . . . . A’1= 3 ( ’11 *2 ’12 +2 ’13 +’1u) . 1; .. .. .. .. “’1‘ k ( ’11 +2 ’12 *2 ’13 +’1u) In = “to. yo. yo. yo. yo. yo) ’12 = fl”12"12"12"12"12"12) ’ 1n = f(‘111'"121-’111'5'111"1a"'1u) *2 ’ 12 ”"13 "’10 .... t u... 5’12? 11 y21 2’o + Ayl . - . + .. At ’22 "21 ’21 2 e .- o 4... 2-3- ’23 “’21 ’22 2 ’21» 3’21 +’23 at ’21 —yo + A y1 . .. +.. it ’22 ”21 ’21 2 0 0 see At ’23 " ’21 + 22 2 At . . . . 0’2"?" ’21 *2 ’22 +2 ’23 +’24) . At 0. O. C. .. A’2" 6 ‘ ’21 ‘2 ’22 7’2 ’23 +’211) "' f"21"21"21"21"21"21) ’22 ‘ f(‘22"22"22"22"22"22) ’ 21+ 2 1'("2t1"2t1" 21+"2u'.’2n'°’ 21+) 4’2: % ( ’21 ‘2 ’22 *2 ’23 ”’21? ments in the Solution of a Fifth Order Differential Equation - 15 - line. A similar pattern is followed in making thc'calculations along the third line. After completing the fourth line in the same fashion the increments A°y'1.o'§1.4y'1. Ay1.Ay1, andAt are calculated in that order. This completes calculations in the first increment group. One may then proceed to the beginning of calculations for the first step in the second increment group and obtain ‘21- Next. y21 is obtained. and so on. After the fifth derivative is calculated. the balance of the computation proceeds in the same manner as that in the first increment group. Calculations in successive increment groups proceed in the same manner. Differential analyzer-type output is desired. so in actual com- puter operation each of the variables in the first step of each incre- ment calculation group is output as soon as its value is available. Pr rammin the tions Figure la shows the flow diagram for programming the first half of the calculations in any increment group. The flow diagram for the second half is shown in Figure lb. The block notation is that given by flcCracken (23); however. the functions of all of the blocks in the dia- gram are largely self-evident. Lines leading to encircled letters make connection with other lines at points where there are identical letters. Some discussion of the contents of blocks in the flow diagram is desirable. In the upper left-hand corner of Figure la is a box indicat- ing calculation and storage of the driving function. step 1. This oper- ation is actually a subroutine in itself and its flow diagram may be found in Figure 2. The program goes into this calculation four times during the calculation of one increment-once for each step therein. calculate and store step 1 driving function Entry -16- orde >1 obtain.& orde >2 obtain & ' test print 91 test . int .ii I]. . =2 calculate and store ¥11=f( ) calculate and store i112 f< ) calculate and store Y12 calculate and store t12 calculate and store step 2 driving function 0 calculate and store calculate and store I calculate and store ‘ ’12 = f( ) calculate and store ’43 J Fig. la.-4FlowIDiagram of the Programming for the First Half of the calculate and store ‘ in = fl ) , calculate andust ore y12 - 17.. > 0 order >3 paint orde it test ’11 test 911 :3 =‘4' calculate .amd store ’11 = f( ) calculate and store y12 calculate and store 5’11 = f( ) calculate calculate and store yiz g f( )» calculate and store in I Differential Equation Routine. calculate and store Viz f f( ) calculate and store Y13 J calculate and store yiz‘s f( ) 7 calculate and store y13 (Continued on the following pages.) calculate and store t1} calculate and store step 3 driving function L calculate and store y. ‘= f( ) calculate and store yin calculate and store tin F._L_ - calculate and store step h driving function calculate y141.1 and write over yil storage calculate t1+1. 1 and write over t storage 11 {i order j>1 test :1 calculate and store calculate and store '1531 calculate and store calculate and store yin J )2 orde test 0 calculate calculate and store £571 Fig. lb.v-Flow4Diagram of the Programming for the Second Half of the -19.. >16 calculate >3 calculate and store calculate and store ’1!» calculate and store .913 g f( ) calculate and store J calculate and store calculate and store Av. J Differential Equation Routine. calculate and store calculate and store calculate and store calculate and store 5?; ] (Continued from preceding pages.) -20... set return link store the address of the proper :13 TEntuy ,______JL____._ put proper t1.1 f(t) not test obtain t multiply t by it's coefficient add to driving function storage L in new storage t not t2 f(t) test t2 obtain t2 multiply t by it's coefficient l Fig. 2.-rlow Diagram f(t not t test multiply t3 by it's coefficient dadd to rivi functggn storage 3 add to driving function storage return to main routine 0 for Programming Calculation of the -- 21 - . not f(t' not et f(t not t1,p f(t not sin t f(t cos t 0 test test test test et 1/p sin t cos t determine multiply multiply the value t by it's t by it's yes of p coefficient coefficient no multipxy determine t by it's kt as a coefficient part of Zfl' obtain multiply determine kt determine kt kt by it's as a positive as a positive 9 coefficient or negative or negative ' fraction of7T' fraction of7T' add to driving function obtain obtain sin kt cos kt driving function storage L ®*—1 add the constant term to driving function storage , Driving Function in the Differential Equation Routine multiply by it's oefficient add to driving function storage l__. multiply by it's coefficien -;22 g_ The value of the driving function is obtained here for later use in cal- culation of the highest derivative. An ”order test' box indicates the location of a programmed test to ascertain the order of the differential equation being solved. "Print" boxes indicate the position in the pro- gram at which information is being output. and. depending upon the com— puter. this may come out as punches on tape. printed numbers ( see part V1 for interpretation) or plotted points. Blocks representing calcula- tion and location of special increment constants. and blocks giving in- structions for output have been omitted for simplicity. Calculation of the Drivigg Function The flow diagram of Figure 2 indicates the pattern used for ob- taining the value of the driving function. A test to determine whether or not one of the allowed functions is contained in the driving function is indicated by 'f(t) test.” The routine frequently requires that pro- gram control leave it for calculation in other routines specifically de- signed to obtain the values of certain types of functions. a brief dis- cussion of all the routines and their limitations follows. The calculation of t. t2. and t3 is straightforward. and there 1- no restriction on the values which t may have. The computer will. howu ever. give incorrect output when either of these powers of t multiplied by its coefficient exceeds 9.999 when unsealed. The same rule applies to any of the succeeding driving functions and its coefficient. The Logarithm subroutine requires that the number for which it computes the logarithm lie between zero and 1 (not inclusive). Of course. the coefficient of t. k1 (in In klt) must be less than 10.000 in order to be able to scale it to fractional size according to instruo-» - 23 - tions in part VI and then get it in the computer. If it is less than this number and can be input. then computation of the ln k1t may pro- ceed as long as the product of scaled k1 and the unscaled value of t (t is normally carried in the computer at 0.0001 its actual value) is less than unity. ' The Exponential routine has a similar requirement except that the product klt must lie between -1 and 0. The sign is taken care of in the program so the user need only place the same restrictions on the pro- duct of the coefficient and t as in the previous routine. In calculating the integral root. it should be emphasized that only one of the three "roots“ may be calculated by the driving function in the solution of any one differential equation. No other restrictions are necessary. In using the Fast Sine-Cosine routine. the same restrictions apply as were necessary for the Logarithm routine: the product of the scaled coefficient of t and unsealed t must be less than unity. Insofar as the constant is concerned. it must be less than unity when scaled for input. This applies. as well. to all coefficients. It uny’be seen by inspection of Figure 2 that additional driving functions may be added readily with very little additional programming. Actually. the entire Differential Equation routine may be easily lifted out of the Compiler and used by itself with no modification when addi- tional driving functions are required for differential equation solving. Assembly Routine The Assembly routine is shown in block diagram form in Figure 3. The programming of this routine is begun with order pairs at location -24.. Entry upon computer "execute“ set counter to indicate order of derivative whose coefficient is being read in set order-setting counter set end—of- coefficient- read-in counter read in and store coefficient in temporary locale coefficient no set differential equation order number the coded equa- tion must contain 5 derivative and the dependent variable indicators (:3 read in and store driving function coefficient in temporary locale skip order number numeral reduce ”order-of— the-derivative“ counter by l store coefficient according to in- dication of read— in counter set counter to :: bypass this and previous block Fig. 3.--Flov Diagram for Pro- read into the a position the sexadecimal char acter identifyi.3 the driving function sense a0 driving function includes k eklt; store k; set indicator: store k1; skip T driving funct on includes k t1 p; store k; set in- dicator; deter- mine and store p; skip T includes k tP determine p; store k accord- cater driving function includes k ln 1: t; set indicator; Jump N; store k; store k1; skip T J L driving function includes 1: cos k t; skip 5; store k, set in- dicator; store k skip T 1 F J jr driving function includes k sin k t; set indicat r; store k; skip IN; store k1; skip T JE driving function ingly; set indi- l Greening the Compiler Routine driving function con- tains a con- stant: store sad in initia conditions: skip IC etermine dif- erential onditions cc ord ingly read in incre ment; skip IN;3 read in and store the increment transfer to start differ- ential equa- tions solution program - 26 - 670 in the memory (see part V). Its sequence of operations begins with reading in and storing each of the coefficients of the derivatives. As soon as a non-zero coefficient of a derivative is sensed. the order of the differential equation is available and a constant is set to indicate this order. After all coefficients are input and stored properly. the Assembly routine begins sensing more of the differential equation code to determine the nature of the driving functions. initial conditions. and increment. and set indicators accordingly. The actual code used is given in part VI together with instructions for its use. The code isv also listed below together with the characters of each code group which is sensed and the binary representation of the sensed characters. The letters ”IO" and 'INCR' representing respectively”'initial conditions and ”increment" are also equation code but are merely indicators and are not sensed for directions; therefore. they are not listed. (Lower-case k and k1 are constants.) Driving Function W.deg, Chagacterfisl Sensed ‘Binary Representationgs) k In k1 t kFLsklnr L 1111 k sin k1 t kFSINklflT s x 1011 k cos k1 t kFCOSklnT 0 1001 constant. k kFK K 1010 k t kFTl Tl 1001 0001 k t2 kFTZ T2 1001 0010 k t3 kFTB T3 1001 0011 k t1/2 kFBZT R2 0100 0010 k t1/3 kEBBT R3 0100 0011 k t1,” krnun an 0100 0100 k t1/5 kFRST R5 0100 0101 -27.. Driving_Functigp. Code Character 3 Sensed Binary Representationfls) k skit kFEle s 0011 Inspection of the coding will show that the coefficient of the driving function can be easily read in with the input routine (which is stopped by the 'F')-after which the next character in the code can be sensed in the no position of the accumulator. This holds true for all except the cosine code. In practice it holds there. also. because the 'C' is a fifth hole character and as such is skipped by the read-in pro- cess. Ihen the character following the '1' is sensed. function indica- tors are set accordingly; This is the general plan of the driving func- tion sensing. and it includes the setting of indicators for as many functions as are included in the equation. Initial conditions are read in after the differential equation driving functions are determined. They are stored according to inform- ation sensed on the order of the equation. Finally. the increment is read in and stored. Control is then transferred to the beginning of the Differential Equation routine. Other Routines The function of each of the other routines listed in the general description of the Compiler is indicated by its title--the last two rou- tines being responsible for all input and output operations. Finally. a brief increment-constant calculating routine precedes the Differential Equation routine and would need to be included with it in any attempt to use it apart from the Compiler. IV. EXPERIMENTAL FBOOIDURB The first experimental work was planned to test the speed. ease of programming. and accuracy of the Runge-Kutta equations using a sec- ond order differential equation with only a simple driving function. t. and an increment of t = 0.1. The results were good in each case: speed was such that a complete increment was calculated and output for each variable in approximately one second: the programming was readily car- ried out; and the results were accurate well beyond normal three-to- four-place engineering requirements. This accuracy remained even.wmen the program was run for a great many cycles and when it might be ex- pected that round-off error would become appreciable. This was evident in a test in which three values of the increment of the independent variable . t. 0.01. 0.05. and 0.1 were used in three separate program runs of the same second order equation described above. Six or seven significant figure agreement between the values of the different vari- ables calculated for each of these values of A t was evident after t = 45 seconds. Increments of 0.3. 0.6. and 0.9 were also tested; however. the error for these values grew excessive rapidly. The increment of 0.1 was used in all further testing. A general fifth order differential equation solution program (solving any order up to and including the fifth) was written thereafter and was tested with the same second order equation used above. After it worked successfully and minor changes were made to improve accuracy. equations of first. third. fourth. and fifth orders were tested and run - 28 - ' ..29 - successfully with the simple driving function. t. used above. After the main differential equation solving routine appeared to run successfully for all equation orders. testing was carried out cncna pending its driving function calculating subroutine to include the cal- culation of all the other allowed (see part VI) functions. The testing of the calculation of each of the other functions was performed with.a first order equation having the driving function under test. The test was considered successful when the results corresponded with values ob- tained frcn‘an analytical solution. The end of these tests marked the completion of the Differential.lquation routine. The Compiler Assembly routine was begun next and was tested first to read in properly all the coefficients of derivatives. Thereafter. each test included coefficient read-in and the proper read-in of another driving function code. After each driving function code had been checked. several combinations of those codes in typically-encoded dif- ferential equations were further checked. ‘Iach checking involved an ex- amination of computer post-mortem print-outs indicating the storage in certain locations since the ability of the Differential Squation routine to run properly depends upon proper storage of data from the encoded equation. finally. each of the equations which had been run earlier in testing the Differential lquaticn routine were encoded and fed to the . computer after the Compiler-now complete with the addition of the.As- sembly routine. All ran successfully and the Compiler programming and testing was considered complete. The Compiler might have been written to punch out on tape the completely assembled program which it prepares in the computer storage. It was decided that there was little Justification for this when it _ 3o - would only involve the loss of time required to output and then input the same information again before starting the solution. For this rea- son. computer control is transferred immediately to the Differential Equation routine for the beginning of the solution Just as soon as the Assembly routine brings in the encoded equation. Some operating times are of interest. It requires approximately fifty-two seconds to input the Compiler. Program assembly is accenn plished in negligible time. The time required to obtain and output all of the increments for all of the variables in a given equation is called the 'tine per cycle.“ Typical values follow: gage: 2f Equation Qgiving Zuggtien Time per Cycle (Sec.)‘ 1 t 0.93 2 t 1.25 3 t 1.6 4 t 2.0 5 t 2.u 1 o 0.94 1 t2 0.96 1 t3 0.96 1 ln t 1.05 1 t1/2 1.25 1 t1/3 1.u 1 til“ 1.? 1 31/5 1.7 1 et 8.2 1 cos t 1.0 -31. Ordeg of Eguation Driving Function Time per Cycle face.) 1 sin t 1.0 V. THE COMPLETE COHPIEIR PROGRAM Order pairs for the complete Compiler program are given in the pages which follow. No attempt has been made to 'tighten-up' the pro- gram. In fact. room has been left in the program for easy modification of sections where. for example. it might be desirable to add a driving function or modify the calculation of an existing one. This program. without additions or modifications. represents the entire code needed for preceding the encoded differential equation tape discussed in part VI. Some special notation includes: f( ) - The value of the highest erder derivative for any step in the four-step process is the explicit function of all the other variables and the con- stant in the differential equation evaluated with the values these variables have at any given step. This function is represented thus. erder test 4 Test to determine the order of the differential equation. Letters such at ‘il! ’11. et cetera. are those in the Runge-Kutta relations on pages 13 and 1n. -32- -33.. LOCATION 01mm NOTES Library Routine 11 Deciml Order Input 00 20K 20 22 201' L5 519? 21 1o 1! Calculate and store A; no szor 2 22 50 5191' 7.1 l+90? ]— Calculate and store %‘ 23 1&0 5211' 50 5191' 21+ 7.! 491? :j- Calculate and store At(x 10"“) tho 5171' 25 is 517? ‘-"‘ 10 11' — Calculate and store A“: 10"“) 26 no 518? _J 2 26 2'7?| 2? 92 1317 Carriage return and line feed 92 1313' 28 92 515! Delay 1.5 5161- '- 29 52 1141' —- Print out t11 50 291' 30 26 963R 92 963’ 2 carriage spaces 31 92 963! 26 333' 32 26 33? 26 33! 33 22 33? _. L5 5153 3“ 52 11a! 50 3M, — Print out In 35 26 9632 __4, 92 9633' 2 spaces 36 92 963! LOCATION ORDER - 33 - Library Routine 11 20 21 23 2h 25 26 27 28 29 30 31 32 33 35 36 00 20K 22 201' LS 519? 10 1! no Szor 50 5191‘ N L190? #0 5211' 50 5191' 7.! M1! to 517! 1.5 517? 1c 11' no 518? 26 277 92 131! 92 131? 92 5151' 1.5 516! 52 11hr 50 291' 26 9631‘ 92 9631' 92 9631' 26 333' 26 33? 26 331‘ 22 33? L5 515! 52 11hr 50 3“! 26 963! 92 963! 92 9631' } J NOTES Decimal Order Input Calculate and store A; 2 Calculate and store JELE Calculate and store £§t(x 10'“) Calculate and store [:‘(x 10‘“) Carriage return and line feed Delay Print out tn 2 carriage spaces Print out J11 2 spaces LOCATION 37 38 39 #1 #2 “3 “5 h? 50 51 52 53 ORDER 26 38! 26 38! 26 38! 50 516! 50 38! 26 373? 26 #0? L5 1‘93? L0 “92! 36 b2! 26 911 _J 50 505! "" 71 515! 66 “91! 35 r Ih'5661 40 51k! 22 as? 15 51hr '_—_' 52 11hr 50 #6! 26 963? 26 50! 26 sor 26 so: 26 50? 26 50? so 520! 7J siur L“ 5157 no 5361? _J L5 518! Lb 516? #0 537? J NOTES (516) is tn Transfer to a subroutine to calp culate the driving function of the first calculation of f( ) Order test lo. 1 (differential equation order 0 1) (differential equation order > 1) Control to print.§11 Calculate and store ii; I f( ) Print 511 . r( ) Calculate and store y12 Calculate and store ‘12 LOCATION 5h 55 56 57 58 59 60 61 62 63 65 66 67 69 7O ORDER 26 sur 50 537? so sur 26 373? 26 561 1.5 l1931' Lo #92! 36 581 26 1101 50 505! 71 5361 66 #911 as r L» 566! no 535! so 5201 7J 535! Lb 515E “0 5“}! 16 537! no suar 50 5““? so 6m! 26 3731 26 661 L5 “93! LO #921 36 68! 22 1201 50 505! 71 5&3? 66 #91! as r 15 5661 IL .J L_|_JL_r_ll j IL IL - 35 - NOTES (537) 1' tlZ Transfer to a subroutine and cal- culate the driving function of the second calculation of f( ) Order test lo. 2 ( differential equation order 8 1) ( differential equation order) 1) Control to order test lo. 6 Calculate and store 912 - f( ) Calculate and store y13 Obtain and store t13 Transfer to subroutine to calculate the driving function of the third calculation of f( ) Order test No. 3 (Differential equation order I 1) (Differential equation order > 1) Control to order test lo. 7 Calculate and store 5.3 I f( ) LOCATION 71 72 73 7» 75 76 77 78 79 so 81 82 83 85 86 ORDER uo suzr 50 5191‘ W 5&2! L“ 515? no 5501' 1.5 5171' Lb 516! to 551? 26 75? 50 5511' 50 751' 26 373? L5 1.933 LO #92? 36 791‘ 26 1311' 26 793 50 505! 71 5501' 66 l+911? ss 1' 11+ 56$ no SW 22 82? 11 39? 1.5 535! Lb 5&2! 00 1! Lu 51h! Lb 5H9! no 5561' 50 5561' 7J 521! _J I ll J J L J | -36.. NOTES Calculate and store yin Calculate and store tin Transfer to subroutine to calculate the driving function of the fourth calculation of f( ) Order test No. 4 (differential equation order 3 1) (differential equation order >'l) Control to order test lo. 8 Calculate and store ii“ = f( ) Calculate and store £§y1 LOCATION 87 89 9O 91 92 93 91+ 95 96 97 98 99 100 101' 102 103 ORDER 1+0 5611' L5 5171‘ IA 516! 1K) 5161' L5 5611' 12‘ 515' 1+0 515? 26 273 1.5 514! M 5601' “O 51‘le L5 5m 52 11b! 50 931‘ 26 9631’ 92 9631‘ 92 9631' 26 971' 26 97? 26 973' L5 15915! 1.0 “92! 36 991' 22 1M? 50 5051' 71 5157 66 “911‘ $5 I 1&0 5261' 50 5016! 71 51W 66 “911' SS 1' ll_ L IL -37.. NOTES Calculate and etore ‘i+l.l Calculate and etore yi+1 1 0 Control to 27 to begin calculation of valuee at the next increnent Obtain. etore and print 911 2 epacee Order teat lo. 5 (differential equation order I 2) (differential equation order > 2) Control to print yn Obtain and etore 5’11 = f( ) LOCATION 10“ 105 106 107 108 109 110 111 112 113 11“ 115 116 117 118 119 ORDER L» 526! 1A 5661' no 5131‘ 22 1051' 1.5 5131' 52 11»! 50 1061' 26 9631' 50 520! W 513? I» 51hr no 535! 26 501' Ls h9h! 1.0 11921 36 11211 26 16hr 50 5051' 71 536! 66 41911 55 1' no 5261' 50 Solar 71 535? 66 ~91: SS 1 1.4 5261‘ m 5661" no 53141 50 520' 7: 53w 1» 51» no 51121 IL I L IL IL -33.. NOTES - Print Sin - r( ) r- Calculate and etore 9‘2 Control to calculate y12 - Order teet lo. 6 (differential equation order I 2) (differential equation order >’ 2) Control to order test No. 10 " Calculate and etore §12 8 f( ) _. Calculate and etore 913 LOCATION 120 121 122 123 12h 125 126 127 128 129 130 131 132 133 13“ 135 136 ORDER 26 61! L6 49ml LOW” 32 122r 22 177! 50 505! 71 5H3! 66®n 35 r #0 526! 50 5o“! 71 Sher 66 #91! 35 1 L» 526! L» 566! no 5H1! 50 519? 7J 5nd! 1» 51m? 40 5H9! 26 71? 15 agar Lo #92: 36 133! 26 1917 50 505! 71 550! 66Mn 55 r #0 526! 50 504! 71 5H9! 66MB ll IL NOTES Control to calculate and etore Vi) Order teat lo. 7 (differential equation order I 2) (differential equation order )»2) Control to order teet lo. 11 Calculate and etore §13 I f( ) Calculate and store 51¢ Control to calculate and etore 71h Order teet lo. 8 (differential equation order 8 2) (differential equation order )»2) Control to order teet lo. 12 LOCATION 13? 138 139 11m 1101 1’42 1‘43 1M 1&5 1% 11+? 1‘58 1&9 150 151 152 153 ORDER $5 1' 11+ 526! Ht 566? 40 5'48! 11 391' L5 5341‘ Lb 5&1? OO 11' 1.4 5131‘ IA 5‘48! 1+0 5551' 50 5551' 7.7 5211' 1&0 5601' 22 821' 1.5 5131‘ In“ 5591' (+0 5131' 52 1141' 50 1&6! 26 9631' 92 963? 92 9631' 1-5 495' IO “921' 32 1501' 26 2081' 50 505? 71 5151' 66 “911‘ SS 1‘ 1+0 526!I SO 5010! ll J l -uo- HOBBS Calculate and store §1u = r( ) Calculate and store Afri Control to calculate and store An Obtain. store and print .1.“ 2 epacea Order teat lo. 9 (Differential equation order I 3) (Differential equation order > 3) Control to print ’11 WATI OH 15“ 155 156 157 158 159 160 161 162 163 16“ 165 166 167 168 169 ORDIB 71 51M 66 (5911' 85 l‘ “0 5251' 50 503’ 71 5137 66 (491? SS 1' I» 5261' 1.4 5251' 1A 566! (+0 5121‘ L5 5121' 52 1111! 50 1601' 26 9631' so 5201' N 512! m 5131' £50 5311»! 22 1071‘ 1.5 “951' 1.0 1492! 36 1661 22 231+]- 50 5051’ 71 5361' 66 #911- 35 1 1+0 5261‘ 50 501+! 71 5351' 66 Mon ll ll ll -111... NOISE Calculate and etore 3'11 8 f( ) Print 'Sr'u - f( ) Calculate and etore §12 Control to calculate and etore 912 Order test No. 10 (differential equation order t 3) (differential equation order >3) Control to order teet lo. 111 LOCATION 170 171 172 173 17“ 175 176 177 178 179 180 181 182 183 18b 185 186 ORDER 85 I no 525! 50 503! 71 531*! 66 1:911 55 r in 526! L» 525! m 568‘ no 533! 50 520! 7J 533! IA 513! no 5171! 26 1181' 15 #95! no “921' 32 179! 26 252! 50 505! 71 5‘0! 66 491! 35 r to 526! 50 Son! 71 5&2! 66 £191! 85 1' no 525! So 503! 71 5&1! 66 hon 35 1 IL l 1 IL .112. NOTES Calculate and etore 3‘12 = :( ) 6616111». and etore 313 Control to calculate and etore 513 Order test lo. 11 (differential equation order 3 3) (differential equation order )'3) Control to order teat Io. 15 Calculate and etore'§i3 = f( ) WATIG 187 188 189 190 191 192 193 191+ 195 HG 197 198 199 200 201 202 ORDER M 526! $55! 1» 566! no 5&0! 50 519! 7J 5&0? Lb 513! no 5h8! 22 128! 15 “95! 10 #92! 36 193! 26 269! 50 505! 71 556! 66 #91! s5 ! no 526! 50 50b! 71 5&9! 66 #91! 55 ! no 525! 50 503! 71 548! 66Wu 55 ! 1» 526! L» 525! 1b 566! no 5&7! 11 39! 15 533! JL J L |L _l -n- NOI'IS Calculate and etore ‘y'm Control to calculate and etore y.“ Order teat Ho. 12 (differential equation order I 3) (differential equation order > 3) Control to order teet lo. 16 Calculate and etore yin = f( ) LOGATIOB 203 2016 205 206 207 208 209 210 211 212 213 21“ 215 216 217 218 219 ORDER 1» 5901' 00 1! IA 512! 1A 5117! no 5561' 50 5591‘ 7J 521! no 559? 26 139! 26 208! 1.5 512! m 558!I no 512! L5 512! 52 11ur 50 2101‘ 26 963! 26 212! 92 131! 92 5151‘ 92 67! 92 5151‘ 92 67! 92 5151' 15 1196! 1.0 1192! 36 217! 26 269! 50 505! 71 515! 66 1191! 35 r to 526! 50 5011! IL DUES Calculate and etore Afl Control to calculate and etore A}; Obtain and print yu Carriage return. line feed Delay Tab Doll! Tab Delay Order test No. 13 (differential equation order a it) (differential equation order > ‘0) Control to print 711 LOGAIIOI 220 221 222 223 22“ 225 226 227 228 229 230 231 232 233 23" 235 236 ORDER 71 51b! 66 #91! ss ! too 525! 50 5031’ 71 513! 66 091! $5 ! no 520! 50 502! 71 512! 66 991! 35 ! 1k 526! L9 525! 11+ 52k! 1» 566! no 511! 22 229! 15 511! 52 11a! 50 230! 26 963! 50 520! 7J 511! Lb 512! no 533! 22 161! 22 23a! 15 996! no 992! 32 236! 22 315! 50 505! J L J! ____' -45- 30138 Calculate and etoreuy'h = f( ) Print ’5'“ = r( ) Calculate and etore '9'12 Control to calculate and etore 9.12 Order teat lo. 1% (differential equation order I 1+) (differential equation order >16) Control to calculate and etore :12 LOCA‘I' I OH 237 238 239 2&0 2151 2&2 293 2% 2&5 2146 297 2% 249 250 251 252 253 ORDER 71 536! 66 l191! 35 ! £10 526! 50 50M 71 535? 66 991! $5 ! no 525! 50 503! 71 53M? 66 091! 85 ! no 5211! 50 502! 71 5331‘ 66 9911' $5 1' Us 526! 11+ 525! 11+ 52% L“ 566! no 532! 26 21:9! 50 5201‘ 7-7 532! 10 512! 1&0 51m! 26 175! 26 252! 15 I096! ID “92! 36 251»! 26 33h! NOTES 06161111116 and atoro'iv'iz I r( ) Calculate and etore y” Control to calculate and etore 513 Order teet No. 15 (differential equation order 8 to) (differential equation order > ...”) Control to calculate and etore n3 LOCATION 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 ORDER 50 505! 71 star 66MB SS ? no 526! so sour 71 5927 66 ~91: 85 F 40 525? so 501! 71 say 66Wfl 35 F 1+0 520! 50 5021 71 590? 66mm SS T w 526! m 5259 w 5an m 566! no 539! 50 519! 7a 539! m 5127 to 5m 22 188? 26 269! 16 “96! 10 “92! 36 271? -117- NOTES - Calculate and etore?” I f( ) - Calculate and etore°§ku Control to calculate and etore §1n Order test No. 16 (differential equation order I u) LOCATION 271 272 273 271. 275 276 277 278 279 280 281 282 283 28“ 285 286 287 ORDER 26 356 _1 50 5051‘ 71 550! 66 991! 55 ! no 526! 50 5010' 71 5991' 66 #91! $5 I no 525! 50 503! 71 she! 66 9911‘ $5 1' 40 5211! 50 5021’ 71 5473' 66 991! 55 ! 19 526! M 5251‘ IA 520! 1.11 566! no 5961' 11 391‘ L5 532! M 539! 00 1! 11+ 511! I!» 596! 90 553? 50 553! 7.1 5211' _j IL NOTES (differential equation order >30) Control to calculate and store yin Calculate and storey“, - f( ) Calculate and etore A'fi LOCATION 01mm NOTES 1+0 558? __' 288 26 2021‘ Control to calculate and etoreAifi 26 2891? .... 289 1.5 511:! 1A 5573‘ 290 1&0 511.! 1.5 5111' _. Calculate. etore and printufu 291 52 11h! 50 2911' 292 26 9631' ._I, 92 953? 293 92 9637 92 9631' 5 epacee 29“ 92 9637 92 963! 295 50 505! —W 71 5151‘ 296 66 '+9130 55 l' 297 90 526! 50 509! 298 71 5191' 66 #91! 299 85 F 1+0 5251' 300 50 5031‘ 71 513? 301 66 “91’ — Calculate and etore'Sv'il a f( ) S5 1“ 302 ‘00 5241' 50 5021' 303 71 5121' 66 1491! LOCATION 304 305 306 307 308 309 310 311 312 313 31% 315 316 317 318 319 320 ORDER 35! #0 523! 50 501! 71 511! 66 #91! $5! 19 526! 19 525! 1b 521! Lb 523! 10 566! no 567! 22 310! 15 567! 52 11k! 50 311! 26 963! 50 520! 7.1 567! 1a 511! no 532, 26 315! 22 2311' 50 505! 71 536! 66Mn 85 1' no 526! 50 sour 71 535! 66‘691! $5 1' no #25! -50- NOTES 13111115.;11 9‘ f( ) Calculate and etore'yiz Control to calculate and etore.§12 LOCATION 321 322 323 32“ 325 326 327 328 329 330 331 332 333 33“ 335 336 ORDER 50 5031' 71 53b! 66 “911' 55 F no 52»! 50 5021 71 5331' 66 4911‘ 55 I too 5231' 50 5011' 71 5321' 66 ‘+911 55 1' IA 5261' 1A 5251' Lu 52hr 11+ 5231' m 5661' no 5311 26 2311? 50 520! 7.1 5311' m 5111' “0 5391‘ 26 2&9! 26 3341‘ 50 5051' 71 5&3! 66 ‘+91? 55 1' no 5261' 50 50b]? NOTE Calculate 1nd store???” 35' f( ) Calculate and store 5'13 Control to calculate and store 3713 LOCATION 337 338 339 3140 3141 $2 3’43 345 3% 397 3&8 350 351 352 353 ORDER 71 5021" 66 “911' $5 I #0 525! 50 503? 71 5411' 66 #91? $5 I 1&0 5241' 50 5021‘ 71 5%! 66 l+91? S5 1' no 5231' 50 5011' 71 5391' 66 “911' 85 1' 1% 5261' IA 5251‘ U4 5211! III» 5231‘ IA» 5661‘ 1+0 5381' 50 5197 W 5333' L5 5111' M 5166? 26 266! 26%” 50 505! 71fim 66 #911 Mr H -52- NOTES Calculate and star-emih = f( ) Calcuhto and etore yin Control to calculate und etore '9'“ LOCATION 351+ ' 355 356 357 358 359 360 361 362 363 36k 365 366 367 368 369 370 ORDER #0 526! 50 504! 71 5H9? 66 #91! 85 ! no 525! 50 503! 71 ska! 66 “91! $5 ! #0 52h! 50‘5021 71 5b?! 66 #91! $5 ! no 523! 50 501! 71 5“GF 66 #91! s5 ! L» 526! IA 525! 1» 52h! L» 523! La 566! no 5&5! 11 39! L5 531! m 538! 00 1! Eh 567? Lb 5u5! no 552! 50 552! H P i.— - 53 - NOTES Calculate and store'§14 8 f( ) Culculate and etoreA"y"1 LOCATION 371 372 373 37“ 375 376 377 378 379 380 381 382 383 38“ 385 386 387 ORDER 7J 521! #0 557? 26 283! 26 373? 55 r #6 375? L# #93! #2 651! L5 ( )r #0 527! #1 566! 26 377! L5 568! L0 “931 36 379! 22 381! 50 527! 75 575! 66 #91! 55 r #o 566! L5 569? L0 #93! 32 383! 22 387! 50 527! 75 576! 66 #91! 75 527? 66MH 55 ! L# 566! #o 566! L5 583! IL IL ll =1. HOMES Control to calculate and store £§§1 Begin subroutine to calculate the driving function Set link Store t1 in location for driving function calculation Clear driving function storage Ie t included in the driving func- tion? (Yes) (No) Iranefer to t2 test Calculate and etore kt In t2 included in the driving func- tion? (you) (no) Control to t3 test Calculate and etore ktz In t3 in the driving function? LOCATION 388 389 390 391 392 393 399 395 396 397 398 399 #00 #01 #02 #03 #0# ORDER L0 “93? 32 389E 26 3953 50 527? 75 584? 66 “91? 75 527! 66 “911 75 527? 66 491! 85 I L“ 566! 40 566! 25 395r L5 570! L0 #93! 36 3977 26 #09! L5 527? L0 #93! 36 399? 26 #25! 22 399! 50 5857 75 527? 66 “91! 85 I 26 #02? 50 r 50 #021 26 923! 10 6! 7J “977 L# “991 ll Horns (you) (no) Control to In t teet Calculate and etore kt3 Ia 1n t included in the driving function? (you) (no) Transfer to log t teet Calculate and etore k 1n klt -55- 1.0011101 01mm sons #05 #0 587! 50 5871' #06 75 5771' 66 #91! #07 85 ! Ht 566! #08 #0 566! __J 26 #09! _} #09 L5 5711' _ 1. 103 2 included in the driving :0 uggy function? #10 36 #11! (yes) 26 #25! ___7 (no) Control to et test #11 1.5 527! _‘ L0 “93? #12 36 #13! 26 #25! #13 22 #13? 50 586! #1# 75 527! 66 #91! #15 $5 ! 26 #16! #16 50 ! 50 #16! #17 26 923! — Obtain and etore k log kit 10 6! #18 7.1 #97! L# #99! #19 #0 587! 50 5871' #20 7J #98! #0 5881' #21 50 588! N 578! LOCATION #22 #23 #2# #25 #26 #27 #28 #29 #30 #31 #32 #33 #3# 435 #36 #37 #38 ORDER 66 #91! S5 ! L# 566! #0 566! 26 #25! 26 #25! L5 572! LC #93! 36 #27! 26 ###! #1 #! L5 52?? Lo #93? 36 #31! L5 579? L# 566! #0 566! 26 ###! 50 527? 71 589! 66 #89! 55 r 50 F 50 #33! 26 902! #0 591! #0 590! 50 591! 7J 590! #0 591! L5 #! L# #93? #0 #! Lo #88! NOTES 1e 6‘ included in the driving func- tion? (you) (no) Control to 111/p teet Obtain and etore k eklt LOCATION 939 ##0 ##1 ##2 “#3 #45 ##7 #50 #51 #52 453 #5“ “55 ORDER 36 ##0! 22 #35! L5 #91! 66 591! 7J 579! 66 #91! $5 ! L# 566! #0 566! 26 ###! L5 #92! 10 #93? 36 ##6! 26 #7#! L5 595! 00 20? #6 ##9! 22 ##8! 22 ##8! L5 527! 50 (p)! 50 ##9! 26 878! #0 59#! 15 #9#! LO 595F 36 #53! 26 #56! 50 59#F 7J #87! #0 59#! 26 #70! 26 #56! 26 #56! JI Jl - 53 - NOIES 1e tl/P included in the driving function? (you) (no) Control to sin t test Obtain and etore t1/P IDCATI ON #56 “57 #w #59 #60 #61 #62 l#63 #65 #66 #67 #69 W0 #71 #% ORDER L5 #95! LO 5951' 36%fl 26%” 50$“ 75%& 66mg 5! #0 59#! 26 #70! 26%8 26 #62! sta Infifl 36%“ 26%” 509% W #86! #ofiu zéww 26%fl 26 #67? Sofiw 75Wu 66 #8#! a! #0 59#! 26ww 509% 75%? ééwn %! 22 #72! #0%& - 59.. Horns Obtain and etore k ‘llp LOCATION #73 #7# #75 #76 #77 #78 #79 #80 #81 #82 #83 #8# #85 #86 #87 #88 “89 - 60 - ORDER 26 #7#! 26 #7#! , 16 574? -1.. L0 #93! 36wa 26 622! 50 527! 75 596! 66 #91! S5 ! #0 597? ..., 26 600! 26 600! 26 600! 26 600! 26 600! 00 ! 00 31#159265358J 00‘! 00 31#159265J 00 r 00 628318530J 00 r 00 158#89319250J 00 ! 00 #6#15888266#J 00 ! 00 1000000000J 00 r 00 lOOOOOOOOOOJ 00 ! 00 999! 00 ! 00 lOOOOOOOJ Jl NOTES 1e :12 t included in the driving function? (108) (no) Control to coe t teat For k ein klt calculation. obtain and etore klt x 10-“ ( x 10‘"1 ) ( x 10'“) (2 x 10'“) (autilog 16/5 1 10'“) (antilog 8/3 x 10'3) (10-3) (10'2) (10'5) 1.001! I 011 #90 #91 #92 #93 #9» #95 #96 #97 #98 600 601 602 603 60# 605 606 - 61 - 01mm 00 ! 00 166666666666J 00 r 00 lOOOOOOOOJ 00 ! 00 (order no.)F 00 ! 00 11 00 r 00 21 00 ! 00 3! 00 ! 00 #1 00 ! 00 ##360#1956J 00 r 00 #3#29##81903J 00 r 00 92103#037J 00 600K 15 597! ‘1 L0 #83? #0 598! 32 600! L# #82! #0 599! 36 609! L# #82! 22 60#! 66 #81! 55 r 66 #86! 55 ! NOTES (16") (Set by the compiler) 56 ( 10000 1°502) ( 10'” 105.107“ ) MEAT I ON 607 608 609 610 611 612 613 61# 615 616 617 618 619 620 621 622 623 CRDB #0 5993' 26 6161' 26 616! 26 616! 26 616! 1.5 #82! 10 599! #0 5991' L5 5991' 66 #81! 85 r 1.0 #86! 36 615! 1.# #86! 66 #86! s1 ! 26 616! 51 #91! 722 617! 50 ! 50 616! 26 am #0 565! 50 5651' W 580! 26 620! 26 620! I# 566! #0 566! 26 622! 26 622! L5 5731' 1.0 #93! 36 62#! —'L -62.. NOTIS Obtain and etore t sin klt II can t included in the driving function? (yes) LOCATION 62# 625 626 627 628 629 630 631 632 633 63# 635 636 637 638 639 ORDER 22er 50 5271‘ 75 56“? 66 #91! 55 ! #0 597! 26 627! 15 597' L0 #83! #0 598! 32 627! L# #82! #0 599! 36 636! L# #82! 22 631! 66 #81! S5 ! 66 #86! $5 ! #0 599' 26 6##! 26 6##! 26 6##! 26 6##! 15 #82! L0 5991 #0 599! L5 5991‘ 66 #81! s5 ! L0 #86! 36 6#2! L# #86! -63- NOTES (no) Control to add the constant term For k can k1t calggiation. obtain and etore klt x 1 Obtain and etore k can klt ICCATION 6#1 6#2 6#3 6#5 6#7 651 668 670 671 672 ORDER 66 #86! 81 ! 26 6##! 51 #91! 22 6#7! 26 6##! 26 6##! 50 r 50 6##! 26 8#8! S5 ! #0 563! 26 6#7! 50 563! 7J 581! 26 6#9! 26 6#9! #0 562! 15 582! L# 562! L# 566! #0 566! 22 ( )! 00 668! 00 ! 00 6! 00 ! 00 5! L5 669! #1 7r #1 9! 50 8F 50 672? NOTES Put constant in.A ‘Add k con k1t (Add previcue driving function vaIue Store complete driving function §3¥nfiy (37#): return to main rou- tine Compiler begine; eet counter to inp dicate order of the derivative _ whose coefficient in being read in clear differential equation order- eetting counter Clear end of coefficient read in! counter Bring in coefficient LOCATION 673 67# 675 676 677 678 679 680 681 682 683 685 686 687 688 689 ORDER 26 937! #1 r 1.28! 36 698! #1 ! L0 7! 36 677! 26 679! L5 6! #0 #92! L5 #93! #0 7! 15 6! L0 699! 36 681! 22 682! L5 8! #0 500! 26 698! L5 6! L0 #96! 32 68#! 26 686! L5 8! #0 501! 26 698! L5 6! LOW9 36 688! 26 690! 15 8! #0 502! 26 698! 26 690! 1,1,1 ll 1 I -65.. NOTES Clear A Subtract coefficient from zero Coefficient S 0: control to reduce read-in counter Ban differential equation order no. been set! (no) (yes) Control to determine location of coefficient storage Set differential equation order no. Set counter to indicate order no. hae been eet If coefficient of 5th order tern. store in 500 If coefficient of #th order term. store in 501 If coefficient of 3rd order term, store in 502 LOCATION 690 691 692 693 69# 695 696 697 698 699 700 701 702 703 70# 705 706 ORDER 15 6! 10 #9#! 36 692! 22 693! 15 8! #0 503! 26 698! 15 6! LO #93! 32 695! 26 697! 15 8! #0 50#! 26 698! 15 8! #0 505! 15 6! 10 #93! #0 6! 80 #! 15 9! L# #93! #0 9! 10 668! 36 70#! 26 672! 26 70#! 26 7o#! 50 8! 50 7o#! 26 937! 26 707! 26 707! 26 707! l - 66 - NOTES If coefficient of 2nd order term. store in 503 If coefficient of 1st order tern, store in 50#' If coefficient of dependent vari- able. store in 505 Reduce 'nunber of the order" count- er hy one Skip order no. Teet for end of coefficient read-in 3nd of coefficient read-in (if pos- itive Not the end: control to continue read-in Bring in coefficient of driving function and etore temporarily LOCATION 707 708 709 710 711 712 713 71# 715 716 717 718 719 720 721 722 723 ORDER 81.#! 00 36! 26 709! 26 709! 36 7171‘ 00 1! 32 738? L5 8! #0 577! L5 #93? #0 570! 80 #1 50 5851' 50 713? 26 937! , 80 #I 26 7o#! 26 717! 26 717! 26 717! 00 1! 36 73M' 00 2! 36 730! 81 #! #0 9! 10 #95! 32 727! 15 9! 10 #9#! 36 725! LS #93! #0 568! L5 8! .ILrJ L -57.. NOTES Bring in the driving function indi- cato! Begin eensing onao to determine the driving functions Continue eeneing onao Driving function I 1n t; store co- efficient of In t and set indicator Skip I in LR Store coefficient of t Skip ! Bring in next driving function Continue eeneing on no Driving function -.gP; bring in p Deternine p value Driving function I t: set indicator and store coefficient of t LOCATION 72# 725 726 727 728 729 730 731 732 733 73“ 735 736 737 738 739 7#0 #0 579! 50 589! 50 736! 26 937! 80 #r 26 7o#! 00 1! 32 7#5! 00 1! 36 751! L l LFJI 15 tear—l NOTES Bring in next driving function Driving function = t2; eet indi- cate! and store coefficient of t Bring in next driving function Driving function = t3; set indicat- or and store coefficient of t3 Bring in next driving function 1 p Driving function 8 t I a set in- diyator and store coefficient of g P Bring in p and store Skip T Bring in next driving function Driving function I ek‘; set indi- cator and store coefficient of ek‘ Read in and store coefficient of t in ek‘ Skip T Bring in next driving function Continue sensing on a0 LOCATION 7#1 7#2 7#3 7## 7#5 7#6 7#7 7#8 7#9 750 751 752 753 75# 755 756 757 ORDER #0 57#! 15 8! #0 580! 80 8! 50 596! 50 7#3! 26 937! 80 #r 26 7o#! 80 #r 15 #93! #o 573! 15 8! #o 581! 50 56#! 50 7#8! 26 937! 80 #r 26 7o#! 26 751! 15 8! #0 582! 26 75#! 26 75#! 26 75#! 26 75#r 80 #r 15 #92! 10 669! 36 770! 15 #92! LO #96! 36 768! L5 #92! JL Jl - 69 - NOTES Driving function I sin t; set indi- cator and store coefficient of sint Skip IN (SIN sensed on 5) Read in and store coefficient of t in sin kt Skip T Bring in next driving function Skip S in 008 (sensed on 0) Driving function 8 cos t; set indi- cator and store coefficient of cost Read in and store coefficient of t in cos kt Skip T Bring in next driving function Store constant ship 10 Test to determine where to store initial conditions Equation order =r5: store initial conditions accordingly Differential equation order <5 Equation order = #:store initial conditions accordingny Differential equation order <:# IOCATI ON 758 759 760 761 762 763 76# 765 766 767 768 769 770 771 772 773 ?7# ORDER LO #951I 36 766! '15 #92! 10 #9#! 36 763! 26 761! 50 515! 50 761! 26 937! 26 772! 50 51#r 50 7631' 26 937! 26 772! 26 776! 26 776! 50 513! 50 766! 26 937! 26 772! 50 512! 50 768! 26 937! 26 772! 50 511! 50 770! 26 937! 26 772! 80 12! 26 773! 50 519! 50 773! 26 937! 22 20! _J -70- NOTE Equation order 2 3: store initial conditions accordingly Differential equation order <3 Equation order a 2; store initial conditions accordingly lquatien order a: 1: store initial conditions accordingly Control to read in At Control to read in At Control to read in At Control to read in At Skip 1N and R in INCB Transfer to beginning of differen- tial equation solution routine LOCATION ORDIR NOTES 00 8’48! Library Routine T6—S Fast Sine-Cosine 00 878! Library Routine R2 Integral Root. 111/ p 00 902! Library Routine S# Exponential, ex 00 923! Library Routine S3 Lomrithn 00 937K Library Routine 82 Input Iractiens 00 963! Library Routine Pl Print Fractions 2# 670R Transfer to beginning of compiler routine VI. GENERAL INSTRUCTIONS FOR USE O! THE COMPILER ROUTINE The Conpiler routine assembles in the computer memory a program which. when executed by the computer. will provide the solution to an ordinary linear constant coefficient differential equation of any order up to and including the fifth. The equation "driving function? may con- sist of a constant plus any additive combination of the following func- tions (each used only once) multiplied by their respective coefficients. In 1231. M‘. t, 12. 13. :1/3 or 9” or tll“ or 113.2111 1:11. cos 221. The solution consists of printed. punched. or plotted—nae desired (and as available at the coaputer)-censecutive values of the indepen- dent variable. t. the dependent variable. e.g.. y. and all the deriva- tives of y. These values begin with the initial conditions and continue with values at intervals of the independent variable corresponding to a ' previously-selected increment. After the computer begins the solution, it will continue to yield values indefinitely or until computer l'ovor- flow” or “hang-up" occurs. In order to obtain the solution to a differential equation coming within the category described above. carry out the following procedurei 1. Urite. in descending order of the derivatives. the differen- tial equation to be solved. If there is no constant in the driving function. add a sore at the end of the equation. Otherwise. add the constant at the end. 2. Divide all the terns by a constant such that the coefficients and constant term.are all less than 10.000 and preferably lie -72.. 3. - 73 - between 1 and 10. (The smaller these values are. the longer the computer can run before overflow or hangdup. See the discussion of limitations below.) Thereafter. divide all the coefficients and the constant term by 10.000. (The sol- ution to the equation before the division by 10.000 is ob- tained by multiplying the computer output values by 10.000. Location of the decimal point in the print-out makes the cor- rected values available by inspection.) All the coefficients are now decimal fractions. The decimal point itself will not be carried into the computer but will be considered by the computer as lying immediately to the left of the numbers in the coefficients; therefore. retain all zeros to the left of other significant figures in the coefficients. Each coef- ficient must be preceded by its sign. Re-write the equation: 3.1 Substitute the letter N followed by a number equal to the order of the derivative for each derivative symbol. fibers the dependent variable or any order of the deri- vative from the first through the fifth is missing. sub— stitute an N preceded by a +0 and followed by a number equal to the order of the derivative. 3.2 Substitute the symbols listed below for the driving functions: sin.k t................!SIN k H! see k t................!COS k NT ln.k t.................!IN k NT ek‘OIICOOOOOOOOOIOCOCOOH k M 5. -7#- constant................FK t.......................?T1 12......................!!2 13......................!!3 :1/2....................!22! 11,3....................!n3T :1/“....................!n#! :1/5....................!!5T The signed coefficients of the driving functions precede these symbols. When the value k is included in a function such as in sin.kt. cos kt. ln.kt. or art. this constant must be divided by 10.000 and M by Lt; 3153, Place a slant sign (I) after the equation and then the let- ters "10' to indicate that the initial conditions will fol- low. ‘Urite immediately following the letters '16" the in- itial values (in descending order of the derivatives begin- ning with the derivative whose order is one less than the or- der of the equation) of the derivatives and the dependent variable. each divided by 10.000 and any other scaling con- stant used in step 2. Follow this by the initial value (di-— vided by 10.000) of the independent variable. 2:22213_gggh, 19.1.“... by uLsi‘gg‘ Put the letter 'N‘ after the last value to indicate the end of the initial conditions. Follow the initial conditions by another slant sign (I) and the letters 'INOR.! After these letters. put a plus sign and the value of the increment (unsealed). This value may be any fraction lying between 0 and +1. Any number so chosen is - 75 - considered by the computer to be a fraction having its decimal point immediately to the left of the digit(s) chosen. Again. put an 'N‘ after the increment value to signify the end of the increment. 6. Put the Compiler routine on tape immediately followed by this equation. initial conditions. and the increment-in the for- mat and in the order specified above. E 7. The completed tape when fed to the computer will cause the *‘1 computer to stop when it reaches the order 2# 670. A 'black- ‘ j switch execute'then will start the computer omitting the 7 series of values described in the second paragraph of these instructions. (An alternate method would be to food only the Compiler tape to the computer. When its 'stop' order is reached. feed the equation tape to the computer reader and 'execute.') A typical example follows: (1) .0531; + 931 -195g_ + 10y=100e1n2t+t2+2 dt dt dt whered¥ s 93% scandgzeyaelfortzo'.‘assumeanincrement of dt dt dt 0.1 (22) .0005 d“ + .01 513% — 1.95 51!. + .1 y -.= sin 2t + .01 t2 + .02 dt dt dt (2b) .00000005 41; + 0.000001 ~ .000195 9.1 + .00001 7 =- dt dt dt +.ooo1 sin 2t + .000001 t2 + .000002 (3) +015 +00000005!# +0113 +000001N2 - 000195111 +000011Io = +0001rsm+0002rr +000001!!2 +000002!x/Ic +0 +0 +000001 +000001 +0N/INCR +1! Equation (3) is the complete encoded equation. The author has found it advantageous to have an equation-writing code check-off list. One frequently used follows: I 1. Represent all five derivative orders and the independent variable. 2. Scale and put a sign on each.coefficient. 3. Terminate signed initial conditions with.'N.' #. Terminate a signed increment with “N.” 5. Terminate scaled coefficients of t in the ln. sin. cos.-and o functions with ”B." 6. Add a zero 1! there is no constant in the driving function. Put the zero or the constant at the end of the encoded driv- ing function together with its proper symbol. 7. Specify the proper number of initial conditions. 8. Correctly encode the driving functions. Vhen.a print-out of the answers is obtained. it may be inter- preted as follows: .. 77 .. 1. The values of t, y, i, ’y‘, 'if. 'if'. and'§"in this order are dis- played beginning at the left of the page. All except the last two are located on one line. These two. "y"and'?'.'are printed in the middle of the line below. Eleven digits com- prise each value. 2. The decimal point is located to the right of the fourth digit from the left~or at the break in the number presentation. An example follows: at t 0003 2000000 0209 1872338 -0000 0020318 Integgetatigg t = 3.2 y = 2093872338 y = -0.0020318 VII. MODIFICATION PROCEDURES AND FURTHER DEVELOPMENT OF THE COMPILER Size of the storage facility of MESTIC has prevented making the foregoing compiler more general. It has been a purpose of this work. however. to point the general direction for writing a new. more compre- hensive program or for expanding this one along the same lines when ad- ditional storage might become available. Both the Bungedlutta method and its programming can be adapted (22) to the solution of more than one differential equation. and it is possible to write the same type of as- sembly'program as that given herein by using similar techniques and al- lowing for more equations. A program to allow for the solution of differential equations of higher order may be obtained readily by following the pattern set down in the foregoing Differential Equation routine. .Actual programming in- volves merely the addition of higher order derivative-calculating paths (see Figures la and lb) in parallel with those already existing-begin- ning at each order test and duplicating (except for higher order values) the last path already there. To provide the new path. modify the last- added path in the same way it represents a modification of the path Just before it. The Driving Function routine is an “open-ended“ type of program in which additional function-calculating routines are brought into the program as it is made successively to sense certain locations for '1? or '0.“ Thus additional driving functions may be added readily by merely -73.. -79- continuing the present programtand then directing it to sense (at the appropriate time) the positive or negative value of certain storage. If the storage is positive at that time control may be transferred to some new function-calculating routine as desired. This my be done with the present program which still does not utilize some seventy-five storage locations. (This storage appears not to be enough to allow for sixth order equations. also. but may readily handle several driving functions. depending upon the length of the program required to calculate them. The .Assembly routine might also be modified within this storage to handle the additional function if desired.) Close inspection of the organisation of the machine memory in the appendix is suggested as an initial step in any modification program. Simplification of writing the routines presented herein was facilitated by its detailed planning. APPENDIX Organisatien of the lie-cry Qcatiog Contents 0 _ l 2 -- Subroutines' temporary sterage space 3 _J L; 5 6 Order of the derivative whose coefficient is being read is 7 Order indicator setting 8 Temporary coefficient storage 9 No. of coefficients which have been read in 10 ll 12 20 Differential Equation Routine begins #99 Part l of Differential Equation Routine ends --80- w 500 501 502 503 50“ 505 506 507 508 509 510 511 512 513 51“ 515 516 517 518 519 520 521 522 523 52% 525 -81.. Contents Coefficient ef '§”( 1 10'“) I I '§° I I I 'y" I I I 'y' I I I 9 I I I y I Initial condition.'§6 ( x 10'“) 2 Iii . yo . =3.in s s ‘y‘o s g 'y‘11 " ' i 0 ' = 511 s s yo I =.y11 e s to s g ‘11 lgt ( x 10‘“) ‘i1,( 1 10'“) aft (pg; multiplied by 10'“) '94- s s s s 2 %E. . .. Temporary storage for'?°times its coefficient (1 10'“) in calculation of the highest derivative Temporary storage for y’times its coefficient (1 10'“) in calculation of the highest derivative Temporary storage for 9 times its coefficient (1 10‘“) in calculation of the highest derivative Temporary storage for y times its coefficient (1 10'“) in calculation of the highest derivative - 82 - nggtion ngtents 526 Temporary sterege for y times its coefficient (1 10'“) in calculation of the highest derivative 527 :goizged:::izélf::§tI6z. er ‘ih as required in calculation 528 529 530 531 ‘31. (x 10-“) 532 °§iz ' 533 3",. - 531» 3%.. - 535 312 ' 536 ' 1'12 " 537 ‘12 ' 538 "sq. - 539 '§;3 ' 51m :13 " 541 5‘3 " 5% 913 " 5“) 1'13 " 54“ ‘13 ' 5+5 a. - 5‘6 7’10 " 5”? yin " 5"8 hit " 5“9 Yin ' 550 nu " 551 t1“ - 3103.31.21 552 553 551‘ 555 556 557 558 559 560 561 562 563 561+ 565 566 567 568 569 570 571 572 573 SW: 575 576 577 Contegtg (“in + 2312 + 2323 +31») (x 10'") + 25.2 + 23".} +33“) (1 104*) + 2512 + 2')?” Vii“) (x 10‘“) (5‘11 (311 (3‘11 + 2.3312 4- 2513 + fig.) (1 10 -33- 4') (5‘11 + 2912 + 2’13 *510) (" 10"“) A'i'i A y. (if. Ai A! i i (x 10““) Value of :1 cos let (x 10'“) Value of cos kt (x 10'“) Coefficient of t in driving function = cos kt (x 10*) Value of sin kt (x 104*) (see 597-599) value of the driving function (x 10’“) If a l is stored here. t is a driving function 1 1 1 I 1 1 .. $2 is a driving function . In t is a driving function . log t is a driving function . at is a driving function .cos t is a driving function .sin t is a driving function Coefficient of t ( x 10'“) 29.2.1.9; 578 579 580 581 582 583 585 586 58? 588 589 590 591 592 593 591+ 595 596 597 598 599 600 651 Content; Coefficient of log t (x 10'“) s e ekt s " " sin t " " " cos t " Constant term If a 1 is stored here. t3 is a driving function Coefficient of t3 (x 10"“) k1. coefficient of t in la klt driving function (x 10"“) k1. coefficient of t in log ‘51: driving mung; i la klt (x 104*) log klt " k1. coefficient of t. in eklt (x 10"“) l/okltx10'3 Engrary storage for (l/ekt110"3)n and final storage for If a 1 is stored here. t1/p is a driving function Coefficient of ‘l/p (x 10'“) (t x 104)”? or (104 t1/P) as needed Value of p in t” p driving mnction Coefficient of t in sin kit driving function (x 10"“) 1: t x 104* in sin klt (or cos klt) driving function cal- culation (kt x 10"“) - 2nTl'x 104 Mint 1 10"“) - 2n‘lTx 1046) HT: 10"“ after the bracketed tern becomes negative: also the fraction ole' represented by kt ( sin I: t or CO! klt) Part 2 of Dif erential lquation program begins Part 2 ends -35.. Location 9.92.19.12.11; 670 Assembly Routine begins 773 Assembly Routine ends 848-877 Inst Sine-Cosine Routine. '1'6-5 878-901 Integral Root. R2 902-922 hponentisl. 81+ 923-936 Logarithn, 53 937-962 Decinal Fraction Input. I2 963-990 Print Routine. P1 999-1023 Decimal Order Input, 11 1. 2. 3. 5. 7. 9. BIBLIOGRAIEY K. landlfhmdementals of Digital Computers," Prentice-Hall. Inc.. Inglewood Cliffs, I. J.; 1958. C. L. Johnson. “Analog Computer Techniques.“ McCray-Hill Book Co.. Inc.. New York. N. Y. ; 1956. R. I. Richards.'Arithmetic Operations in Digital Computers." D. Van Nostrand Co., Inc.. Princeton. )1. J.; 1955. R. I. Spregue, ”fundamental Concepts of the Digital Differential Analyzer flatbed of Computation.“ W W. vol. 6. pp “1449; 1952. R. G. Selfridge. “Coding e General-Purpose Digital Computer to Oper- iste as a Differential Analyzer." Proc. Western Joint Computer Confer- ence, March. 1955. P. H. Lesh. and r. G. Curl. 'DSPI: An Interpretive Digital-Computer Routine Simulating Differential-Analyzer Operations.” Memorandum No. 20-lbl. Jet Propulsion laboratory. Cal. Inst. of Tech” Pasadena. 1'. Lash, 'lethods of Simlating 9. Differential Analyser on a Digital Computer.“ Jm, Ass. Cogpgtigg Inching. vol. 5: Julio 1958. M. L. Stein. Jack Rose. and D.B. Parker. 'A Compiler with an Analog- Oriented Input Language.‘ Proc. Western Joint Computer Conference; lurch. 1959. It. Io. Stein. and Jack Rose. "The Automatic Deduction of Differential Equations from Analog Set-Up Diagrams.“ Mathematical Pro-Print Ho. -86... 10.. 11. 12. 13. 11+. . 15.. 16. 17. 18. 19. 13. Convair Astronautics. San Diego. California. G. M. Hopper. “Automatic Coding Techniques-1955.” Proc. High Speed Computer Conference. Louisiana State University; Feb..l956. . “Tomorrow - Automatic Programming.“ W: Spegia; Computer Report. vol. 36 no. 2; Feb.. 1957. . "Automatic Programming for Business Applications.“ 9g; puters and Automation.vol 7 no. 2; Feb..l958. J. L. Meriam."Procedure for the Machine or Numerical Solution of Ordinary Linear Differential Equations for Two-Point Linear Boundary Values.“ Mathematical Tables and Othe; Aid! 59. Cgmgtign. vol. 3. pp 532-539; 19%. C. B. Froberg. " On the Solution of Ordinary Differential lquations with Digital Computing Machines." Iggl. Fzsioggafiska Sillskagts i Lund Fbr ndli ar Pr c 30 sio Soc Lund vol. 20. pp 136-152: 1950. S. Gill. “A Process for the Step-by-Step Integration of Differential lquations ’in an Automatic Digital Computing Hachiae.‘ fig. Cam- bridge Phil. Soc... ve1,.h7. pp 96-108;.1950. — l. K. Gavurin. 'On a Method of Numerical Integration of Homogeneous Linear Differential Equations Convenient for Mechanisation of the Computation." Tm! Hat. InstI Steklov. 28. pp 152-156; 19169. C. P. Gradwell. I'Solution of Differential Equations on an Electronic Digital Computer.‘ lggineer. vol. 196. pp 36—39: July. 1953. S. Gorn. ”Real Solution of numerical Equations by High-Speed Mach- ines.” Ballistic Regearch Labggatggigg Rgpggt. Aberdeen Proving Ground. Aberdeen. Md.: 1955. L. Iukaszevics. and P. Sseptycki. I'llectrenic Integration of. Differ— -88- ential Equations. BLI.‘ Z‘astosl Hat.. vol. 2. pp 399-1615: 1955. 20. P. D. Williams. "A Study of Humerical Methods for Solving Differ- ential Equations.“ Proc. Ass. Computing Machinery. University of Illinois; 1958. 21. M. V. Wilkes. D. J. Wheeler. and S. Cill."Programs for an Blee- tronic Digital Computer." Addison-Wesley Publishing Co.. Inc. . Reading. Mas“: 195?. 22. X. J. Nielsenfl'flethods in Numerical Analysis." The Macmillan Co.. New York; 1956. 23. D. D. McCracken. “Digital Computer Programming." John Wiley .5 Sens. Inc.. New York; 1957. ROOM USE MY .3 «9m ' J L | \ .. 1i..£l\ 1|‘l’ul’p. .. TATE UNI M'TITIIIWHISI (“I I NI \HWITIW‘W WITIMITIES 3 119113082 8911