On Tue, Aug 18, 2009 at 2:03 PM, William Stein<[email protected]> wrote:
>
> On Tue, Aug 18, 2009 at 11:00 AM, Nick Alexander<[email protected]> wrote:
>>
>>>> (2) integrate( f(x), (x,a,b) )
>>>> (3) integrate( f(x), x, a, b)
>>
>> Let's just choose one. I'm torn, but prefer (3) with a and b optional
>> variables.
>>
>> Nick
>>
>
> Hmm. If I had to choose one of these:
>
>> (1) integrate( f(x), x)
>> (2) integrate( f(x), (x,a,b) )
>> (3) integrate( f(x), x, a, b)
>
> I would choose only (2) or (1) and get rid of (3)! Why? Simply
> because that is far more consistent with plotting (which in turn was
> meant to be consistent with Mathematica). I suspect 3 is more like
> Maple.
>
> So I prefer (1) and (2).
>
Actually both Maple and Axiom use something called a SegmentBinding. E.g.
(1) -> x=a..b
(1) x= a..b
Type: SegmentBinding(Symbol)
In Axiom the operator .. is sugar for ' segment(a,b)' that returns
something of type 'Segment' and in this case '=' constructs a
'SegmentBinding' from a 'Symbol' and a 'Segment'. The 'segment'
operator is rather like 'range' in Python except it can form symbolic
expressions. A 'SegmentBinding' is rather like '(x,a,b)' except not
quite so raw.
So normally one would write for example:
(2) -> integrate(sin(x),x=a..b)
(2) - cos(b) + cos(a)
Type: Union(f1: OrderedCompletion(Expression(Integer)),...)
Why doesn't Sage support something like this?
Regards,
Bill Page.
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---