On Sat, Dec 6, 2008 at 11:39 AM, Paul Butler <[EMAIL PROTECTED]> wrote: > > Currently, taking the integral of a piecewise function in Sage gives > you the definite integral. I've proposed on trac that the integral of > piecewise functions be indefinite by default. This would be consistent > with how integration works on other functions in Sage, as well as > piecewise functions in Maple and Mathematica. > > The main concern is whether the integral of a piecewise function is > even well-defined. It seems to me that at least for continuous > piecewise functions, the indefinite integral is well-defined. The > anti-derivative is well defined, and by the fundamental theorem of > calculus, the indefinite integral of a continuous function is the > anti-derivative. As for discontinuous piecewise functions, I'm finding > it difficult to convince myself either way.
First, the indefinite integral is the anti-derivative, by definition. What the FTC says is that although the indefinite integral "evalated at b" is not well-defined, and the same antiderivative "evalated at a" is also not well-defined, their difference *is* well-defined. Moreover, this difference agrees with the definite integral defined by the Riemann sum between a and b. Second, I think (but I am not sure), what you want when you say indefinite intergal is not the indefinite integral but is a function who derivavtive is the original function, defined as follows: if the orginial function f(x) is f1(x), a1<x<=a2, f2(x), a2<x<=a3, ... fn(x), an<x<=a{n+1} (and 0 outside (a1,a{n+1}) then I guess you want to define the integral, call it F, by int_{a1}^x f1(t) dt, a1<x<=a2, int_{a2}^x f2(t) dt, a2<x<=a3, ... int_{an}^x fn(t) dt, an<x<=a{n+1} Is this correct? This is not the antiderivative but it does have the property that F'(x)=f(x). The antiderivative is only well-defined up to an additive constant. IMHO, the piecewise defined function of antiderivavtives int f1(x) dx +C1 , a1<x<=a2, int f2(x) dx +C2, a2<x<=a3, ... int fn(x) dx +Cn, an<x<=a{n+1} does not make sense. > > The trac ticket is 4721 ( http://trac.sagemath.org/sage_trac/ticket/4721 ) > > -- Paul > > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---