> Hello,
>     I believe I found a bug in how radicals are simplified.  The general 
> idea is that sqrt(x^2)=abs(x), but sage simplifies sqrt(x^2) to x instead, 
> even if x is negative.  I've included a simple example below.  
>
> sage: x = var('x')
> sage: assume(x<0)
> sage: expr = sqrt(x^2)
> sage: simp_expr=expr.simplify_radical()
> sage: eqn = expr==simp_expr
> sage: print eqn
> sqrt(x^2) == x
> sage: print eqn.subs(x=-1) #Clearly this is wrong
> 1 == -1
> sage: abs(x).simplify() #However, Sage knows how to deal with abs(x) for 
> x<0
> -x
>
> I've never used the Sage Trac system before, so I thought posting this to 
> here might instead might be a good idea.  Hope this is helpful.
>

For more or less this reason, simplify_radical was removed from 
simplify_full.  However, it is still useful.  See 
http://www.sagemath.org/doc/reference/calculus/sage/symbolic/expression.html#sage.symbolic.expression.Expression.simplify_radical
 
for some specifics on exactly what it claims (and doesn't claim) to do.  In 
particular, one can have arbitrarily long arguments (and we have) about 
exactly what the underlying Maxima "radcan" really "should" do.  I don't 
think this counts as a bug, but rather as user beware - simplifications 
sometimes are indeed simplifications, like x^2/x = x.

Or, if it's because of the assumption, I think that Maxima's simplification 
methods do not take that into account.   The method simplify() just sends 
to Maxima and back, and for that it does take it into account.

- kcrisman

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to