Well, it was deliberate when I wrote radcan.
it is perhaps inconsistent with this:
z:(x-1)^2;
sqrt(z) ==> abs(x-1)
though sqrt(expand(z)); does not do that simplification.
the commercial macsyma returns abs(x-1), so someone decided differently
there.
algebraically speaking, sqrt((x-1)^2) has TWO algebraic values, x-1 and
1-x.
note that neither one of them is abs(x-1).
radcan chooses one of the values based on which goes to +inf as x goes to
+inf.
And if you insist that abs(x-1) is what you want, what consistent theory can
you offer
to choose a single value for ((x-1)^3)^(1/3)?
There are 3 values, 2 which involve 1/2*(sqrt(3)*%i+1), whose powers cover
all the roots
(that is, they are primitive roots). But x-1 is not a primitive root.
RJF
> -----Original Message-----
> From: maxima-bounces at math.utexas.edu
> [mailto:maxima-bounces at math.utexas.edu] On Behalf Of Robert Marik
> Sent: Tuesday, May 27, 2008 2:15 PM
> To: maxima at math.utexas.edu
> Subject: bug in radcan? radcan(sqrt(x^2-2*x+1));
>
> Hello,
> radcan(sqrt(x^2-2*x+1)); gives
> x-1 and not abs(x-1), as expected
>
> Is it a bug in Maxima? I have Windows version (Vista)
>
> wxMaxima 0.7.5 http://wxmaxima.sourceforge.net
> Maxima 5.15.0 http://maxima.sourceforge.net
> Using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (aka GCL)
>
>
> Many thanks
>
> Robert Marik
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>