-
-
Notifications
You must be signed in to change notification settings - Fork 654
Closed
Description
It would be nice to be able to do indefinite integration of piecewise functions in Sage.
I've created a patch which does this. I have made the default behavior of the integral() function of a piecewise function be to return the indefinite integral, and the definite integral is returned only when definite=True is supplied.
sage: pw = Piecewise([[(0,1), x*2], [(1,2), x + 3]])
sage: pw.integral()
Piecewise defined function with 2 parts, [[(0, 1), x^2], [(1, 2), (x^2 + 6*x)/2 - 5/2]]
sage: pw.integral(definite=True)
11/2
CC: @mwhansen
Component: calculus
Issue created by migration from https://trac.sagemath.org/ticket/4721