[Maxima] about asksign, an example.
Robert Dodier
robert.dodier at gmail.com
Tue Mar 3 10:00:15 CST 2009
On 3/1/09, Richard Fateman <fateman at cs.berkeley.edu> wrote:
> let s(c):= (x^2+x+2)/(x^2+x+c);
>
> Now consider integrate(s(c),x);
>
> Maxima gives two possible answers depending on the sign of 4*c-1. call
> them A(x,c) and B(x,c).
> In fact this is a bug in Maxima because it should provide yet a third
> form of the answer for 4*c-1=0.
Agreed, that's a bug. I'll make a bug report about it if there isn't
one already.
> bfloat(rectform(subst(x=1.0, subst(c=1/8, integrate(s(c),x)) =
> integrate(s(1/8),x))));
> bfloat(rectform(subst(x=1.0, subst(c=4, integrate(s(c),x)) =
> integrate(s(4),x))));
> These two examples in Maxima require that you answer a question, and the
> alleged equation is true only if you answer the question correctly.
Well, that's exposes a failure in asksign, right? Because the context
in which a result was generated is not carried along. That's the point
of constructing conditional expressions instead of calling asksign.
> Then a challenge for Maxima is to notice that computing diff(F,x)
> eliminates all the 'if's and is simply s(c).
Well, if Maxima produces a correct but overly complicated result,
I'm not too worried, that's certainly much better than throwing the
conditions by the wayside.
> Now consider if s(c) involved more parameters. And perhaps iterated
> integrals.
Well, it will make a mess, but so what? Humans employ computers
in no small part to grind through simple, tedious computations.
This business about tracking conditions isn't so different,
conceptually, from adding up a long column of big numbers.
FWIW
Robert Dodier
More information about the Maxima
mailing list