Maxima: Piecewise function differentiation and simplification.
Subject: Maxima: Piecewise function differentiation and simplification.
From: Robert Dodier
Date: Thu, 31 Jul 2008 23:45:04 -0600
On 7/31/08, Constantine Frangos <cfrangos at telkomsa.net> wrote:
> (%i101) odd_args(vpen);
> (%i102) even_args(vpen);
Well, I wouldn't expect these operations to yield useful results;
here's what odd_args and even_args are supposed to do:
odd_args (if a then b elseif c then d else e);
=> [a, c, true] /* i.e. these are the conditions */
even_args (if a then b elseif c then d else e);
=> [b, c, e] /* i.e. these are the branches */
> The step, op(vpen), returns ?mcond, instead of "if", and the relevant part
> of the program is not executed.
>
> Is it possible to modify the program so that it runs correctly (with maxima
> 5.10, 5.12) ?
Try replacing the test op(e) = "if" with verbify(op(e)) = "if" .
Please consider updating the most recent version -- many things
have changed since 5.12. There will be a 5.16 version in a week
or two.
best
Robert Dodier