Opened 10 years ago
Closed 9 years ago
#11594 closed defect (duplicate)
Symbolic integration of abs() failure
Reported by: | mjo | Owned by: | burcin |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | calculus | Keywords: | integrate |
Cc: | Merged in: | ||
Authors: | Reviewers: | Karl-Dieter Crisman, Michael Orlitzky | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #11483 | Stopgaps: |
Description
Originally posted to the mailing list by Pedro Cruz (I hope no one minds me collecting these?):
http://groups.google.com/group/sage-support/browse_thread/thread/4a24ce95e940820e
Actual result:
sage: integrate(abs(x^2 - 1), x, -2, 2) integrate(abs(x^2 - 1), x, -2, 2)
Expected result:
sage: integrate(x^2 - 1, x, -2, -1) + integrate(1 - x^2, x, -1, 1) + integrate(x^2 - 1, x, 1, 2) 4
If it's helpful, we can change the limits of integration to avoid the roots. This seems to appease the integrate function:
sage: integrate(x^2, x, -1, 1) 2/3
Change History (9)
comment:1 in reply to: ↑ description Changed 10 years ago by
- Keywords integrate added
comment:2 Changed 10 years ago by
See #11483 for where that issue is currently standing.
I think that the OP meant the following (Maxima) in the last line:
(%i2) integrate(abs(x^2-1),x,-1,1); 4 (%o2) - 3
This would indeed be fixed by the abs_integrate
package.
(%i3) load(abs_integrate); STYLE-WARNING: redefining SIMP-ISREAL-P in DEFUN (%o3) /Users/.../maxima-5.24.0/share/contrib/integrat\ ion/abs_integrate.mac (%i4) integrate(abs(x^2-1),x,-2,2); (%o4) 4
comment:3 Changed 9 years ago by
- Dependencies set to #11483
comment:4 Changed 9 years ago by
- Milestone set to sage-duplicate/invalid/wontfix
- Reviewers set to Karl-Dieter Crisman
- Status changed from new to needs_review
This is in fact fixed and documented in #11483, so I guess this ticket can be closed? Since it's actually done, not really invalid per se, I will put an author as well as reviewer, but if the release manager or someone else disagrees with this analysis they can change those fields.
comment:5 Changed 9 years ago by
- Status changed from needs_review to positive_review
comment:6 Changed 9 years ago by
There's a doctest for this in #11638. I was thinking I'd move it to the proper place (in one of the Maxima files) either tomorrow or the next day.
It doesn't matter to me on which ticket I do it, though.
comment:7 Changed 9 years ago by
Well, I already gave #11483 nearly positive review... I mean, there are now two different tests for this.
comment:8 Changed 9 years ago by
Oh, ok. I forgot there was a test in #11483 (I'm fixing it now). This can safely be closed.
comment:9 Changed 9 years ago by
- Resolution set to duplicate
- Reviewers changed from Karl-Dieter Crisman to Karl-Dieter Crisman, Michael Orlitzky
- Status changed from positive_review to closed
Replying to mjo:
Not at all. I appreciate any effort in this direction. Please make sure that these are not duplicates of already existing tickets though. We started making a list of symbolics tickets on this page. It should make it easier to check the new tickets (also #11591 and #11590) against existing ones.
I am at a conference right now and don't have much time for this.
Note that the patch attached to #8624 loads the
abs_integrate
package in maxima which might help with some of these issues involvingabs()
. Unfortunately that patch won't apply any more, since the maxima interface changed quite a bit during the switch to use libECL.