[sage-support] Re: substitution in and integration of piecewise functions

2008-11-25 Thread Ondrej Certik
One of the issues right now is that sage's piecewise is a completely separate class then the rest of the calculus library. I think it should descend from symbolic expression and be on the same level as, e.g. sin and addition (and probably even have a pynac counterpart). Letting the operands

[sage-support] Re: substitution in and integration of piecewise functions

2008-11-25 Thread Robert Bradshaw
On Nov 24, 2008, at 5:04 AM, Ondrej Certik wrote: On Mon, Nov 24, 2008 at 1:25 PM, David Joyner [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 6:19 AM, Ondrej Certik [EMAIL PROTECTED] wrote: Hi, when I use regular expressions, I can use .subs(): sage: e = x+y sage: e.subs(x=y)

[sage-support] Re: substitution in and integration of piecewise functions

2008-11-25 Thread William Stein
On Tue, Nov 25, 2008 at 3:15 AM, Ondrej Certik [EMAIL PROTECTED] wrote: One of the issues right now is that sage's piecewise is a completely separate class then the rest of the calculus library. I think it Just for the record, this is because Piecewise was implemented long long ago by David

[sage-support] Re: substitution in and integration of piecewise functions

2008-11-25 Thread David Joyner
On Tue, Nov 25, 2008 at 3:13 PM, William Stein [EMAIL PROTECTED] wrote: On Tue, Nov 25, 2008 at 3:15 AM, Ondrej Certik [EMAIL PROTECTED] wrote: One of the issues right now is that sage's piecewise is a completely separate class then the rest of the calculus library. I think it Just for the

[sage-support] Re: substitution in and integration of piecewise functions

2008-11-25 Thread Burcin Erocal
On Tue, 25 Nov 2008 12:15:41 +0100 Ondrej Certik [EMAIL PROTECTED] wrote: One of the issues right now is that sage's piecewise is a completely separate class then the rest of the calculus library. I think it should descend from symbolic expression and be on the same level as, e.g. sin

[sage-support] Re: substitution in and integration of piecewise functions

2008-11-25 Thread Ondrej Certik
On Tue, Nov 25, 2008 at 11:00 PM, Burcin Erocal [EMAIL PROTECTED] wrote: On Tue, 25 Nov 2008 12:15:41 +0100 Ondrej Certik [EMAIL PROTECTED] wrote: One of the issues right now is that sage's piecewise is a completely separate class then the rest of the calculus library. I think it

[sage-support] Re: substitution in and integration of piecewise functions

2008-11-24 Thread Burcin Erocal
On Mon, 24 Nov 2008 12:19:55 +0100 Ondrej Certik [EMAIL PROTECTED] wrote: Hi, when I use regular expressions, I can use .subs(): sage: e = x+y sage: e.subs(x=y) 2*y but not with Piecewise: sage: var(h H x y) (h, H, x, y) sage: u = Piecewise([((0, h), x/h), ((h, H), 1)]) sage:

[sage-support] Re: substitution in and integration of piecewise functions

2008-11-24 Thread David Joyner
On Mon, Nov 24, 2008 at 6:19 AM, Ondrej Certik [EMAIL PROTECTED] wrote: Hi, when I use regular expressions, I can use .subs(): sage: e = x+y sage: e.subs(x=y) 2*y but not with Piecewise: sage: var(h H x y) (h, H, x, y) sage: u = Piecewise([((0, h), x/h), ((h, H), 1)]) I don't think

[sage-support] Re: substitution in and integration of piecewise functions

2008-11-24 Thread David Joyner
On Mon, Nov 24, 2008 at 7:25 AM, David Joyner [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 6:19 AM, Ondrej Certik [EMAIL PROTECTED] wrote: Hi, when I use regular expressions, I can use .subs(): sage: e = x+y sage: e.subs(x=y) 2*y but not with Piecewise: sage: var(h H x y) (h, H,

[sage-support] Re: substitution in and integration of piecewise functions

2008-11-24 Thread Ondrej Certik
On Mon, Nov 24, 2008 at 1:25 PM, David Joyner [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 6:19 AM, Ondrej Certik [EMAIL PROTECTED] wrote: Hi, when I use regular expressions, I can use .subs(): sage: e = x+y sage: e.subs(x=y) 2*y but not with Piecewise: sage: var(h H x y) (h, H,

[sage-support] Re: substitution in and integration of piecewise functions

2008-11-24 Thread Ondrej Certik
On Mon, Nov 24, 2008 at 2:15 PM, David Joyner [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 7:25 AM, David Joyner [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 6:19 AM, Ondrej Certik [EMAIL PROTECTED] wrote: Hi, when I use regular expressions, I can use .subs(): sage: e = x+y sage:

[sage-support] Re: substitution in and integration of piecewise functions

2008-11-24 Thread Burcin Erocal
On Mon, 24 Nov 2008 14:04:53 +0100 Ondrej Certik [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 1:25 PM, David Joyner [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 6:19 AM, Ondrej Certik [EMAIL PROTECTED] wrote: Hi, when I use regular expressions, I can use .subs(): sage:

[sage-support] Re: substitution in and integration of piecewise functions

2008-11-24 Thread Ondrej Certik
On Mon, Nov 24, 2008 at 3:08 PM, Burcin Erocal [EMAIL PROTECTED] wrote: On Mon, 24 Nov 2008 14:04:53 +0100 Ondrej Certik [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 1:25 PM, David Joyner [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 6:19 AM, Ondrej Certik [EMAIL PROTECTED]