Okay, that works.
Thx,
Rich
--------------------------------------------------
From: "Barton Willis" <willisb at unk.edu>
Sent: Friday, August 13, 2010 6:40 PM
To: "Richard Hennessy" <rich.hennessy at verizon.net>
Cc: <maxima at math.utexas.edu>
Subject: Re: [Maxima] conditional integration
> -----"Richard Hennessy" <rich.hennessy at verizon.net> wrote: -----
>
>> One thing I can't do is opsubst("if", "%if", %);
>
> Try something like:
>
> (%i9) subst('%if = lambda([cnd, a, b], if cnd then a else b), %if(x < 1,5,7));
> (%o9) if -(x-1)>0 then 5 else 7
>
> A Maxima conditional expression has a hidden argument of true. This makes the
> substitution tricky.
>
> --bw