On Aug 25, 2009, at 5:44 PM, kcrisman wrote:

>
> I know I'm losing this one, but for what it's worth, I think that not
> only should (1), (2), and (3) be supported, but that integrate(f)
> should do what is obvious where the variable is unambiguous.  :)
>

sage: var('x,y')
(x, y)
sage: f = -x-y
sage: integrate(f)
-1/2*x^2 - x*y
sage: integrate(f+x)  # unambiguous?
-1/2*y^2
sage: integrate(f+y)  # unambiguous?
-1/2*x^2
sage: integrate(f) + integrate(x)
-x*y
sage: integrate(f) + integrate(y)
-1/2*x^2 - x*y + 1/2*y^2

>
>>
>>> While (1) and (2) syntaxes are encouraged, (3) will
>>> remain valid until we sort out the coersion issue
>>> and update all doctests, tutorial etc. BTW, I did update
>>> some of the doctests including the docstrings that you get
>>> via "integrate?"
>>
>> Sounds like we should throw a deprecation warning on it.
>>
>
> Yes, this would definitely require it.  There should conceivably be a
> check for whether there are x, a, and b, and if a and b are both
> numeric types, allowing (3) indefinitely in that case (as opposed to
> integrate(f,x,a,b) where a and b are symbolic endpoints).

I'm -1 to having a different meaning based on whether or not  
something is "numeric." For example,

integrate(f, x, a, b).subs(a=1, b=2) != integrate(f, x, 1, 2)

bothers me.

> On the plus side, FJ is correct that it is impossible to have multiple
> integration in an unambiguous way without removing (3) eventually (so
> as to allow integrate(f,x,y,x) and the like).  My preference would be
> to require instead integrate(f,(x,),(y,),(x,)) or integrate(f,[x],[y],
> [z]), but I think that those would not prove popular.

Yes, I think we should support this as well, at least the tuple version.

- Robert


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to