#11990: infinite sums that are infinite produce errors
------------------------+---------------------------------------------------
Reporter: dkrenn | Owner: burcin
Type: defect | Status: new
Priority: major | Milestone: sage-4.8
Component: calculus | Keywords: infinite sums, infinite, maxima
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
------------------------+---------------------------------------------------
Old description:
> Look at the following code:
> {{{
> sage: m = var('m')
> sage: sum(m, m, 0, oo)
> Traceback (most recent call last):
> ...
> ValueError: Computation failed since Maxima requested additional
> constraints; using the 'assume' command before summation *may* help
> (example of legal syntax is 'assume(m>0)', see `assume?` for more
> details)
> Is m positive or zero?
> }}}
> But inside the sum, it should be clear what `m` is. Using one of or both
> of the commands
> {{{
> sage: assume(m>=0)
> sage: assume(m, 'integer')
> }}}
> does not change the result. Execution of
> {{{
> sage: maxima.sum(m, m, 0, oo)
> }}}
> results in the same (except that a `TypeError` is thrown).
New description:
Look at the following code:
{{{
sage: m = var('m')
sage: sum(m, m, 0, oo)
Traceback (most recent call last):
...
ValueError: Computation failed since Maxima requested additional
constraints; using the 'assume' command before summation *may* help
(example of legal syntax is 'assume(m>0)', see `assume?` for more
details)
Is m positive or zero?
}}}
But inside the sum, it should be clear what `m` is. Using one of or both
of the commands
{{{
sage: assume(m>=0)
sage: assume(m, 'integer')
}}}
does not change the result. Execution of
{{{
sage: maxima.sum(m, m, 0, oo)
}}}
results in the same (except that a `TypeError` is thrown).
A different behaviour brings the following example
{{{
sage: m = var('m')
sage: sum(2^m, m, 0, oo)
Traceback (most recent call last):
...
ValueError: Sum is divergent.
}}}
Whereas
{{{
sage: maxima.sum(2^m, m, 0, oo)
inf
}}}
--
Comment(by kcrisman):
Upon further reflection, what are we seeking for in the second example
(which has absolutely nothing to do with #11987, since it really does
diverge, my apologies!)? I think that Sage just agrees to raise errors
for divergent integrals and sums, not infinity, so the behavior is correct
from that point of view.
Otherwise this is another example of #3732, unfortunately.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11990#comment:2>
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.