#12780: Be more careful about setting the Maxima 'domain'
------------------------------------+---------------------------------------
       Reporter:  mjo               |         Owner:  burcin        
           Type:  enhancement       |        Status:  closed        
       Priority:  major             |     Milestone:  sage-5.6      
      Component:  symbolics         |    Resolution:  fixed         
       Keywords:                    |   Work issues:                
Report Upstream:  N/A               |     Reviewers:  Burcin Erocal 
        Authors:  Michael Orlitzky  |     Merged in:  sage-5.6.beta0
   Dependencies:  #12845            |      Stopgaps:                
------------------------------------+---------------------------------------

Comment (by zimmerma):

 if {{{x}}} is assumed to be real the correct answer for {{{sqrt(x^2)}}} is
 {{{abs(x)}}}.

 However if {{{x}}} is assumed to be complex, the correct answer is either
 {{{x}}} or {{{-x}}},
 more precisely the one with a positive real part (or a nonnegative
 imaginary part if the real part is zero). Then if {{{x}}} is non-real the
 answer {{{abs(x)}}} is wrong, since this is the norm of {{{x}}}, and the
 norm is real. Consider for example {{{x = -3+4*I}}}, whose norm is 5, but
 whose square root is {{{3-4*I}}}.

 Maple 15 gives:
 {{{
 > assume(x,real);
 > simplify(sqrt(x^2));
                                     | x~ |

 > assume(x,complex);
 > simplify(sqrt(x^2));
                                   csgn(x~) x~
 }}}

 If this ticket did change the default domain of symbolic variables from
 real to complex, this is a **MAJOR** change.

 Paul

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12780#comment:15>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" 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-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to