Dear all,
radcan do understand assume and do it correctly.
consider de code
No, not quite.
(%i1) reset()$kill(all)$
(%i3) radcan(sqrt(x^2)?x);
(%o3) |x| ?x
(%i4) assume(x>0);
(%o4)[x>0]
(%i5) radcan(sqrt(x^2)?x);
(%o5)0
This happens because maxima has already simplified sqrt(x^2)-x to zero, so radcan effectively gets 0.
(%i7) reset()$kill(all)$
(%i1) assume(x<0);
(%o1)[x<0]
(%i2) radcan(sqrt(x^2)?x);
(%o2)?2 x
Similarly, maxima has already simplified this to -2*x by the time radcan gets it.
You can see this if you trace(radcan).
You can see it without tracing
(%i1) reset()$kill(all)$
(%i2)
(%i1) sqrt(x^2)?x;
(%o1) abs(x)-x
(%i2) assume(x>0);
(%o2) [x > 0]
(%i3) sqrt(x^2)?x;
(%o3) 0
(%i4) forget(x>0);
(%o4) [x > 0]
(%i5) assume(x<0);
(%o5) [x < 0]
(%i6) sqrt(x^2)?x;
(%o6) ? 2*x
(%i7)