#2697: [with patch, negative review] allow integration without explicit variable
declaration
-------------------------+--------------------------------------------------
 Reporter:  was          |        Owner:  was       
     Type:  enhancement  |       Status:  new       
 Priority:  major        |    Milestone:  sage-3.2.1
Component:  calculus     |   Resolution:            
 Keywords:               |  
-------------------------+--------------------------------------------------
Changes (by robertwb):

  * summary:  [with patch, needs review] allow integration without explicit
              variable declaration => [with patch, negative
              review] allow integration without explicit
              variable declaration

Comment:

 I'm getting

 {{{
 sage: integrate(sin(x), pi, 2*pi)
 ------------------------------------------------------------
 Traceback (most recent call last):
   File "<ipython console>", line 1, in <module>
   File "/Users/robert/sage/sage-3.1.3/local/lib/python2.5/site-
 packages/sage/calculus/functional.py", line 254, in integral
     return f.integral(*args, **kwds)
   File "/Users/robert/sage/current/local/lib/python2.5/site-
 packages/sage/calculus/calculus.py", line 2586, in integral
     raise TypeError, 'only one endpoint given'
 TypeError: only one endpoint given
 }}}

 Rather than catching the error that, say, 0 is not a valid variable name,
 perhaps one should look at the number of variables passed to determine how
 to integrate. E.g.

 {{{
 sage: integrate(sin(x))               # 0 args, implicit indefinite
 cos(x)
 sage: integrate(sin(x), y)            # 1 arg, explicit indefinite
 sin(x)*y
 sage: integrate(sin(x), pi, 2*pi)     # 2 args, implicit definite
 -2
 sage: integrate(sin(x), y, pi, 2*pi)  # 3 args, explicit definite
 pi*sin(x)
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/2697#comment:3>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to