Open kcrisman opened 9 years ago
Changed upstream from Not yet reported upstream; Will do shortly. to Reported upstream. No feedback yet.
Description changed:
---
+++
@@ -1,6 +1,8 @@
See [this ask.sagemath question](http://ask.sagemath.org/question/24532/). Original report is
-F = sqrt((cos(x) - 1)^2 + sin(x)^2) -F.integrate(x, 0, 2pi) +sage: F = sqrt((cos(x) - 1)^2 + sin(x)^2) +sage: F.integrate(x, 0, 2pi) +0
+but the answer should be 8.
Changed upstream from Reported upstream. No feedback yet. to Reported upstream. Developers acknowledge bug.
See also #12731.
Stopgaps: todo
I suppose, this ticket needs a stopgap?
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".
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)
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.
Changed stopgaps from todo to #12731
Changed keywords from none to abs_integrate
Description changed:
---
+++
@@ -6,3 +6,12 @@
0
but the answer should be 8.
+
+EDIT: related
+
+ +sage: F.integrate(x, 0, pi) +4 +sage: F.integrate(x, pi, 2*pi) +-4 +
Description changed:
---
+++
@@ -15,3 +15,9 @@
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) +
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)
.
See also https://groups.google.com/g/sage-devel/c/h50LZVLVQI4.
The issue with the primitive of F may come from our choice of "domain: complex" in maxima.
Using maxima("domain : real;")
gives another answer, that could be better.
EDIT: this seems to give in fact the same wrong primitive.
fricas and giac also gives other wrong primitives, not even continuous ? Sigh :(
Changed upstream from Reported upstream. Developers acknowledge bug. to Fixed upstream, but not in a stable release.
See this ask.sagemath question. Original report is
but the answer should be 8.
EDIT: related
and the primitive is wrong:
Upstream: Fixed upstream, but not in a stable release.
Component: calculus
Keywords: abs_integrate
Stopgaps: #12731
Issue created by migration from https://trac.sagemath.org/ticket/17183