A Maxima function for solving initial value problems with adaptive step size and error control.



2011/10/25 Jaime Villate <villate at fe.up.pt>

> On 10/25/2011 04:05 PM, Robert Dodier wrote:
> It could be added to the current rk package in which it is based. If
> Panagiotis agrees, I could incorporate it as part of rk, to be used when an
> option adaptive45 (or something similar) was given.
>

Actually, rkf45 is not based on rk; I tried to keep it compatible with rk's
syntax to avoid confusion for new users, and of course both rk and rkf45 are
implementing Runge-Kutta methods, but otherwise their implementation has
little in common.
If rkf45 is included in share, rk could still be useful for educational
purposes (teaching students about the original Runge-Kutta method of fourth
order, and using rk for examples of use.) Otherwise, rkf45 should be used
for real work. I believe we should keep them separated, as it is the case in
most Numerical Analysis packages I am aware of. If, however, you decide
otherwise, I think rkf45 should be the default, and rk should be used if an
option "nonadaptive" (or something similar) was given.


> One thing I would change though, is the "option = value" syntax. I find it
> confusing for the users to mix the two different option syntaxes "[option,
> value]" and "option: value" in the same package.
>

rk itself has no optional arguments, but other functions in dynamics.mac do.
I have seen other packages using the "option=value" syntax, instead of
[option,value]. Although I personally like the "option=value" syntax, this
is indeed confusing for new users, considering that one of the most used
functions, plot2d, adopts the "[option,value]" syntax. It depends on where
rkf45 will be put, I guess. If rkf45 is to be included in dynamics.mac, then
I should definitely change the syntax for optional arguments, as Jaime
suggested. To be honest though, I think that a more appropriate place for
putting rkf45 would be share/numeric. It's up to you anyway.


> Also, the documentation is very nice, but in order to be incorporated into
> Maxima, we would need the LaTeX source file.
>

No problem about the LaTeX source file, I will post it as soon as we fix the
details (might need minor changes, depending on how rkf45 will be included
in /share.)


> Thanking Panagiotis for his contribution,
>

Thank you Jaime.