Opened 5 years ago
Last modified 7 months ago
#17183 new defect
Yet another abs_integrate trig integral problem
Reported by: | kcrisman | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | calculus | Keywords: | abs_integrate |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | Reported upstream. Developers acknowledge bug. | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: | #12731 |
Description (last modified by )
See this ask.sagemath question. Original report is
sage: F = sqrt((cos(x) - 1)^2 + sin(x)^2) sage: F.integrate(x, 0, 2*pi) 0
but the answer should be 8.
EDIT: related
sage: F.integrate(x, 0, pi) 4 sage: F.integrate(x, pi, 2*pi) -4
and the primitive is wrong:
sage: F.integrate(x) -4/sqrt(sin(x)^2/(cos(x) + 1)^2 + 1)
Change History (13)
comment:1 Changed 5 years ago by
- Report Upstream changed from Not yet reported upstream; Will do shortly. to Reported upstream. No feedback yet.
comment:2 Changed 5 years ago by
- Description modified (diff)
- Report Upstream changed from Reported upstream. No feedback yet. to Reported upstream. Developers acknowledge bug.
comment:3 Changed 5 years ago by
See also #12731.
comment:4 Changed 5 years ago by
- Stopgaps set to todo
comment:5 Changed 5 years ago by
I suppose, this ticket needs a stopgap?
comment:6 Changed 5 years ago by
Maybe all the abs_integrate
ones do - see #12731. But I don't think it's appropriate to just raise a warning EVERY TIME someone integrates. So there would have to be some way to limit its applicability. I think that is why I never worked on stopgaps; the stuff I was working on doesn't lend itself to easily pointing that out, other than having Sage itself start with a disclaimer "warning: computer math sometimes has errors".
comment:7 Changed 5 years ago by
Sage itself start with a disclaimer "warning: computer math sometimes has errors"
+1
which in additional links to Mathematically Wrong Answers: http://trac.sagemath.org/query?status=new&status=needs_work&status=needs_review&status=needs_info&type=defect&stopgaps=!&max=0&order=id
I would support that (to warn the greenhorns), or will that have too much opposition?
but I don't think it's appropriate to just raise a warning EVERY TIME someone integrates.
Agree, so what about showing a stopgap warning only once per user+computer+sageVersion or similar? ( otherwise the user has explicitly request regular stopgap warnings)
comment:8 Changed 5 years ago by
These are questions above my pay grade, as I did not institute the stopgap system. Again, if there is a way to invoke this when abs_integrate
is used, that would be fine - we already have a way to only selectively load packages, but once loaded, I'm not sure we can "unload" it. But continue that discussion at #12731.
comment:9 Changed 5 years ago by
- Stopgaps changed from todo to #12731
comment:10 Changed 7 months ago by
- Keywords abs_integrate added
comment:11 Changed 7 months ago by
- Description modified (diff)
comment:12 Changed 7 months ago by
- Description modified (diff)
comment:13 Changed 7 months ago by
Possibly related:
sage: integrate(sqrt(1/(2-cos(x))), (x, 0, pi)) 0
According to Mathematica, the correct result should be 2*elliptic_kc(-2)
.
Upstream https://sourceforge.net/p/maxima/bugs/2823/