After contacting the Maxima team it turns out that Maxima indeed can
evaluate the inifinite sum (at least a numerical value but not a closed
form which probably does not exist)
Sage:
k=var('k'); sum(log(1-2^-k),k,1,20) results in an error message ending with
"Sum is divergent".
Maxima:
load ("levin");
bflevin_u_sum (log (1 - 1/2^k), k, 1);
This gives the numerical value - 1.2420620948
Emmanuel Charpentier schrieb am Donnerstag, 12. Dezember 2024 um 09:13:26
UTC+1:
> A bit of exploration in the respective interpreters show that neither
> Maxima, Sage, Giac, Fricas, Sympy nor Mathematica can give an expression
> for this sum. Wolfram Alpha gives the numerical answer the OP reported, but
> I have been unable to get any explanation about the process used ; graphics
> appended to Wolfra Alpha's answer suggest that this numerical estimate is
> the numerical value of the sum for a "sufficiently large" value of k, with
> no indication about the choice of this "sufficiently large"...
>
> As suggested by Nils Bruin, further work on numerical computation of sums
> is granted...
>
> HTH,
>
> Le mardi 10 décembre 2024 à 17:34:40 UTC+1, Nils Bruin a écrit :
>
>> Investigating the error shows that sympy didn't do anything with this sum:
>>
>> 671 try:
>> --> 672 return result._sage_()
>> 673 except AttributeError:
>> 674 raise AttributeError("Unable to convert SymPy result
>> (={}) into"
>>
>> ipdb> p result
>> Sum(log(1 - 1/2**k), (k, 1, oo))
>>
>> so while solving the "NotImplemented" error would be nice, it wouldn't
>> get you anything you didn't have already. The question then really is how
>> to *numerically* evaluate an infinite sum in sage. As shown above, one way
>> could be to use sympy for this. It may be that numerical sum evaluation
>> hasn't received much attention in sage. The link below also suggests using
>> sympy:
>>
>>
>> https://ask.sagemath.org/question/32122/how-to-evaluate-the-infinite-sum-of-12n-1-over-all-positive-integers/
>>
>> I'm not sure how rigorous these methods are. You may have to do some
>> analysis yourself to guarantee an error bound.
>>
>> On Tuesday, 10 December 2024 at 06:15:33 UTC-8 [email protected]
>> wrote:
>>
>>> Thanks for investigating. I tried to use sympy this way:
>>>
>>> sum(log(1-2^-k),k,1,oo,algorithm="sympy")
>>>
>>> but this failed for other reasons (NotImplementedError: conversion to
>>> SageMath is not implemented)
>>>
>>>
>>>
>>> [email protected] schrieb am Dienstag, 10. Dezember 2024 um 14:58:49
>>> UTC+1:
>>>
>>>> On Tue, Dec 10, 2024 at 8:43 AM 'OHappyDay' via sage-support <
>>>> [email protected]> wrote:
>>>>
>>>>> I tried to evaluate the infinite product:
>>>>>
>>>>> prod((2^n-1)/2^n) (n=1,oo)
>>>>>
>>>>> by converting the product to a sum via logarithm:
>>>>>
>>>>> sum(log(1-2^-k),k,1,oo)
>>>>>
>>>>> The sum (and thus the product) should, according to WolframAlpha,
>>>>> converge with a final value of about
>>>>>
>>>>> -1.24206
>>>>>
>>>>
>>>> Sympy does it:
>>>>
>>>> sage: *from* *sympy* *import* oo, Sum, log, Product
>>>>
>>>> sage: p0 = Product((1-1/2^n), (n, 1, oo))
>>>>
>>>> sage: p0.evalf()
>>>>
>>>> 0.288788095086602
>>>>
>>>> sage: s0 = Sum( log(1-1/2^n), (n, 1, oo))
>>>>
>>>> sage: s0.evalf()
>>>>
>>>> -1.24206209481242
>>>>
>>>> sage: exp(-1.242) ## check
>>>> 0.288806027885956
>>>>
>>>>
>>>>>
>>>>> This video (https://www.youtube.com/watch?v=KDyHJlNkov8) indicates
>>>>> that the product converges with an irrational value.
>>>>>
>>>>> Sage reports that the sum is divergent.
>>>>>
>>>>> Ideas? Is this again a failure in Maxima?
>>>>>
>>>>> --
>>>>> 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/fc804b35-7d19-4677-a793-a0c1c76d8391n%40googlegroups.com
>>>>>
>>>>> <https://groups.google.com/d/msgid/sage-support/fc804b35-7d19-4677-a793-a0c1c76d8391n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>>
--
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/8349ceae-c8f2-47bf-beb2-a3e2cb0d464dn%40googlegroups.com.