#11590: Integrating the sgn() function can produce incorrect results
-----------------------------+----------------------------------------------
   Reporter:  mjo            |          Owner:  burcin
       Type:  PLEASE CHANGE  |         Status:  new   
   Priority:  major          |      Milestone:        
  Component:  calculus       |       Keywords:        
Work_issues:                 |       Upstream:  N/A   
   Reviewer:                 |         Author:        
     Merged:                 |   Dependencies:        
-----------------------------+----------------------------------------------
 Actual result:

 {{{
 sage: integrate(x * sgn(x^2 - 1/4), x, -1, 0)
 1/2
 }}}

 Since the argument to sgn() has only one root, -1/2, on (-1, 0), there are
 only two subintervals on which sgn() can have different values. In
 particular,

 {{{
 sage: sgn(x^2 - 1/4)(x = -0.75)
 1

 sage: sgn(x^2 - 1/4)(x = -0.25)
 -1
 }}}

 Now, the original, actual result should be equivalent to the sum of the
 following:

 {{{
 sage: integrate(x, x, -1, -0.5)
 -0.375

 sage: integrate(-x, x, -0.5, 0)
 0.125
 }}}

 So, something went wrong during the initial integration.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11590>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to