From: Christophe Rhodes
Subject: Integrating systems of differential equations
Date: 
Message-ID: <sqbsv1txr3.fsf@lambda.jesus.cam.ac.uk>
I was asked at work to write a means of integrating sets of
differential equations (in particular, geodesic equations). Though my
first thought was "What's wrong with Mathematica?", I did it anyway
(ah, the joys of being a Research Student), but I imposed my own
specifications, so that I could at least hold my head up, and
actually, I think it now has some functionality that isn't available
anywhere else.

A typical call looks like:

* (with-logging-to-file "/tmp/geodesics.dat"
    (with-stop-condition (< y 0)
      (integrate 1.0d0
                 #'d2t/dp2 '(1.0d0 1.0d0)
                 #'d2y/dp2 '(-1.0d0 0.03d0)
                 #'dx/dp '(0.0d0))))

So that this would integrate the system

t'' = (d2t/dp2 p time tdot y ydot x); t'(1) = 1; t(1) = 1
y'' = (d2y/dp2 p time tdot y ydot x); y'(1) = -1; y(1) = 0.03
x' = (dx/dp p time tdot y ydot x); x(1) = 0.

until y becomes less than 0.

To cut to the chase, if anyone else is interested in this class of
problem, or in extending the framework (or integrating[1] this into
Maxima or whatever) then please do; a snapshot (all 10k of it) lives
at <URL:http://www-jcsu.jesus.cam.ac.uk/~csr21/integrate-0.1.tar.gz>.

There are plenty of rough edges to the code; in particular, I think
that there probably needs to be some way of specifying and internally
representing a system to integrate rather than a collection of
functions, since the functions need to know about each other anyway
because of the interdependence of their derivatives. Other plans for
the future include using cleverer integrators than the adaptive
Runge-Kutta, but there's enough there for it to be useful, I think.

Christophe

[1] Pun not intended.
-- 
Jesus College, Cambridge, CB5 8BL                           +44 1223 524 842
(FORMAT T "(·@{~w ········@{~w~^ ~})" 'FORMAT T "(·@{~w ········@{~w~^ ~})")
From: Paolo Amoroso
Subject: Re: Integrating systems of differential equations
Date: 
Message-ID: <QoYmOjQ3WQz1MIut00PsRjrnWxup@4ax.com>
On 27 Nov 2000 12:17:36 +0000, Christophe Rhodes <·····@cam.ac.uk> wrote:

> To cut to the chase, if anyone else is interested in this class of
> problem, or in extending the framework (or integrating[1] this into
> Maxima or whatever) then please do; a snapshot (all 10k of it) lives
> at <URL:http://www-jcsu.jesus.cam.ac.uk/~csr21/integrate-0.1.tar.gz>.

If the code is distributed as open source, you may add an entry to the
CLiki site:

  http://ww.telent.net/cliki/


Paolo
-- 
EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
http://cvs2.cons.org:8000/cmucl/doc/EncyCMUCLopedia/