simplifying sums



On 2013-05-24, Przemek Klosowski <przemek.klosowski at nist.gov> wrote:


> My first newbie question is what is that construct 'sum(),simpsum'? is 
> simpsum a procedure evaluated on output of sum(), or some global flag?

Well, simpsum is an evaluation flag -- at the input prompt, 'foo, flag'
is equivalent to ev(foo, flag) -- see ev for a list of flags. What
happens is that a different simplification function is called when the
flag is present.

> My real summation formula is sum(binomial(k+1,2)^(n-k),k,1,n)

The built-in simplification for sums isn't very strong. There is an
add-on package simplify_sum which is more powerful. However I find that
even simplify_sum can't solve this one:

  (%i1) display2d : false $
  (%i2) load (simplify_sum) $
  (%i3) sum (binomial (k + 1, 2)^(n - k), k, 1, n);
  (%o3) 'sum(k^(n-k)*(k+1)^(n-k)*2^(k-n),k,1,n)
  (%i4) simplify_sum (%);
  (%o4) 'sum(k^(n-k)*(k+1)^(n-k)*2^(k-n),k,1,n)

Sorry I can't be more helpful,

Robert Dodier