Re: [sage-support] Possible bug in the mathematica interface

2023-07-10 Thread Emmanuel Charpentier
Well, it’s a bit more intricate than I thought initially : sage: reset() sage: k = var("k") sage: Ex = (1 + (-1)^k)*x^k sage: sum(Ex, k, 0, oo) sum(((-1)^k + 1)*x^k, k, 0, +Infinity) Sage (i. e. Maxima) can’t solve it. sage: sum(Ex, k, 0, oo, algorithm="giac") 1/(x + 1) - 1/(x - 1) Giac does

Re: [sage-support] Possible bug in the mathematica interface

2023-07-09 Thread Jan Groenewald
Debian 12, Sage 9.5 (debian package), Mathematica 13.3 sage: mathematica("Sum[%s, %s]"%tuple(map(lambda u:repr(mathematica(u)), ((1+(-1 : )^k)*x^k, [k , 0, oo] -2/(-1 + x^2) sage: mathematica.Sum(*map(mathematica, ((1+(-1)^k)*x^k, [k , 0, oo]))) {(1 + (-1)^k)*k*x^k, 0, (1 + (-1)^k)*x^k*Inf

[sage-support] Possible bug in the mathematica interface

2023-07-09 Thread Emmanuel Charpentier
Inspiration : this ask.sagemath.org question . Using the Wolfram engine gives me a curious and nonsensical conversion. Compare : sage: mathematica("Sum[%s, %s]"%tuple(map(lambda u:repr(mathematica(