 RESol - Maple Programming Help

RESol

data structure to represent the solution of a recurrence equation

 Calling Sequence RESol(eqns, fcns, inits) LREtools[REcreate](eqns, fcns, inits)

Parameters

 eqns - single equation or a set of equations fcns - function name or set of function names inits - set of initial conditions

Description

 • The RESol command calls LREtools[REcreate] to build the RESol data structure.
 • This data structure represents the solution of a recurrence equation.  It is to rsolve and LREtools as DESol is to dsolve and DEtools.
 • The parameters of an RESol are a set of normalized equations, a set of function names and a set of initial conditions.
 • On output, an information table, INFO is added.  The entries in this table are:

 type - the strings 'linear' or 'nonlinear' functions - a name or set of names of the recurrence function(s) vars - a name or set of names of the recurrence variable(s) order - the order of the equation shifteqn - an equation in &Shift[vars](functions) which represents the shift operator associated to the linear recurrence equation coeffs - a list of the rhs of the equation and the coefficients of the shifteqn

 • Note that the first three items are always present, and the next three are there only if the recurrence is linear.

Examples

 > $\mathrm{RESol}\left(\left\{a\left(n+1\right)-a\left(n\right)=n\right\},\left\{a\left(n\right)\right\},\varnothing \right)$
 ${\mathrm{RESol}}{}\left(\left\{{a}{}\left({n}{+}{1}\right){-}{a}{}\left({n}\right){=}{n}\right\}{,}\left\{{a}{}\left({n}\right)\right\}{,}\left\{{a}{}\left({0}\right){=}{a}{}\left({0}\right)\right\}{,}{\mathrm{INFO}}\right)$ (1)
 > $\mathrm{re}≔\mathrm{LREtools}\left[\mathrm{REcreate}\right]\left(a\left(n+2\right)-{n}^{2}a\left(n+1\right)+\left(n-17\right)a\left(n\right)=\mathrm{sin}\left(n\right),a\left(n\right),\left\{a\left(0\right)=0\right\}\right)$
 ${\mathrm{re}}{≔}{\mathrm{RESol}}{}\left(\left\{{a}{}\left({n}{+}{2}\right){-}{{n}}^{{2}}{}{a}{}\left({n}{+}{1}\right){+}\left({n}{-}{17}\right){}{a}{}\left({n}\right){=}{\mathrm{sin}}{}\left({n}\right)\right\}{,}\left\{{a}{}\left({n}\right)\right\}{,}\left\{{a}{}\left({0}\right){=}{0}{,}{a}{}\left({1}\right){=}{a}{}\left({1}\right)\right\}{,}{\mathrm{INFO}}\right)$ (2)
 > $\mathrm{print}\left(\mathrm{op}\left(4,\mathrm{re}\right)\right)$
 ${table}{}\left(\left[{\mathrm{linear}}{=}{\mathrm{true}}{,}{\mathrm{functions}}{=}{a}{,}{\mathrm{coeffs}}{=}\left[{-}{\mathrm{sin}}{}\left({n}\right){,}{n}{-}{17}{,}{-}{{n}}^{{2}}{,}{1}\right]{,}{\mathrm{max_shift}}{=}{2}{,}{\mathrm{min_shift}}{=}{0}{,}{\mathrm{order}}{=}{2}{,}{\mathrm{nonvars}}{=}\left(\right){,}{\mathrm{rhs}}{=}{\mathrm{sin}}{}\left({n}\right){,}{\mathrm{shifteqn}}{=}{{{\mathrm{&Shift}}}_{{n}}{}\left({a}\right)}^{{2}}{-}{{n}}^{{2}}{}{{\mathrm{&Shift}}}_{{n}}{}\left({a}\right){+}{n}{-}{17}{,}{\mathrm{type}}{=}{\mathrm{constcoeffs}}{,}{\mathrm{polycoeffs}}{=}{\mathrm{false}}{,}{\mathrm{vars}}{=}{n}\right]\right)$ (3)
 > $\mathrm{re2}≔\mathrm{LREtools}\left[\mathrm{REcreate}\right]\left({a\left(n+2\right)}^{2}-a\left(n\right)=0,a\left(n\right),\varnothing \right)$
 ${\mathrm{re2}}{≔}{\mathrm{RESol}}{}\left(\left\{{{a}{}\left({n}{+}{2}\right)}^{{2}}{-}{a}{}\left({n}\right){=}{0}\right\}{,}\left\{{a}{}\left({n}\right)\right\}{,}{\varnothing }{,}{\mathrm{INFO}}\right)$ (4)
 > $\mathrm{print}\left(\mathrm{op}\left(4,\mathrm{re2}\right)\right)$
 ${table}{}\left(\left[{\mathrm{linear}}{=}{\mathrm{false}}{,}{\mathrm{functions}}{=}{a}{,}{\mathrm{max_shift}}{=}{2}{,}{\mathrm{min_shift}}{=}{0}{,}{\mathrm{order}}{=}{2}{,}{\mathrm{nonvars}}{=}\left(\right){,}{\mathrm{vars}}{=}{n}\right]\right)$ (5)