--------------------------------------------------
From: "Barton Willis" <willisb at unk.edu>
Sent: Sunday, August 29, 2010 10:14 AM
To: "Richard Fateman" <fateman at cs.berkeley.edu>
Cc: <maxima at math.utexas.edu>; <drgst at web.de>
Subject: Re: [Maxima] I need advice on how to use radcan
> -----maxima-bounces at math.utexas.edu wrote: -----
>
>>The introduction of abs() in the answers to radcan makes a hash of its attempt to make algebraic sense.
>
> Example:
>
> (%i1) radcan(sqrt(a^2)), domain : real, radexpand : true;
> (%o1) abs(a)
>
> (%i2) radcan(sqrt(a^2-2*a*b+b^2)), domain : real, radexpand : true;
> (%o2) b-a
>
> The outputs %o1 and %o2 are inconsistent, I think. My Macsyma 2.2 gives abs(b-a) for %o2
> and abs(a) for %o1, by the way.
Yes, they are inconsistent. A correct but not very concise equivalent is
if a>b then a-b = +sqrt(a^2-2*a*b+b^2) elseif a<b then b-a = +sqrt(a^2-2*a*b+b^2) elseif equal(a,b) then a (or b) =
+sqrt(a^2-2*a*b+b^2)
A far more concise answer is
abs(a-b) = +sqrt(a^2-2*a*b+b^2)
which can be considered a "simplification", the "if" is a "complification" but I admit it is still informative. Another
simplification would be %if(a-b>0,a-b,b-a)
Rich
>
> The user documentation for radcan should be improved. Something like:
>
> For any n-variable Maxima expression e, the equation radcan(e) = e is an identity on some
> nonempty open subset D of C^n. The set D might differ from what you would like it to be.
>
> --Barton
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>