SummableSpace - Maple Help

SumTools[DefiniteSum]

 SummableSpace
 construct the summable space

 Calling Sequence SummableSpace[method](reqn, fcn, options) SummableSpace[method](cert, n, v, options)

Parameters

 method - (optional) either Gosper or AccurateSummation; if omitted, Gosper is assumed reqn - homogeneous linear recurrence fcn - function name, e.g., v(n) cert - rational function in n n - name; the independent variable v - name; the dependent variable opts - sequence of optional equations of the form keyword=value. Possible keywords are output, range, or primitive.

Options

 • Each optional argument is of the form keyword = value. The following options are supported.
 • 'output'
 Specifies the desired form of representations of sequences in the summable space. Possible values:
 – 'RESol'
 Indicates that the sequences are to be represented by an RESol data structure, of the form $\mathrm{RESol}\left(\left\{\mathrm{reqn}\right\},\left\{v\left(n\right)\right\},\mathrm{inits}\right)$, where inits is a set of initial conditions.
 – 'piecewise'
 Indicates that the sequences are to be represented by an explicit expression depending on $n$, which in general is a piecewise expression.
 This argument is ignored in the AccurateSummation case, and an RESol data structure is returned always. In the Gosper case, the default is piecewise.
 • 'range'=a..b
 Specify an interval $R=a..b$ with integer or infinite bounds ($-\mathrm{\infty }..\mathrm{\infty }$ by default). If this option is given then it is assumed that $v\left(n\right)$ is determined only for $n\in R$ and satisfies reqn for all integers $n$ such that both $n$ and $n+1$ are in $R$. Moreover, the discrete Newton-Leibniz formula should be valid for any integers ${n}_{1},{n}_{2}\in R$.
 • 'primitive'=truefalse
 If this option is given, the command returns a pair $V,T$ where $V$ represents the summable space of all $v\left(n\right)$ and $T$ represents the space of all primitives $u\left(n\right)$. In the Gosper case, both are returned in the form specified by the option 'output'. In the AccurateSummation case, $T$ is returned as an expression in terms of $n$ and $v$ and is typically a piecewise expression. The default is false.

Description

 • The command SummableSpace(reqn, fcn) or SummableSpace[Gosper](reqn, fcn) constructs the space of all Gosper definite summable sequences $v\left(n\right)$ satisfying the given homogeneous first order linear recurrence reqn with polynomial coefficients, of the form ${a}_{1}\left(n\right)v\left(n+1\right)+{a}_{0}\left(n\right)v\left(n\right)=0$, for all integers $n$.
 • The command SummableSpace[AccurateSummation](reqn, fcn) constructs the space of accurate summation definite summable sequences satisfying a given homogeneous linear recurrence reqn of arbitrary order with polynomial coefficients.
 • The form in which the result is returned is determined by the output option; see below for details. The output may contain placeholders of the form $v\left(0\right),v\left(1\right),\mathrm{...}$ representing initial conditions or free parameters of the resulting space.
 • Instead of the recurrence, a certificate cert can be specified, in which case the recurrence is taken as $\mathrm{denom}\left(\mathrm{cert}\right)v\left(n+1\right)-\mathrm{numer}\left(\mathrm{cert}\right)v\left(n\right)=0$.
 • A sequence satisfying a first order linear recurrence is called hypergeometric. A hypergeometric sequence $v\left(n\right)$ is called Gosper indefinite summable if there is another hypergeometric sequence $u\left(n\right)$ such that $v\left(n\right)=u\left(n+1\right)-u\left(n\right)$. The sequence $u\left(n\right)$ is called a primitive for $v\left(n\right)$. A Gosper indefinite summable sequence is called Gosper definite summable if the discrete Newton-Leibniz formula

${\sum }_{n={n}_{1}}^{{n}_{2}}v\left(n\right)=u\left({n}_{2}+1\right)-u\left({n}_{1}\right)$

 is valid for any integers ${n}_{1},{n}_{2}$.
 • A sequence $v\left(n\right)$ satisfying a homogeneous linear recurrence with polynomial coefficients of order $d$ is called accurate summation indefinite summable if there is a sequence $u\left(n\right)$ such that $v\left(n\right)=u\left(n+1\right)-u\left(n\right)$ and $u\left(n\right)$ satisfies another homogeneous linear recurrence if the same order $d$. The sequence $u\left(n\right)$ is called a primitive for $v\left(n\right)$. An accurate summation indefinite summable sequence is called accurate summation definite summable if the discrete Newton-Leibniz formula is valid for any integers ${n}_{1},{n}_{2}$.
 • The primitive $u\left(n\right)$ is a linear combination of $v\left(n\right),v\left(n+1\right),\mathrm{...},v\left(n+d-1\right)$ with rational function coefficients, where $d$ is the order of reqn, with the possible exception of finitely many values $n$. In particular, in the Gosper case the primitive is a rational function multiple of $v\left(n\right)$.
 • If no nonzero summable sequences for reqn exist, then the command returns $\mathrm{FAIL}$.

