SUM.TEX 2.4 KB

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