Opened 9 years ago
Closed 8 years ago
#11445 closed defect (fixed)
symbolic integration fails on a very simple test case
Reported by: | pdehaye | Owned by: | burcin |
---|---|---|---|
Priority: | major | Milestone: | sage-5.0 |
Component: | calculus | Keywords: | integrate |
Cc: | kcrisman | Merged in: | sage-5.0.beta11 |
Authors: | Michael Orlitzky | Reviewers: | Karl-Dieter Crisman |
Report Upstream: | Fixed upstream, in a later stable release. | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
The following happens
sage: var("x") x sage: integrate(abs(x - 1) + abs(x + 1) - 2*abs(x), (x,-Infinity,Infinity)) 0 sage: integrate(abs(x - 1) + abs(x + 1) - 2*abs(x),(x,-Infinity,10)) 2
The second answer is the correct one, of course...
Attachments (1)
Change History (12)
comment:1 Changed 9 years ago by
- Cc kcrisman added
- Report Upstream changed from N/A to Not yet reported upstream; Will do shortly.
comment:2 Changed 9 years ago by
sure, but certainly something i would hope works! also not sure how much of it is due to the infinite interval and how much due to the function itself
comment:3 Changed 9 years ago by
- Report Upstream changed from Not yet reported upstream; Will do shortly. to Reported upstream. Little or no feedback.
This is now reported at this location.
comment:4 Changed 9 years ago by
fixed over there
comment:5 Changed 9 years ago by
- Report Upstream changed from Reported upstream. Little or no feedback. to Fixed upstream, in a later stable release.
comment:6 Changed 9 years ago by
- Priority changed from critical to major
comment:7 Changed 8 years ago by
- Status changed from new to needs_review
Fixed now that we've got Maxima 5.26.0. Here's a doctest.
comment:8 Changed 8 years ago by
- Reviewers set to Karl-Dieter Crisman
- Status changed from needs_review to positive_review
I probably would have put it in sage.symbolic.integration.integral.integral
somewhere, where there are lots of tests, but I guess this is fine, and otherwise all is well. I'd hate to have you rebase it to that other location, seems a waste... but then again, that's where they are...
Or what do you think? The problem is that we have no canonical location for integral stuff. integrate?
is a wasteland, though it points to better sources of doc.
comment:9 Changed 8 years ago by
I honestly went through the same thought process. At first, I thought, "I'll put it with the Maxima stuff because it was a Maxima bug." But then I thought, what if we ever drop Maxima completely? This isn't a Maxima test: this tests that our integration works. Whatever we would replace Maxima with should also pass this test!
Then, I had to decide whether to put it in functional.py or under symbolics. I settled on this because it's what gets called first when the user calls integrate()
. It's also where you're sent if you look up the code with integrate?
or integrate??
, so to stay true to the report on the ticket, I put it there.
If the reporter had done,
f = abs(x - 1) + abs(x + 1) - 2*abs(x) f.integral(...)
I probably would have stuck it in symbolics. It's no big deal to move it, in any case.
comment:10 Changed 8 years ago by
Well, you'll notice that I did give positive review. You are right about the integration tests not belonging in the Maxima docs, of course.
comment:11 Changed 8 years ago by
- Merged in set to sage-5.0.beta11
- Resolution set to fixed
- Status changed from positive_review to closed
This also happens in Maxima.
I don't know that I would call this "very simple", though, as integrating absolute value things is somewhat tricky when done symbolically.