Summation question



Hello SY,

>  SUM( k*(1-p)*p^(k-1), k, 1, INF), simpsum;

Maxima has 2 implementations of Gosper's algorithm
for hypergeometric summation. The older implementation
is named nusum and it is built-in in all Maxima versions.
The newer one is named Zeilberger and it is an add-on package
in 5.9.3 and later versions.

expr : k*(1-p)*p^(k-1);
nusum (expr, k, 1, n);
  => -p^n*(n*p-n-1)/(p-1)-1/(p-1)
expr2 : ratsimp (%);
  => -(p^n*(n*p-n-1)+1)/(p-1)
assume (p > 0, p < 1);
limit (expr2, n, inf);
  => -1/(p-1)

load (zeilberger);
GosperSum (expr, k, 1, n);
  => (1-p)*p^n*((n+1)/(p-1)-p/(p^2-2*p+1))
       -(1-p)*(1/(p-1)-p/(p^2-2*p+1))
ratsimp (%);
  => -(p^n*(n*p-n-1)+1)/(p-1)  /* same result as nusum */


Maxima knows some identities for summations but when
those are exhausted, the Gosper and Zeilberger methods are
the next things to try.

HTH
Robert Dodier