Examples

 > $\mathrm{with}\left(\mathrm{SumTools}\left[\mathrm{DefiniteSum}\right]\right):$
 > $\mathrm{rec}≔kv\left(k+1\right)-{\left(k+1\right)}^{2}v\left(k\right)=0$
 ${\mathrm{rec}}{≔}{k}{}{v}{}\left({k}{+}{1}\right){-}{\left({k}{+}{1}\right)}^{{2}}{}{v}{}\left({k}\right){=}{0}$ (1)
 > $\mathrm{SummableSpace}\left(\mathrm{rec},v\left(k\right),'\mathrm{output}'='\mathrm{RESol}'\right)$
 ${\mathrm{RESol}}{}\left(\left\{\left({-}{{k}}^{{2}}{-}{2}{}{k}{-}{1}\right){}{v}{}\left({k}\right){+}{k}{}{v}{}\left({k}{+}{1}\right){=}{0}\right\}{,}\left\{{v}{}\left({k}\right)\right\}{,}\left\{{v}{}\left({-1}\right){=}{v}{}\left({-1}\right){,}{v}{}\left({0}\right){=}{0}{,}{v}{}\left({1}\right){=}{0}\right\}{,}{\mathrm{INFO}}\right)$ (2)
 > $V,T≔\mathrm{SummableSpace}\left['\mathrm{Gosper}'\right]\left(\mathrm{rec},v\left(k\right),'\mathrm{output}'='\mathrm{piecewise}','\mathrm{primitive}'\right)$
 ${V}{,}{T}{≔}\left\{\begin{array}{cc}\frac{{v}{}\left({-1}\right){}{\left({-1}\right)}^{{-}{k}}{}{k}}{{\mathrm{\Gamma }}{}\left({-}{k}\right)}& {k}{\le }{-1}\\ {0}& {0}{\le }{k}\end{array}\right\{,}\left\{\begin{array}{cc}\frac{{v}{}\left({-1}\right){}{\left({-1}\right)}^{{-}{k}}}{{\mathrm{\Gamma }}{}\left({-}{k}\right)}& {k}{\le }{-1}\\ {0}& {0}{\le }{k}\end{array}\right\$ (3)
 > $\mathrm{add}\left(\mathrm{eval}\left(V,k=i\right),i=-100..100\right)=\mathrm{eval}\left(T,k=101\right)-\mathrm{eval}\left(T,k=-100\right)$
 ${-}\frac{{v}{}\left({-1}\right)}{{933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000000000}}{=}{-}\frac{{v}{}\left({-1}\right)}{{933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000000000}}$ (4)
 > $\mathrm{SummableSpace}\left['\mathrm{Gosper}'\right]\left(\mathrm{rec},v\left(k\right),'\mathrm{range}'=0..\mathrm{\infty }\right)$
 ${v}{}\left({1}\right){}{\mathrm{\Gamma }}{}\left({k}{+}{1}\right){}{k}$ (5)
 > $\mathrm{cert}≔\frac{k}{k+2}$
 ${\mathrm{cert}}{≔}\frac{{k}}{{k}{+}{2}}$ (6)
 > $\mathrm{SummableSpace}\left['\mathrm{Gosper}'\right]\left(\mathrm{cert},k,v\right)$
 $\left\{\begin{array}{cc}{0}& {k}{\le }{-2}\\ {v}{}\left({-1}\right)& {k}{=}{-1}\\ {-}{v}{}\left({-1}\right)& {k}{=}{0}\\ {0}& {1}{\le }{k}\end{array}\right\$ (7)
 > $\mathrm{SummableSpace}\left['\mathrm{Gosper}'\right]\left(\mathrm{cert},k,v,'\mathrm{range}'=1..\mathrm{\infty }\right)$
 $\frac{{2}{}{v}{}\left({1}\right)}{\left({k}{+}{1}\right){}{k}}$ (8)
 > $\mathrm{SummableSpace}\left['\mathrm{Gosper}'\right]\left(2\left({k}^{2}-4\right)\left(k-9\right)v\left(k+1\right)-\left(2k-3\right)\left(k-1\right)\left(k-8\right)v\left(k\right)=0,v\left(k\right)\right)$
 $\left\{\begin{array}{cc}{0}& {k}{\le }{-2}\\ {2}{}{v}{}\left({1}\right)& {k}{=}{-1}\\ {-}{3}{}{v}{}\left({1}\right)& {k}{=}{0}\\ {v}{}\left({1}\right)& {k}{=}{1}\\ {-}\frac{{8}{}{v}{}\left({3}\right){}{\mathrm{\Gamma }}{}\left({k}{-}\frac{{3}}{{2}}\right){}\left({k}{-}{2}\right){}\left({k}{-}{9}\right)}{\sqrt{{\mathrm{\pi }}}{}{\mathrm{\Gamma }}{}\left({k}{+}{2}\right)}& {2}{\le }{k}\end{array}\right\$ (9)
 > $L≔\left(k-3\right)\left(k-2\right)\left(k+1\right)v\left(k+2\right)-\left(k-3\right)\left({k}^{2}-2k-1\right)v\left(k+1\right)-{\left(k-2\right)}^{2}v\left(k\right)=0$
 ${L}{≔}\left({k}{-}{3}\right){}\left({k}{-}{2}\right){}\left({k}{+}{1}\right){}{v}{}\left({k}{+}{2}\right){-}\left({k}{-}{3}\right){}\left({{k}}^{{2}}{-}{2}{}{k}{-}{1}\right){}{v}{}\left({k}{+}{1}\right){-}{\left({k}{-}{2}\right)}^{{2}}{}{v}{}\left({k}\right){=}{0}$ (10)
 > $\mathrm{SummableSpace}\left['\mathrm{AccurateSummation}'\right]\left(L,v\left(k\right),\mathrm{primitive}\right)$
 ${\mathrm{RESol}}{}\left(\left\{\left({-}{{k}}^{{2}}{+}{4}{}{k}{-}{4}\right){}{v}{}\left({k}\right){+}\left({-}{{k}}^{{3}}{+}{5}{}{{k}}^{{2}}{-}{5}{}{k}{-}{3}\right){}{v}{}\left({k}{+}{1}\right){+}\left({{k}}^{{3}}{-}{4}{}{{k}}^{{2}}{+}{k}{+}{6}\right){}{v}{}\left({k}{+}{2}\right){=}{0}\right\}{,}\left\{{v}{}\left({k}\right)\right\}{,}\left\{{v}{}\left({2}\right){=}{v}{}\left({2}\right){,}{v}{}\left({3}\right){=}{0}{,}{v}{}\left({4}\right){=}{v}{}\left({4}\right){,}{v}{}\left({5}\right){=}{-}\frac{{v}{}\left({4}\right)}{{4}}\right\}{,}{\mathrm{INFO}}\right){,}\left\{\begin{array}{cc}\frac{{v}{}\left({k}\right)}{{k}{-}{3}}{+}{k}{}{v}{}\left({k}{+}{1}\right)& {k}{\le }{2}\\ {0}& {k}{=}{3}\\ \frac{{v}{}\left({k}\right)}{{k}{-}{3}}{+}{k}{}{v}{}\left({k}{+}{1}\right)& {4}{\le }{k}\end{array}\right\$ (11)
 > $\mathrm{SummableSpace}\left[\mathrm{AccurateSummation}\right]\left(L,v\left(k\right),\mathrm{range}=4..\mathrm{\infty },\mathrm{primitive}\right)$
 ${\mathrm{RESol}}{}\left(\left\{\left({-}{{k}}^{{2}}{+}{4}{}{k}{-}{4}\right){}{v}{}\left({k}\right){+}\left({-}{{k}}^{{3}}{+}{5}{}{{k}}^{{2}}{-}{5}{}{k}{-}{3}\right){}{v}{}\left({k}{+}{1}\right){+}\left({{k}}^{{3}}{-}{4}{}{{k}}^{{2}}{+}{k}{+}{6}\right){}{v}{}\left({k}{+}{2}\right){=}{0}\right\}{,}\left\{{v}{}\left({k}\right)\right\}{,}\left\{{v}{}\left({4}\right){=}{v}{}\left({4}\right){,}{v}{}\left({5}\right){=}{v}{}\left({5}\right)\right\}{,}{\mathrm{INFO}}\right){,}\frac{{v}{}\left({k}\right)}{{k}{-}{3}}{+}{k}{}{v}{}\left({k}{+}{1}\right)$ (12)

References

 S.A. Abramov. "On the summation of P-recursive sequences." Proc. of ISSAC'06, (2006): 17-22.

Compatibility

 • The SumTools[DefiniteSum][SummableSpace] command was introduced in Maple 15.