On Sat, Dec 6, 2008 at 12:37 PM, David Joyner <[EMAIL PROTECTED]> wrote:

>
> 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:
>

Actually, a function F which is simply the antiderivative of f is no use to
me, I need a function with the property that F(b) - F(a) is the Riemann sum
between a and b. (They are only guaranteed by the FTC to be the same
function if f is continuous.) Maybe there is a better term for this?

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

I think you and I are defining antiderivative differently. I'm using the
definition that F is an antiderivative of f if F'(x) = f(x) for all x in the
domain of f(x). (Also stated here:
http://planetmath.org/encyclopedia/Antiderivative.html .)

Either way, the property F'(x) = f(x) is not necessarily true for piecewise
antiderivatives defined that way. Consider this function.

f(x) = x, 0 <= x <= 1
f(x) = 1, 1 < x

If we use the definition you gave to find F = integral(f), F'(1) is
undefined so it is not true that F'(x) == f(x) for all x.

Instead, we use the definition that F=

integrate(f1, t, a1, x), a1 < x <= a2
integrate(f2, t, a2, x) + integrate(f1, t, a1, a2), a2 < x <= a3
integrate(f3, t, a3, x) + integrate(f2, t, a2, a3) + integrate(f1, t, a1,
a2), a3 < x <= a4
...
integrate(fn, t, an, x) + integrate(f[n-1], t, a[n-1], an) + ... +
integrate(f1, t, a1, a2), an < x

(We also need a special case for when a1 = -infinity, which I didn't show.)

With this definition, F(b) - F(a) can be used to find the Riemann sum
between a and b. Also, F'(x) = f(x) seems to hold, except at points where
f(x) goes from defined to undefined or vice-versa.

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.


I agree that it doesn't make sense where C1 .. Cn are arbitrary constants.

-- 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to