Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration involving abs gives wrong result #10914

Closed
sagetrac-poeschko mannequin opened this issue Mar 11, 2011 · 14 comments
Closed

Integration involving abs gives wrong result #10914

sagetrac-poeschko mannequin opened this issue Mar 11, 2011 · 14 comments

Comments

@sagetrac-poeschko
Copy link
Mannequin

sagetrac-poeschko mannequin commented Mar 11, 2011

Running

sage: integrate(abs(sin(x)),(x,0,2*pi))

gives 0, but the correct result is 4.

This happens in version 4.6.1 . In 4.5.3, the integral was not evaluated at all.

Apply attachment: trac_10914.patch.

Upstream: Fixed upstream, in a later stable release.

Component: calculus

Author: Michael Orlitzky

Reviewer: Karl-Dieter Crisman

Merged: sage-5.0.beta14

Issue created by migration from https://trac.sagemath.org/ticket/10914

@kcrisman
Copy link
Member

Upstream: Reported upstream. Little or no feedback.

@kcrisman
Copy link
Member

comment:1

Certainly the integral better be positive!

This is wrong in Maxima (5.23.2), though it does get the one arch problem correct:

Maxima 5.23.2 http://maxima.sourceforge.net
using Lisp SBCL 1.0.24
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) integrate(abs(sin(x)),x,0,2*%pi);
(%o1)                                  0
(%i2) integrate(sin(x),x,0,%pi/2);
(%o2)                                  1
(%i3) 

This is now Maxima bug 3211915.

@kcrisman
Copy link
Member

comment:2

Apparently that was a dup - see this bug report instead. Fixed, so when we upgrade we'll need a doctest.

@kcrisman
Copy link
Member

Changed upstream from Reported upstream. Little or no feedback. to Fixed upstream, but not in a stable release.

@orlitzky
Copy link
Contributor

comment:3

Well, we don't get 4, but at least the bug is fixed with our current Maxima.

@orlitzky
Copy link
Contributor

Author: Michael Orlitzky

@orlitzky
Copy link
Contributor

Changed upstream from Fixed upstream, but not in a stable release. to Fixed upstream, in a later stable release.

@kcrisman
Copy link
Member

comment:4

shouln't?

Anyway, this is fine, but the style is a little too informal - those not having read the ticket will be mystified, and shouldn't have to go to the ticket to find out. So I'm uploading the same patch but with slightly different wording.

Notwithstanding that this file doesn't appear to be in the reference manual in any case.

@kcrisman
Copy link
Member

Reviewer: Karl-Dieter Crisman

@kcrisman
Copy link
Member

Attachment: trac_10914.patch.gz

Apply this patch only

@kcrisman

This comment has been minimized.

@kcrisman
Copy link
Member

comment:5

Apply attachment: trac_10914.patch.

@orlitzky
Copy link
Contributor

comment:6

Ah, sorry. I actually parse it now as, "We won't get (an evaluated answer here, which is better than the previous (wrong) answer of zero)," but I don't think it matters much since most of them don't make sense out-of-context, "make sure #xyz is fixed."

@jdemeyer jdemeyer added this to the sage-5.0 milestone Apr 19, 2012
@jdemeyer
Copy link

Merged: sage-5.0.beta14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants