I see what you want now. If you can make this work (ie, satisfy the FTC), then it does make sense to use your code as the default.
Thanks for explaining your construction and for working on the code! On Sat, Dec 6, 2008 at 5:06 PM, Paul Butler <[EMAIL PROTECTED]> wrote: > When a1 = -infinity, I would make F1 = integrate(f, x, a2, x) instead of > integrate(f, x, a1, x). Then I would not calculate the definite integral of > the first interval, which would align my constants so that F(a2) = 0. When I > get a chance, I'll add this to my code. > > Functions like floor with an infinite number of pieces are beyond the scope > of the Piecewise class, because piecewise functions in Sage can only (at the > moment) have finitely many pieces. I can't give an algorithm for integration > of all piecewise functions with multiple pieces off the top of my head, but > I'll give it some thought. > > -- Paul > > On Sat, Dec 6, 2008 at 4:13 PM, David Joyner <[EMAIL PROTECTED]> wrote: >> >> Okay, this helps me understand what you mean. >> >> Still, the case a1=-ifinty is precisely the special case which I don't >> understand. >> >> For example, take a function such as f(x) = max(1,floor(x)), x real. >> How do you define an antiderivative F(x) so that >> F(b)-F(a) = area under the y=f(x) for a<x<b? >> (And mayeb you can do it for that special function, >> and let us ignore points of discontinuity for the sake of >> discussion.) In other words, I am asking for the algorithmic procedure >> you would use to create an "area function" of a piecewise-defined >> function on the reals. >> >> >> > >> > 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 -~----------~----~----~----~------~----~------~--~---