Subject: Possible nusum bug in Maxima 5.30, possibly later
From: Robert Dodier
Date: Tue, 26 Nov 2013 01:34:24 +0000 (UTC)
On 2013-11-26, Mike Valenzuela <mickle.mouse at gmail.com> wrote:
> (%i1) nusum(a^k,k,0,i);
> (%o1) a^(i+1)/(a-1)-1/(a-1)
>
> (%i2) nusum(%,i,0,n);
> (a^(i+2)-1)/(a^(i+1)-1) non-rational term ratio to nusum
> (%o2) sum(a^(i+1)/(a-1)-1/(a-1),i,0,n)
> Clearly, maxima is mistaken when it says
> "(a^(i+2)-1)/(a^(i+1)-1) non-rational term ratio to nusum"
Not a bug -- nusum implements Gosper's algorithm, which requires that
the ratio of successive terms be a rational function (i.e. ratio of
polynomials) of the summation index; the ratio (a^(i+2)-1)/(a^(i+1)-1)
isn't a ratio of polynomials in i.
simplify_sum makes use of Gosper's and Zeilberger's algorithms and
others, and it can often find summations when nusum fails. E.g.,
load (simplify_sum);
simplify_sum ('sum (a^(i+1)/(a-1)-1/(a-1), i, 0, n));
=> (-n+a*(a^(n+1)-1)/(a-1)-1)/(a-1)
best
Robert Dodier