Opened 2 years ago

Last modified 5 hours ago

#23271 new defect

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

Reported by: pdenapo Owned by:
Priority: major Milestone: sage-8.0
Component: symbolics Keywords: symbolic integration, absolute value, abs_integrate
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by pdenapo)

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'

Change History (5)

comment:1 Changed 2 years ago by pdenapo

  • Description modified (diff)

comment:2 follow-up: Changed 2 years ago by mforets

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).

comment:3 in reply to: ↑ 2 Changed 2 years ago by rws

  • Summary changed from Wrong intergation of abs(sin(x)*cos(x)) to Wrong integration of abs(sin(x)*cos(x))

Replying to mforets:

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

Don't think so.

comment:4 Changed 4 weeks ago by chapoton

  • Keywords abs_integrate added

comment:5 Changed 5 hours ago by chapoton

fixed by #27958, that needs review

Note: See TracTickets for help on using tickets.