SUM: A package for series summation
Date: 2020-10-07 18:10:00

Up | Next | Prev | PrevTail | Tail

### 16.70 SUM: A package for series summation

This package implements the Gosper algorithm for the summation of series. It deﬁnes operators SUM and PROD. The operator SUM returns the indeﬁnite or deﬁnite summation of a given expression, and PROD returns the product of the given expression.

This package loads automatically.

Author: Fujio Kako.

This package implements the Gosper algorithm for the summation of series. It deﬁnes operators SUM and PROD. The operator SUM returns the indeﬁnite or deﬁnite summation of a given expression, and the operator PROD returns the product of the given expression. These are used with the syntax:

SUM(EXPR: expression, K: kernel, [LOLIM: expression [, UPLIM: expression]]) PROD(EXPR: expression, K: kernel, [LOLIM: expression [, UPLIM: expression]])

If there is no closed form solution, these operators return the input unchanged. UPLIM and LOLIM are optional parameters specifying the lower limit and upper limit of the summation (or product), respectively. If UPLIM is not supplied, the upper limit is taken as K (the summation variable itself).

For example:

sum(n**3,n);
sum(a+k*r,k,0,n-1);
sum(1/((p+(k-1)*q)*(p+k*q)),k,1,n+1);
prod(k/(k-2),k);

Gosper’s algorithm succeeds whenever the ratio

is a rational function of n. The function SUM!-SQ handles basic functions such as polynomials, rational functions and exponentials.

The trigonometric functions sin, cos, etc. are converted to exponentials and then Gosper’s algorithm is applied. The result is converted back into sin, cos, sinh and cosh.

Summations of logarithms or products of exponentials are treated by the formula:

Other functions, as shown in the test ﬁle for the case of binomials and formal products, can be summed by providing LET rules which must relate the functions evaluated at k and k − 1 (k being the summation variable).

There is a switch TRSUM (default OFF). If this switch is on, trace messages are printed out during the course of Gosper’s algorithm.

Up | Next | Prev | PrevTail | Front