Robert,
Though I agree that, in general, Maxima functions should not ignore
assumptions, radcan is *by design* oblivious to them. Radcan is supposed to
return a near-canonical "over a large class of expressions and *a given
ordering of variables*" (my emphasis), so radcan(EX) should return the same
value *regardless* of assumptions. It would be a bug if radcan(EX)
returned different values dependent on the environment.
Radcan does not follow the numerical-analysis convention that sqrt(EX) is the
positive square root; rather, it represents *some* consistently-chosen
square root.
What is more confusing is that radcan(sqrt(x^2)-x) doesn't return 0 --
because the general simplification sqrt(x^2)->abs(x) interferes. That can
of course be corrected by setting domain:complex.
-s
On Wed, Mar 14, 2012 at 11:37, Robert Dodier <robert.dodier at gmail.com>wrote:
> On 3/9/12, Raymond Toy <toy.raymond at gmail.com> wrote:
>
> >> reset();kill(all);
> >> assume(z>r);
> >> radcan(sqrt(r^2-2*z*r+z^2));
> >>
> >> it gives
> >>
> >> z-r
> >>
> >> works fine
> >>
> >> but with capital R
> >>
> >> reset();kill(all);
> >> assume(z>R);
> >> radcan(sqrt(R^2-2*z*R+z^2));
> >>
> >> it gives
> >>
> >> R-z
> >>
> >> should be
> >> z-R
>
> > I don't think this is a bug. Radcan does sometimes do things like this
> and
> > that is the expected result. I don't think radcan recognizes assume
> either.
>
> radcan ignores assume -- I think that's a bug. That the result depends on
> the ordering of the variables is OK only if all possible results are
> equally valid.
> That's not the case when there are facts (stated by assume) to take into
> account.
>
> It's true that many functions in Maxima ignore assume. I don't think
> that's desirable, although I do understand that it's hard to fix.
>
> best
>
> Robert Dodier
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>