#11990: infinite sums that are infinite produce errors
---------------------------------------------------+------------------------
       Reporter:  dkrenn                           |         Owner:  burcin     
  
           Type:  defect                           |        Status:  
needs_review 
       Priority:  major                            |     Milestone:  sage-5.4   
  
      Component:  calculus                         |    Resolution:             
  
       Keywords:  infinite sums, infinite, maxima  |   Work issues:             
  
Report Upstream:  N/A                              |     Reviewers:  Burcin 
Erocal
        Authors:                                   |     Merged in:             
  
   Dependencies:                                   |      Stopgaps:             
  
---------------------------------------------------+------------------------
Changes (by burcin):

  * status:  new => needs_review
  * reviewer:  => Burcin Erocal


Comment:

 Replying to [comment:6 kcrisman]:

 > > The reason I open the ticket is, that all sums above have the same
 behavior, but the output is always different, which should not be.
 > Well, `maxima.sum` is not really applicable, because that is a Maxima
 element.  That's sort of like complaining that mpmath returns `mpf`
 numbers - you aren't asking for a Sage element.  So it still sort of
 reverts to the big question.

 Exactly. The behavior of the `sum()` function in Sage is consistent.
 `maxima.sum()` is just a wrapper to call Maxima. That is also consistent
 with Maxima behavior.

 The expression `sum(m, m, 0, oo)` is divergent if `m != 0` and `0` if
 `m=0`. So the best we can do without the assumption Maxima is asking for
 is to leave it unevaluated.

 On the question of shall we raise an error or return `oo`: Leaving aside
 the problem that it is usually not that easy to decide which type of
 infinity to return, I would like to get an error as soon as a divergent
 sum is encountered. If this expression was part of a larger one, and we
 decide that its divergent after a substitution, there isn't much point in
 carrying on evaluating the expression.

 In Sage there is one exception to this rule, we return different types of
 infinity from special functions if you hit a pole. For example `gamma(-1)
 -> Infinity`. This is compatible with MMA, although it contradicts Maple
 or GiNaC. This allows us to do `(1/gamma(n)).subs(n=-1) -> 0` instead of
 raising an error. Compared to what goes on when evaluating `sum()`,
 `gamma()` is a fundamental operation. This convenience to avoid special
 casing potential poles of `gamma()` is well worth the bug hunting after a
 complex expression ends up evaluating to `oo`.


 Since we already have a ticket about handling interactive prompts from
 Maxima, I suggest we close this ticket.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11990#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
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