1\documentstyle[11pt,reduce]{article}
2\title{The REDUCE Sum Package \\ Ver 1.0 9 Oct 1989}
3\date{}
4\author{Fujio Kako \\ Department of Mathematics \\ Faculty of Science \\
5Hiroshima University \\ Hiroshima 730, JAPAN \\
6E-mail: kako@ics.nara-wu.ac.jp}
7\begin{document}
8\maketitle
9\index{Gosper's Algorithm} \index{SUM operator} \index{PROD operator}
10This package implements the Gosper algorithm for the summation of series.
11It defines operators SUM and PROD.  The operator SUM returns the indefinite
12or definite summation of a given expression, and the operator PROD returns
13the product of the given expression.  These are used with the syntax:
14
15\vspace{.1in}
16\noindent {\tt SUM}(EXPR:{\em expression}, K:{\em kernel},
17[LOLIM:{\em expression} [, UPLIM:{\em expression}]])
18\vspace{.1in}
19\noindent {\tt PROD}(EXPR:{\em expression}, K:{\em kernel},
20[LOLIM:{\em expression} [, UPLIM:{\em expression}]])
21
22If there is no closed form solution, these operators return the input
23unchanged.  UPLIM and LOLIM are optional parameters specifying the lower
24limit and upper limit of the summation (or product), respectively.  If UPLIM
25is not supplied, the upper limit is taken as K (the summation variable
26itself).
27
28For example:
29
30\begin{verbatim}
31     sum(n**3,n);
32
33     sum(a+k*r,k,0,n-1);
34
35     sum(1/((p+(k-1)*q)*(p+k*q)),k,1,n+1);
36
37     prod(k/(k-2),k);
38\end{verbatim}
39
40Gosper's algorithm succeeds whenever the ratio
41
42\[ \frac{\sum_{k=n_0}^n f(k)}{\sum_{k=n_0}^{n-1} f(k)} \]
43
44\noindent is a rational function of $n$.  The function SUM!-SQ
45handles basic functions such as polynomials, rational functions and
46exponentials. \ttindex{SUM-SQ}
47
48The trigonometric functions sin, cos, etc. are converted to exponentials
49and then Gosper's algorithm is applied.  The result is converted back into
50sin, cos, sinh and cosh.
51
52Summations of logarithms or products of exponentials are treated by the
53formula:
54
55\vspace{.1in}
56\hspace*{2em} \[ \sum_{k=n_0}^{n} \log f(k) = \log \prod_{k=n_0}^n f(k) \]
57\vspace{.1in}
58\hspace*{2em} \[ \prod_{k=n_0}^n \exp f(k) = \exp \sum_{k=n_0}^n f(k) \]
59\vspace{.1in}
60
61Other functions, as shown in the test file for the case of binomials and
62formal products, can be summed by providing LET rules which must relate the
63functions evaluated at $k$ and $k - 1$ ($k$ being the summation variable).
64
65\index{tracing ! SUM package} \ttindex{TRSUM}
66There is a switch TRSUM (default OFF).  If this switch is on, trace
67messages are printed out during the course of Gosper's algorithm.
68
69\end{document}
70