Rational - Maple Help

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}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}\left[\mathrm{IndefiniteSum}\right]\right):$

The following expression is rationally summable.

 > $f≔\frac{1}{{n}^{2}+\mathrm{sqrt}\left(5\right)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{\sqrt{{5}}}{{2}}\right)}{-}\frac{{1}}{{3}{}\left({n}{-}\frac{{1}}{{2}}{+}\frac{\sqrt{{5}}}{{2}}\right)}{-}\frac{{1}}{{3}{}\left({n}{+}\frac{{1}}{{2}}{+}\frac{\sqrt{{5}}}{{2}}\right)}$ (2)

Check the telescoping equation:

 > $\mathrm{evala}\left(\mathrm{Normal}\left(\mathrm{eval}\left(g,n=n+1\right)-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}{}{x}}{{5}}{+}\left({-}\frac{{7}{}{y}}{{25}}{+}\frac{{34}}{{25}}\right){}{\mathrm{\Psi }}{}\left({x}{-}\frac{{4}{}{y}}{{5}}{+}\frac{{3}}{{5}}\right){+}\left(\frac{{17}{}{y}}{{25}}{+}\frac{{3}}{{5}}\right){}{\mathrm{\Psi }}{}\left({x}{+}\frac{{2}{}{y}}{{5}}{-}{1}\right)$ (5)
 > $\mathrm{simplify}\left(\mathrm{combine}\left(f-\left(\mathrm{eval}\left(g,x=x+1\right)-g\right),\mathrm{\Psi }\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.