Skip to content

Get integral of abs(sin(x)) and abs(cos(x)) right #17511

Open
@kcrisman

Description

@kcrisman

See this comment, discussion in #13364, the supposed fix at https://sourceforge.net/p/maxima/bugs/2520/, this ask.sagemath question, and so forth.

E.g. this is annoying (but apparently right)

(%i1) load(abs_integrate);
(%i3) display2d:false;

(%o3) false
(%i4) integrate(abs(sin(x)),x);

(%o4) 4*(abs(sin(x))*(atan(sin(x)/(cos(x)+1))/2
                     +sin(x)/((cos(x)+1)*(2*sin(x)^2/(cos(x)+1)^2+2)))
        /abs(cos(x)+1)
        -(signum(1/(cos(x)+1))*signum(sin(x))*log(2*sin(x)^2/(cos(x)+1)^2+2)
         -signum(1/(cos(x)+1))*signum(sin(x))*log(sin(x)^2/(cos(x)+1)^2+1)
         +signum(1/(cos(x)+1))*signum(sin(x))
                              *(2*sin(x)*atan(sin(x)/(cos(x)+1))/(cos(x)+1)
                               -log(2)))
         /4)

but it doesn't do the definite integral at all, even the easy ones where abs does nothing on the interval!

Upstream: Reported upstream. Developers acknowledge bug.

CC: @slel

Component: calculus

Keywords: abs_integrate

Stopgaps: #12731

Author: Frédéric Chapoton

Reviewer: Vincent Delecroix

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions