Opened 4 years ago

Closed 20 months ago

#23271 closed defect (duplicate)

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

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

Status badges

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)

(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 (6)

comment:1 Changed 4 years ago by pdenapo

  • Description modified (diff)

comment:2 follow-up: Changed 4 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')

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 4 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 2 years ago by chapoton

  • Keywords abs_integrate added

comment:5 Changed 22 months ago by chapoton

fixed by #27958, that needs review

comment:6 Changed 20 months ago by chapoton

  • Milestone changed from sage-8.0 to sage-duplicate/invalid/wontfix
  • Resolution set to duplicate
  • Status changed from new to closed

already doctested in #27958

Note: See TracTickets for help on using tickets.