Thank you all for looking into this. I'm happy to hear that the bug has 
been fixed in Maxima. I'm sure the fix will work it's way into Sage soon 
enough.

By the way, this sum did return "und" a few years ago, and later the answer 
changed to "ind" (before changing to -1/4). I agree that und is better than 
ind (as far as I understand the difference between these).

Aaron

On Tuesday, November 18, 2025 at 4:42:01 AM UTC-10 kcrisman wrote:

> Thanks for pointing that one out, that's great.  
>
> (Though note that apparently the "correct" answer is "und" not "ind", 
> according to the latest comment on the Sourceforge ticket!)
>
> On Tuesday, November 18, 2025 at 8:14:01 AM UTC-5 Antonio Rojas wrote:
>
>> This is fixed in maxima 5.48. The upgrade ticket is 
>> https://github.com/sagemath/sage/pull/40679
>>
>> El martes, 18 de noviembre de 2025 a las 13:59:27 UTC+1, kcrisman 
>> escribió:
>>
>>> I've opened https://sourceforge.net/p/maxima/bugs/4634/ for this, and 
>>> hopefully we'll hear back.  Can someone open a corresponding Sage ticket 
>>> which will eventually get a doctest for the same?  Thanks! 
>>>
>>> On Monday, November 17, 2025 at 10:38:54 PM UTC-5 Nils Bruin wrote:
>>>
>>>> I can confirm the behaviour you're observing ... It's really 
>>>> unfortunate!. This would be a result produced by maxima, so most likely 
>>>> it's a change due to a change in maxima version. I would call it a bug. 
>>>> One 
>>>> should probably try to reproduce it in maxima proper and then report it to 
>>>> maxima. Hopefully they can fix it.
>>>>
>>>> In maxima 5.47.0 I get:
>>>>
>>>> (%i1) load(simplify_sum)$
>>>> (%i2) simplify_sum( sum(n*(-1)^n,n,1,inf));
>>>> -1/4
>>>>
>>>> This happens both on sage's ECL based one and on the system maxima 
>>>> (running on SBCL). So I think this behaviour tracks decisively to maxima.
>>>>
>>>> On Monday, 17 November 2025 at 19:23:53 UTC-8 [email protected] wrote:
>>>>
>>>>> I have used SageMath within CoCalc for teaching Calculus 2 for several 
>>>>> years.
>>>>>
>>>>> In past semesters, the following code produced the output "ind":
>>>>>
>>>>>      var('n')
>>>>>      sum(n*(-1)^n,n,1,oo)
>>>>>
>>>>> This is expected, since the series diverges.
>>>>>
>>>>> However, this semester I changed the kernel from SageMath 10.4 to the 
>>>>> current SageMath 10.7. Now this same code produces the output "-1/4" [I 
>>>>> believe 10.5 and 10.6 behave the same way as 10.7.]
>>>>>
>>>>> I have my students compute the value of several similar series 
>>>>> (replacing the -1 in the code above with -2, -1/2, 1/2, 1, and 2), and 
>>>>> all 
>>>>> the others are behaving the same way they always have. It is only this 
>>>>> series which is giving me an unexpected output.
>>>>>
>>>>> Has anyone else encountered this issue?
>>>>>
>>>>> Thanks,
>>>>> Aaron
>>>>>
>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/sage-support/ddaccaae-f2f1-458f-ae22-57640f16feb8n%40googlegroups.com.

Reply via email to