Initial- and boundary-value problems in Maxima.



talon at lpthe.jussieu.fr wrote:


> 
> Apparently there is a difference in the way to call the arguments.
> 
> 

I know what the problem is: in the initial version of the wrapper,
the "z-vector" is a maxima array z, the components z[1], z[2], etc.
being the objects of interest. Hence one calls fsub(x,z) or
g(z) in prob1.mac and prob2.mac
Raymond discovered that for some reason this was prone to errors and
changed to explicit variables z1,z2, ... so the calls are now as in
prob3.mac of the form f(x,z1,z2,z3,z4) or g(z1,z2,z3,z4). Since we were
working on prob3, this one was updated to the new syntax, but of course we
forgot prob1 and prob2. This is why colnew now crashes on them. The
solution is to update prob1.mac and prob3.mac to the same syntax as
prob3.mac in the definition of f, g, and their jacobians.

P.S. The "z-vector" here is the followiing object: for a differential
equation like u'''=f(u,u',u'',x) one sets z=[u,u',u''] and similarly for a
system, it is the collection of all derivatives of all functions up to
maximal order of the corresponding eq. minus one. In general f is a maxima
array, hence equations of the sort:


/* v is the parameter. To solve the eigenvalues problem one adds the
equations c'_2 = 0, c'_3 = 0, so 4 unknowns constants, and 4 boundary
conditions
f -> z[1], f' -> z[2], c_2 -> z[3], c_3 -> z[4], c_1 -> v - z[3] - z[4] */


f(x, z1, z2, z3, z4) :=
  [- (1/2.0d0)*(1/x + 1/(x-1.0d0) + 1/(x-y))*z2 +
      ((vv - z3 - z4)/x + z3/(x-1.0d0) + z4/(x-y))*z1,
  0.0d0, 0.0d0];
df: jacobian(f(x, z1, z2, z3, z4),[z1, z2, z3, z4])$

I hope it is now trivial to convert prob1 and prob2.

-- 
Michel Talon