Ticket #11590 (new defect)
Integrating the sgn() function can produce incorrect results
|Reported by:||mjo||Owned by:||burcin|
|Report Upstream:||Reported upstream. Developers acknowledge bug.||Reviewers:|
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.
- Report Upstream changed from N/A to Reported upstream. Little or no feedback.
- Report Upstream changed from Reported upstream. Little or no feedback. to Reported upstream. Developers acknowledge bug.