Xref: utzoo sci.math:2891 comp.graphics:1762 comp.sources.wanted:3377 sci.physics:2919 Path: utzoo!mnetor!uunet!husc6!rutgers!gauss.rutgers.edu!math.rutgers.edu!bumby From: bumby@math.rutgers.edu (Richard Bumby) Newsgroups: sci.math,comp.graphics,comp.sources.wanted,sci.physics Subject: Re: Ordinary Differential Equation Algorithms Message-ID: <195@math.rutgers.edu> Date: 22 Feb 88 22:16:17 GMT References: <2020@svax.cs.cornell.edu> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 36 Keywords: O.D.E, Algorithm, Source In article <2020@svax.cs.cornell.edu> deb@svax.cs.cornell.edu (David Baraff) writes: > Does anyone have source for the following: > > I'm planning to do some work involving ordinary differential > equations. I will have some starting (initial) point, and a function > that gives the derivative of the state variables in terms > of the state variables. > > I want to implement the following numerical methods: Runge-Kutta > (fourth order), the Gears method (Gear's 1971 paper), and an > Adams predictor-corrector method. > > The Runge-Kutta method appears fairly easy to implement. > The others look to be more difficult. > I have used the text of Burden and Faires for teaching an undergraduate numerical analysis course, and find the pseudocode they use for algorithms easy to follow and convert into any reasonable language. One word of warning about the Adams method: the description of what needs to be computed looks like it requires repeated evaluation of the function expressing the derivatives, but you can improve efficiency by storing those values after the first step in whic they occur. The quantities appearing in a predictor step are used only in the immediately following corrector step, but the corrected values are used in several subsequent steps. It is also a good idea to keep track of the difference between predictor and corrector since this can be used to estimate the error. I have implemented this for a TI-59 calculator (now obsolete) for classroom illustrations with no more than the usual number of bugs in the first version. -- --R. T. Bumby ** Math ** Rutgers ** New Brunswick **