Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maxima returns wrong value for sum(binomial(j,k),j,k,n) #10273

Closed
jpflori opened this issue Nov 15, 2010 · 4 comments
Closed

Maxima returns wrong value for sum(binomial(j,k),j,k,n) #10273

jpflori opened this issue Nov 15, 2010 · 4 comments

Comments

@jpflori
Copy link

jpflori commented Nov 15, 2010

The -1 should not be here:

sage: sum(binomial(j,k),j,k,k+1)
k + 2
sage: sum(binomial(j,k),j,k,n)
binomial(n + 1, k + 1) - 1
sage: sum(binomial(j,k),j,k,n).subs({n:k+1})
binomial(k + 2, k + 1) - 1
sage: maxima_console()
;;; Loading #P"/home/jp/boulot/sage/sage-4.6/local/lib/ecl/defsystem.fas"
;;; Loading #P"/home/jp/boulot/sage/sage-4.6/local/lib/ecl/cmp.fas"
;;; Loading #P"/home/jp/boulot/sage/sage-4.6/local/lib/ecl/sysfun.lsp"
Maxima 5.20.1 http://maxima.sourceforge.net
using Lisp ECL 10.2.1
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) load("simplify_sum");
(%o1) /home/jp/boulot/sage/sage-4.6/local/share/maxima/5.20.1/share/contrib/so\
lve_rec/simplify_sum.mac
(%i2) sum(binomial(j,k),j,k,n);
                              n
                             ====
                             \
(%o2)                         >    binomial(j, k)
                             /
                             ====
                             j = k
(%i3) simplify_sum(%);
(%o3)                     binomial(n + 1, k + 1) - 1
(%i4) sum(binomial(j,k),j,0,n);
                              n
                             ====
                             \
(%o4)                         >    binomial(j, k)
                             /
                             ====
                             j = 0
(%i5) simplify_sum(%);
(%o5)             binomial(n + 1, k + 1) - binomial(1, k + 1)

Upstream: Fixed upstream, in a later stable release.

Component: symbolics

Keywords: maxima

Issue created by migration from https://trac.sagemath.org/ticket/10273

@jpflori
Copy link
Author

jpflori commented Nov 15, 2010

comment:1

I just tested it with Maxima 5.22.1 and Ecl from #10187 and the result is now correct.
So updating to that version will fix this problem.

sage: maxima_console()
;;; Loading #P"/home/jp/boulot/sage/sage-4.6/local/lib/ecl/sb-bsd-sockets.fas"
;;; Loading #P"/home/jp/boulot/sage/sage-4.6/local/lib/ecl/sockets.fas"
;;; Loading #P"/home/jp/boulot/sage/sage-4.6/local/lib/ecl/defsystem.fas"
;;; Loading #P"/home/jp/boulot/sage/sage-4.6/local/lib/ecl/cmp.fas"
;;; Loading #P"/home/jp/boulot/sage/sage-4.6/local/lib/ecl/sysfun.lsp"
Maxima 5.22.1 http://maxima.sourceforge.net
using Lisp ECL 10.4.1
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) load("simplify_sum");

(%o1) /home/jp/boulot/sage/sage-4.6/local/share/maxima/5.22.1/share/contrib/so\
lve_rec/simplify_sum.mac
(%i2) sum(binomial(j,k),j,k,n);

                              n
                             ====
                             \
(%o2)                         >    binomial(j, k)
                             /
                             ====
                             j = k
(%i3) simplify_sum(%);

(%o3)                       binomial(n + 1, k + 1)
(%i4) sum(binomial(j,k),j,0,n);

                              n
                             ====
                             \
(%o4)                         >    binomial(j, k)
                             /
                             ====
                             j = 0
(%i5) simplify_sum(%);

(%o5)             binomial(n + 1, k + 1) - binomial(0, k + 1)
sage: x,y,z=var('x,y,z')
sage: i,j,k,n,m,d=var('i,j,k,n,m,d')
sage: sum(binomial(j,k),j,k,n)
binomial(n + 1, k + 1)

@jpflori
Copy link
Author

jpflori commented Nov 15, 2010

Upstream: Fixed upstream, in a later stable release.

@jpflori
Copy link
Author

jpflori commented Nov 15, 2010

comment:2

Sorry for the noise, it was already mentionned here: #7952

However the patch to maxima was not included yet.

@jpflori
Copy link
Author

jpflori commented Nov 15, 2010

Changed keywords from none to maxima

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants