Fitting in Maxima



Raymond Toy wrote:

> Michel Talon wrote:
>> Raymond Toy wrote:
>>
>
>>   
> Ok.  I see that colnew tickles a couple of bugs in f2cl.  Those are
> fixed now.  After adding a couple of missing linpack routines and a
> small compatibility file, it all compiles.

Fantastic!

> 
> So, do you have a simple test program that I can use to check to see if
> the conversion actually works?

In my work i have used colnew as embedded in scilab, where it is called
bvode. The man page can be found here 
http://www.scilab.org/doc/manual/Docu-html659.html
and contains simple examples. 

As i remember colnew needs to be called from an other program which reserves
a "workspace", that is room in memory where computations are done more or
less "in place", and where the final result appears. Scilab reserves this
space on the stack, reads the results and returns, destroying the
workspace. This by itself forbids using the continuations method which
consists of using a previous result as a guess for a succeeding computation
with slightly different parameters. So we had to hack a little bit the
scilab code to preserve the stack, but the hack was very fragile and only
sufficient to run our computation. I think continuation is obtained by
taking ipar(9)=2 in the above man page, but it is broken in scilab.

So i suspect to use colnew in maxima the first step is to create a workspace
of size ipar(5) i think. Also one needs of course to define the system to
solve and its Jacobian.

If you want to see the problem we were looking at, and a description of how
colnew works (as far as i understood, because it is complex) you can look
at:
http://arxiv.org/pdf/hep-th/0509226
notably section 4 for the description of colnew. The example of this paper
is very interesting to show why the usual class of boundary value problems
for ODE ( that is solving a second order equation with given values at both
ends of an interval, getting eigenvalues ) is far too restricted to solve
many interesting problems that colnew can tackle without difficulty.

By the way this type of ODE problems (basically finding eigenvalues and
eigenvectors of spectral problems) is radically different from the typical
elementary ODE solver which simply solves an ODE given initial values. For
that there are tons of programs in matlab, scilab, octave, all 
algebraic computing programs, etc. the only difficulty here being not losing
too much precision when time grows.

Thanks  a lot for your attention.

> 
> Ray

-- 
Michel Talon