Menu

#2092 Bug in simplify_sum

closed
nobody
None
5
2010-11-01
2010-10-23
jrredford
No

On p. 876 of the PDF version of the Maxima Manual, Ver. 5.22 on the Maxima website, it gives an example of simplify_sum. But when I follow the example, the simplification doesn't work, contrary to what is shown in the manual. Below is the result I get:

(%i1) display2d:false;

(%o1) false
(%i2) load("simplify_sum");

(%o2) "C:/program1/maxima/share/maxima/5.22.1/share/contrib/solve_rec/simplify_s
um.mac"
(%i3) sum(binom(n+k,k)/2^k, k, 0, n) + sum(binom(2*n, 2*k), k, 0, n);

(%o3) 'sum(binom(n+k,k)/2^k,k,0,n)+'sum(binom(2*n,2*k),k,0,n)
(%i4) simplify_sum(%);

(%o4) 'sum(binom(n+k,k)/2^k,k,0,n)+'sum(binom(2*n,2*k),k,0,n)
(%i5)

Below is the Maxima version I'm using:

Maxima version: 5.22.1
Maxima build date: 11:48 8/13/2010
Host type: i686-pc-mingw32
Lisp implementation type: GNU Common Lisp (GCL)
Lisp implementation version: GCL 2.6.8

Discussion

  • Raymond Toy

    Raymond Toy - 2010-10-23

    Maybe binom should be binomial. When I do that, simplify_sum gives 2^(2n-1)+2^n.

    So this is probably a documentation bug.

     
  • jrredford

    jrredford - 2010-10-23

    Hi, Rtoy. That's the result I get when using binomial:

    (%i2) sum(binomial(n+k,k)/2^k, k, 0, n) + sum(binomial(2*n, 2*k), k, 0, n);

    (%o2) 'sum(binomial(n+k,k)/2^k,k,0,n)+'sum(binomial(2*n,2*k),k,0,n)
    (%i3) simplify_sum(%);

    Is n positive or zero?

    p;
    (%o3) 2^(2*n-1)+2^n
    (%i4) simplify_sum(%o2);

    Is n positive or zero?

    z;
    (%o4) 2^(2*n-1)+2^n
    (%i5)

    Page 878 of the aforecited Maxima Manual also uses "binom".

     
  • Dieter Kaiser

    Dieter Kaiser - 2010-10-23

    The reported problem is a documentation error. The function simplify_sum gives a different, but equivalent answer since Maxima 5.16. I think the initial revision of simply_sum is Maxima 5.13. I can reproduce the documented result for Maxima 5.13 until Maxima 5.15.
    The alias binom for the function binomial has been cut out with revision 1.86 of suprv.lisp and is not present since Maxima 5.20.

    Dieter Kaiser

     
  • Dieter Kaiser

    Dieter Kaiser - 2010-11-01

    The documentation has been updated in solve_rec.texi revision 1.13.
    Closing this bug report as fixed.
    Dieter Kaiser

     
  • Dieter Kaiser

    Dieter Kaiser - 2010-11-01
    • status: open --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.