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

Wrong integration of abs(sin(x)*cos(x)) #23271

Closed
pdenapo mannequin opened this issue Jun 18, 2017 · 6 comments
Closed

Wrong integration of abs(sin(x)*cos(x)) #23271

pdenapo mannequin opened this issue Jun 18, 2017 · 6 comments

Comments

@pdenapo
Copy link
Mannequin

pdenapo mannequin commented Jun 18, 2017

Sage ignores the absolute value in the following symbolic integration.

sage: g=abs(sin(x)*cos(x))
sage: g.integrate(0,2*pi)
0

(the right result is 2, the integrand is positive in the interval so the
integral can never be 0!

sage: version()
'SageMath version 7.6, Release Date: 2017-03-25'

Component: symbolics

Keywords: symbolic integration, absolute value, abs_integrate

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

@pdenapo pdenapo mannequin added this to the sage-8.0 milestone Jun 18, 2017
@pdenapo pdenapo mannequin added c: symbolics labels Jun 18, 2017
@pdenapo

This comment has been minimized.

@mforets
Copy link
Mannequin

mforets mannequin commented Jun 20, 2017

comment:2

from v.8.0 those abs-integrands can be handled with the Giac interface:

sage: g.integrate(0,2*pi, algorithm='giac')
2

besides, there are several related tickets in the symbolic wiki -- integration. there is a link to one Maxima's upstream report in #17511 (should we submit a new upstream report for this one? since they seem to be so related).

@rwst
Copy link

rwst commented Jul 1, 2017

comment:3

Replying to @mforets:

(should we submit a new upstream report for this one? since they seem to be so related).

Don't think so.

@rwst rwst changed the title Wrong intergation of abs(sin(x)*cos(x)) Wrong integration of abs(sin(x)*cos(x)) Jul 1, 2017
@fchapoton
Copy link
Contributor

Changed keywords from symbolic integration, absolute value to symbolic integration, absolute value, abs_integrate

@fchapoton
Copy link
Contributor

comment:5

fixed by #27958, that needs review

@fchapoton
Copy link
Contributor

comment:6

already doctested in #27958

@fchapoton fchapoton removed this from the sage-8.0 milestone Aug 24, 2019
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

2 participants