[sci.math] Ordinary Differential Equation Algorithms

deb@svax.cs.cornell.edu (David Baraff) (02/20/88)

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.

If you have source to do any one of these, are any useful comments/suggestions,
please send me some mail. I'd prefer C source, but Fortran or (even) Pascal
would be fine.

	Thanks in advance,

		David Baraff		deb@svax.cs.cornell.edu or
		Cornell University	allegra!deb

bumby@math.rutgers.edu (Richard Bumby) (02/23/88)

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 **