Subject: Initial- and boundary-value problems in Maxima.
From: Jaime Villate
Date: Fri, 09 Sep 2011 11:22:10 +0100
On Fri, 2011-09-09 at 13:08 +0300, Gregor Berman wrote:
> I am looking for a decent Maxima numerical solver for initial-value
> problems, with adaptive step size and error control. As far I can
> tell, Maxima only has function rk() for this, but rk() is an
> implementation of a rather elementary 4th-order Runge-Kutta method,
> with constant step size and no error control. Such an algorithm is
> definitely not suitable for serious work.
> I am aware of excellent initial-value solvers implemented in Fortran,
> most notably LSODAR (included in ODEPACK), which I use extensively in
> my Fortran programs (it is also included in Scilab). I wonder if I can
> use something similar in Maxima. If not, any decent solver for
> initial-value problems will do. The only way I can think is to use
> Maxima within Scilab, but I am looking for a neat Maxima way.
Hi,
the main focus of Maxima has been symbolic computations rather than
numerical methods. rk was made just to let first-year undergraduate
students play around with the Runge-Kutta method without getting lost
with programming details. However, it should be easy to replace the 4th
order Runge-Kutta method by any other method you want.
You can find the Maxima code for rk() at the last 27 lines in the file:
[Maxima-root]/share/dynamics/dynamics.mac
Feel free to ask me for any help you need with the code.
Regards,
Jaime Villate
(author of rk)