Hi, Here is some behavior of Sage which can be quite disturbing for a new user and probably would be considered as a bug:
sage: assume(x<0) sage: sqrt(x^2).simplify_full() x It appears that the instruction "assume(x<0)" is not sufficient to enforce the desired behavior: x is still considered as a complex number and sqrt(x^2) returns *a* square root of x^2, not necessarily the positive one. To enforce x real, one should set: sage: maxima_calculus.eval('domain:real') 'real' Then the output of simplify_full() is correct: sage: sqrt(x^2).simplify_full() -x But the following problem remains: sage: sqrt((x-1)^2).simplify_full() # correct result: -x + 1 sage: sqrt(x^2-2*x+1).simplify_full() # wrong result (and not consistent with the above): x - 1 I know that the problem is due to Maxima function randcan and has been much discussed, in particular here: http://www.math.utexas.edu/pipermail/maxima/2011/026097.html What is the latest status of this ? In particular, is there any possibility to enforce the correct behavior by passing some options to Maxima ? (I've noticed that maxima_calculus.eval('radexpand:true') does not help). Thank you for your help. Eric. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/groups/opt_out.