On Fri, Feb 11, 2022 at 5:00 PM 'Peter Taylor' via sage-devel
<sage-devel@googlegroups.com> wrote:
>
> "sum" is not specific enough a keyword to filter down the discussions. None 
> of the titles of the "Mathematically incorrect answers" list on Trac are 
> obviously about this issue, but is it new?
>
> Code:
>
> s, n, x, y, t = var('s, n, x, y, t')
> print(sum(binomial(n,s) * (x+y)^s * x^(n-s), s, 0, n))
> print(sum(binomial(n,s) * (x+1)^s * x^(n-s), s, 0, n))

This looks like a Maxima bug:

sage: SR(binomial(n,s) * (x+1)^s * x^(n-s)).sum( s, 0, n,
algorithm='giac') # correct
x^n*e^(n*log(2*x + 1) - n*log(x))
sage: SR(binomial(n,s) * (x+1)^s * x^(n-s)).sum( s, 0, n) # wrong
(actually, maxima is the default)
(2*x)^n
sage: SR(binomial(n,s) * (x+1)^s * x^(n-s)).sum( s, 0, n,
algorithm='maxima') # wrong
(2*x)^n

(this is with Sage 9.6.beta0)

>
> Observed in version 9.4 using sagecell.sagemath.org:
>
> (2*x + y)^n
> (2*x)^n
>
> Expected:
>
> (2*x + y)^n
> (2*x + 1)^n
>
> Link to reproduce: 
> https://sagecell.sagemath.org/?z=eJyFjEEKg0AQBO-Cf-ibM2Yi-gC_IqxBwkJ2Ijsq6-9dghcPklM3TVWbe09N8PZqRqc6xTOIy6IsTKCCJNgFC3psLlJ1GasfN0evC9kaaPT6Dd59SMUYNSg9dh4stzSQPo0F2W_zBfMfr7vzDlIMMqI=&lang=sage&interacts=eJyLjgUAARUAuQ==
>
> Regards,
> Peter Taylor
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/5936f5ad-848e-46bc-b123-8f521b61c4edn%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAAWYfq35PJCx%2BCgVbPro7mnH5FzTA%3D%3D0LF%2Bdtty3ccbgAC9inw%40mail.gmail.com.

Reply via email to