SumTools[IndefiniteSum] - Maple Programming Help

Home : Support : Online Help : Mathematics : Discrete Mathematics : Summation and Difference Equations : SumTools : SumTools/IndefiniteSum/Rational

SumTools[IndefiniteSum]

 Rational
 compute closed forms of indefinite sums of rational functions

 Calling Sequence Rational(f, k, options)

Parameters

 f - rational function in k k - name options - (optional) equation of the form failpoints=true or failpoints=false

Description

 • The Rational(f, k) command computes a closed form of the indefinite sum of $f$ with respect to $k$.
 • Rational functions are summed using Abramov's algorithm (see the References section). For the input rational function $f\left(k\right)$, the algorithm computes two rational functions $s\left(k\right)$ and $t\left(k\right)$ such that $f\left(k\right)=s\left(k+1\right)-s\left(k\right)+t\left(k\right)$ and the denominator of $t\left(k\right)$ has minimal degree with respect to $k$.  The non-rational part, ${\sum }_{k}\phantom{\rule[-0.0ex]{5.0px}{0.0ex}}t\left(k\right)$, is then expressed in terms of the digamma and polygamma functions.
 • If the option failpoints=true (or just failpoints for short) is specified, then the command returns a pair $g,\left[p,q\right]$, where
 – $g$ is the closed form of the indefinite sum of $f$ w.r.t. $k$,
 – $p$ is a list containing the integer poles of $f$, and
 – $q$ is a list containing the poles of $s$ and $t$ that are not poles of $f$.
 See SumTools[IndefiniteSum][Indefinite] for more detailed help.

Examples

 > $\mathrm{with}\left(\mathrm{SumTools}[\mathrm{IndefiniteSum}]\right):$

The following expression is rationally summable.

 > $f≔\frac{1}{{n}^{2}+\sqrt{5}n-1}$
 ${f}{≔}\frac{{1}}{{{n}}^{{2}}{+}\sqrt{{5}}{}{n}{-}{1}}$ (1)
 > $g≔\mathrm{Rational}\left(f,n\right)$
 ${g}{≔}{-}\frac{{1}}{{3}{}\left({n}{-}\frac{{3}}{{2}}{+}\frac{{1}}{{2}}{}\sqrt{{5}}\right)}{-}\frac{{1}}{{3}{}\left({n}{-}\frac{{1}}{{2}}{+}\frac{{1}}{{2}}{}\sqrt{{5}}\right)}{-}\frac{{1}}{{3}{}\left({n}{+}\frac{{1}}{{2}}{+}\frac{{1}}{{2}}{}\sqrt{{5}}\right)}$ (2)

Check the telescoping equation:

 > $\mathrm{evala}\left(\mathrm{Normal}\left(\genfrac{}{}{0}{}{g}{\phantom{n=n+1}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}|\phantom{\rule[-0.0ex]{0.1em}{0.0ex}}\genfrac{}{}{0}{}{\phantom{g}}{n=n+1}-g\right),\mathrm{expanded}\right)$
 $\frac{{1}}{{{n}}^{{2}}{+}\sqrt{{5}}{}{n}{-}{1}}$ (3)

A non-rationally summable example.

 > $f≔\frac{13-57x+2y+20{x}^{2}-18xy+10{y}^{2}}{15+10x-26y-25{x}^{2}+10xy+8{y}^{2}}$
 ${f}{≔}\frac{{20}{}{{x}}^{{2}}{-}{18}{}{x}{}{y}{+}{10}{}{{y}}^{{2}}{-}{57}{}{x}{+}{2}{}{y}{+}{13}}{{-}{25}{}{{x}}^{{2}}{+}{10}{}{x}{}{y}{+}{8}{}{{y}}^{{2}}{+}{10}{}{x}{-}{26}{}{y}{+}{15}}$ (4)
 > $g≔\mathrm{Rational}\left(f,x\right)$
 ${g}{≔}{-}\frac{{4}}{{5}}{}{x}{+}\left({-}\frac{{7}}{{25}}{}{y}{+}\frac{{34}}{{25}}\right){}{\mathrm{Ψ}}{}\left({x}{-}\frac{{4}}{{5}}{}{y}{+}\frac{{3}}{{5}}\right){+}\left(\frac{{17}}{{25}}{}{y}{+}\frac{{3}}{{5}}\right){}{\mathrm{Ψ}}{}\left({x}{+}\frac{{2}}{{5}}{}{y}{-}{1}\right)$ (5)
 > $\mathrm{simplify}\left(\mathrm{combine}\left(f-\left(\genfrac{}{}{0}{}{g}{\phantom{x=x+1}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}|\phantom{\rule[-0.0ex]{0.1em}{0.0ex}}\genfrac{}{}{0}{}{\phantom{g}}{x=x+1}-g\right),\mathrm{Ψ}\right)\right)$
 ${0}$ (6)

Compute the fail points.

 > $f≔\frac{1}{n}-\frac{2}{n-3}+\frac{1}{n-5}$
 ${f}{≔}\frac{{1}}{{n}}{-}\frac{{2}}{{n}{-}{3}}{+}\frac{{1}}{{n}{-}{5}}$ (7)
 > $g,\mathrm{fp}≔\mathrm{Rational}\left(f,n,'\mathrm{failpoints}'\right)$
 ${g}{,}{\mathrm{fp}}{≔}{-}\frac{{1}}{{n}{-}{5}}{-}\frac{{1}}{{n}{-}{4}}{+}\frac{{1}}{{n}{-}{3}}{+}\frac{{1}}{{n}{-}{2}}{+}\frac{{1}}{{n}{-}{1}}{,}\left[\left[{0}{..}{0}{,}{3}{..}{3}{,}{5}{..}{5}\right]{,}\left[{1}{,}{2}{,}{4}\right]\right]$ (8)

Indeed, $f$ is not defined at $n=0,3,5$, and $g$ is not defined at $n=1,2,4$.

References

 • Abramov, S.A. "Indefinite sums of rational functions." Proceedings ISSAC'95, pp. 303-308. 1995.