another summation question



I have added an implementation of a closed_form function to
share/contrib/solve_rec/closed_form.mac (get it from CVS, also update
solve_rec.mac).

Your previous example can be done with:

(%i1) load("closed_form")$
(%i2) sum(r/k*binom(n,r)*binom(m,k-r)/binom(n+m,k),r,0,k);
(%o2) sum(binom(m,k-r)*binom(n,r)*r,r,0,k)/(k*binom(n+m,k))
(%i3) closed_form(intosum(%));
Is  n - k   positive, negative, or zero?  pos;
Is  m - k + 1   positive, negative, or zero?  pos;
(%o3) n/(n+m)

An example where bounds are not naturally induced:

(%i4) sum(binom(n+k,k)/2^k, k, 0, n);
(%o4) sum(binom(n+k,k)/2^k,k,0,n)
(%i5) closed_form(%);
(%o5) 2^n

You can get examples by load("closed_form_test");

HTH,
Andrej

On 4/20/06, az <zoav1 at uic.nnov.ru> wrote:
> hi, Maximers!
>
> I have another summation question: how to compute symbolically
>
> sum(binomal(2*n+1,r)*p^r*(1-p)^(2*n+1-r),r,n+1,2*n+1)-
>  sum(binomal(2*n-1,r)*p^r*(1-p)^(2*n-1-r),r,n,2*n-)
>
> The answer is binomial(2*n-1,n)*p^n*(1-p)^n*(2*p-1).
> (Handwrite trick: write
> binomial(2*n+1,r)=binomial(2*n-1,r)+2*binomial(2*n-1,r-1)+binomial(2*n-1,r-2)
> and carefully simplify).
> It can be verifyed for any given n, but not for general n using Maxima.
> I tried direct check with [canadian tree] CAS,  the answer was different
> so that plotting the difference gave a curve, not a straight line at zero...
>
> Can Zeilberger be applied?
>
> Andrei Zorine
>
> p.s. not GUI, but multiplot3d facility I am missing right now in Maxima.
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>