Definite - Maple Help

SumTools[DefiniteSum]

 Definite
 compute closed forms of definite sums

 Calling Sequence Definite(f, k=m..n) Definite(f, k=m..n, parametric) Definite(f, k=alpha) Definite(f, k=expr)

Parameters

 f - expression; the summand k - name; the summation index m, n - expressions or integers; the summation bounds parametric - (optional) literal name alpha - RootOf expression expr - expression not containing k

Options

 • If the option parametric is specified, then Definite returns a result that is valid for all possible integer values of any parameters occurring in the summand or the summation bounds. In general, the result is expressed in terms of piecewise functions.

Description

 • The Definite(f, k=m..n) command computes a closed form of the definite sum of $f$ over the specified range of $k$.
 • The function is a combination of different algorithms.  They include
 – the method of integral representation,
 – the method of first computing a closed form of the corresponding indefinite sum and then applying the discrete Newton-Leibniz formula,
 – the method of computing closed forms of definite sums of hypergeometric terms (see SumTools[Hypergeometric]), and
 – the method of first converting the given definite sum to hypergeometric functions, and then converting these hypergeometric functions to standard functions (if possible).

Examples

 > $\mathrm{with}\left(\mathrm{SumTools}\left[\mathrm{DefiniteSum}\right]\right):$
 > $F≔\frac{{\left(2+k\right)}^{k-2}{\left(1+n-k\right)}^{n-k}}{k!\left(n-k\right)!}$
 ${F}{≔}\frac{{\left({2}{+}{k}\right)}^{{k}{-}{2}}{}{\left({1}{+}{n}{-}{k}\right)}^{{n}{-}{k}}}{{k}{!}{}\left({n}{-}{k}\right){!}}$ (1)
 > $\mathrm{Sum}\left(F,k=0..n\right)=\mathrm{Definite}\left(F,k=0..n\right)$
 ${\sum }_{{k}{=}{0}}^{{n}}{}\frac{{\left({2}{+}{k}\right)}^{{k}{-}{2}}{}{\left({1}{+}{n}{-}{k}\right)}^{{n}{-}{k}}}{{k}{!}{}\left({n}{-}{k}\right){!}}{=}\frac{{\left({3}{+}{n}\right)}^{{n}}}{{4}{}{n}{!}}{-}\frac{{\left({3}{+}{n}\right)}^{{n}{-}{1}}}{{6}{}\left({n}{-}{1}\right){!}}$ (2)
 > $F≔\mathrm{binomial}\left(2n-2k,n-k\right){2}^{4k}{\left(2k\left(2k+1\right)\mathrm{binomial}\left(2k,k\right)\right)}^{-1}$
 ${F}{≔}\frac{\left(\genfrac{}{}{0}{}{{2}{}{n}{-}{2}{}{k}}{{n}{-}{k}}\right){}{{2}}^{{4}{}{k}}}{{2}{}{k}{}\left({2}{}{k}{+}{1}\right){}\left(\genfrac{}{}{0}{}{{2}{}{k}}{{k}}\right)}$ (3)
 > $\mathrm{Sum}\left(F,k=1..n\right)=\mathrm{Definite}\left(F,k=1..n\right)$
 ${\sum }_{{k}{=}{1}}^{{n}}{}\frac{\left(\genfrac{}{}{0}{}{{2}{}{n}{-}{2}{}{k}}{{n}{-}{k}}\right){}{{2}}^{{4}{}{k}}}{{2}{}{k}{}\left({2}{}{k}{+}{1}\right){}\left(\genfrac{}{}{0}{}{{2}{}{k}}{{k}}\right)}{=}{-}\frac{\left(\genfrac{}{}{0}{}{{2}{}{n}{-}{2}}{{n}{-}{1}}\right){}\left({-}{16}{}{n}{+}{8}\right)}{{2}{}\left({2}{}{n}{+}{1}\right)}$ (4)
 > $F≔{\mathrm{binomial}\left(2n,2k\right)}^{2}$
 ${F}{≔}{\left(\genfrac{}{}{0}{}{{2}{}{n}}{{2}{}{k}}\right)}^{{2}}$ (5)
 > $\mathrm{Sum}\left(F,k=0..n\right)=\mathrm{Definite}\left(F,k=0..n\right)$
 ${\sum }_{{k}{=}{0}}^{{n}}{}{\left(\genfrac{}{}{0}{}{{2}{}{n}}{{2}{}{k}}\right)}^{{2}}{=}\frac{{\left({-1}\right)}^{{n}}{}\left(\genfrac{}{}{0}{}{{2}{}{n}}{{n}}\right)}{{2}}{+}\frac{\left(\genfrac{}{}{0}{}{{4}{}{n}}{{2}{}{n}}\right)}{{2}}$ (6)
 > $F≔\frac{\frac{{2}^{2k}}{{\mathrm{\pi }}^{\frac{1}{2}}}\mathrm{\Gamma }\left(k-n\right)\mathrm{\Gamma }\left(k+n\right)}{\mathrm{\Gamma }\left(2k+1\right)}{z}^{k}$
 ${F}{≔}\frac{{{2}}^{{2}{}{k}}{}{\mathrm{\Gamma }}{}\left({-}{n}{+}{k}\right){}{\mathrm{\Gamma }}{}\left({k}{+}{n}\right){}{{z}}^{{k}}}{\sqrt{{\mathrm{\pi }}}{}{\mathrm{\Gamma }}{}\left({2}{}{k}{+}{1}\right)}$ (7)
 > $\mathrm{Sum}\left(F,k=0..\mathrm{\infty }\right)=\mathrm{Definite}\left(F,k=0..\mathrm{\infty }\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{assuming}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{abs}\left(z\right)\le 1$
 ${\sum }_{{k}{=}{0}}^{{\mathrm{\infty }}}{}\frac{{{2}}^{{2}{}{k}}{}{\mathrm{\Gamma }}{}\left({-}{n}{+}{k}\right){}{\mathrm{\Gamma }}{}\left({k}{+}{n}\right){}{{z}}^{{k}}}{\sqrt{{\mathrm{\pi }}}{}{\mathrm{\Gamma }}{}\left({2}{}{k}{+}{1}\right)}{=}{-}\frac{\sqrt{{\mathrm{\pi }}}{}{\mathrm{cos}}{}\left({2}{}{n}{}{\mathrm{arcsin}}{}\left(\sqrt{{z}}\right)\right){}{\mathrm{csc}}{}\left({\mathrm{\pi }}{}{n}\right)}{{n}}$ (8)

Parametric case discussions may be returned:

 > $F≔\frac{\mathrm{binomial}\left(2k-3,k\right)}{{4}^{k}}$
 ${F}{≔}\frac{\left(\genfrac{}{}{0}{}{{2}{}{k}{-}{3}}{{k}}\right)}{{{4}}^{{k}}}$ (9)
 > $\mathrm{Sum}\left(F,k=0..n\right)=\mathrm{Definite}\left(F,k=0..n,\mathrm{parametric}\right)$
 ${\sum }_{{k}{=}{0}}^{{n}}{}\frac{\left(\genfrac{}{}{0}{}{{2}{}{k}{-}{3}}{{k}}\right)}{{{4}}^{{k}}}{=}\left\{\begin{array}{cc}\frac{\left(\genfrac{}{}{0}{}{{-}{1}{+}{2}{}{n}}{{n}}\right){}\left({4}{+}{2}{}{n}\right)}{{{4}}^{{n}{+}{1}}}& {n}{\le }{0}\\ \frac{{3}}{{4}}& {n}{=}{1}\\ \frac{\left(\genfrac{}{}{0}{}{{-}{1}{+}{2}{}{n}}{{n}}\right){}\left({4}{+}{2}{}{n}\right)}{{{4}}^{{n}{+}{1}}}{+}\frac{{3}}{{8}}& {2}{\le }{n}\end{array}\right\$ (10)
 > $\mathrm{Definite}\left(\frac{1}{k},k=a..b\right)$
 ${\sum }_{{k}{=}{a}}^{{b}}{}\frac{{1}}{{k}}$ (11)
 > $\mathrm{Definite}\left(\frac{1}{k},k=a..b,\mathrm{parametric}\right)$
 $\left\{\begin{array}{cc}{0}& {a}{=}{b}{+}{1}\\ {\mathrm{\Psi }}{}\left({b}{+}{1}\right){-}{\mathrm{\Psi }}{}\left({a}\right)& {1}{\le }{a}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{0}{\le }{b}\\ {\mathrm{\Psi }}{}\left({-}{b}\right){-}{\mathrm{\Psi }}{}\left({1}{-}{a}\right)& {a}{\le }{0}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{\mathbf{and}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{b}{\le }{-1}\\ {\mathrm{FAIL}}& {\mathrm{otherwise}}\end{array}\right\$ (12)

Sum over RootOf:

 > $F≔\frac{{t}^{2}+1}{{t}^{3}-5t+2}$
 ${F}{≔}\frac{{{t}}^{{2}}{+}{1}}{{{t}}^{{3}}{-}{5}{}{t}{+}{2}}$ (13)
 > $\mathrm{Definite}\left(F,t=\mathrm{RootOf}\left({x}^{5}+x+1\right)\right)$
 ${-}\frac{{269}}{{833}}$ (14)

References

 Egorychev, G.P. "Integral Representation and the Computation of Combinatorial Sums." Novosibirsk, Nauka. (1977). (in Russian); English: Translations of Mathematical Monographs. Vol. 59. American Mathematical Society. (1984).
 Roach, K. "Hypergeometric Function Representations." Proceedings ISSAC 1996, pp. 301-308. New York: ACM Press, 1996.
 van Hoeij, M. "Finite Singularities and Hypergeometric Solutions of Linear Recurrence Equations." Journal of Pure and Applied Algebra. Vol. 139. (1999): 109-131.
 Zeilberger, D. "The Method of Creative Telescoping." Journal of Symbolic Computing. Vol. 11. (1991): 195-204.