LREtools
polysols
find polynomial solutions of Linear Recurrence equations
ratpolysols
find rational solutions of Linear Recurrence equations
hypergeomsols
find hypergeometric solutions of Linear Recurrence equations
dAlembertiansols
find d'Alembertian solutions of Linear Recurrence equations
Calling Sequence
Parameters
Description
Options
Examples
References
polysols(problem,output=type)
ratpolysols(problem,output=type)
hypergeomsols(problem,output=type)
dAlembertiansols(problem,output=type)
problem
-
problem statement or RESol
output=type
(optional) where type is one of basis, basis[var], onesol, gensol, or anysol and "var" is a name. The words output, basis, onesol, gensol and anysol must be used literally
The commands find the polynomial, rational, hypergeometric and d'Alembertian solutions of linear recurrence equations with rational polynomial coefficients.
Note that only LREtools[polysols] and LREtools[ratpolysols] are capable of finding solutions for a system of recurrences. Both LREtools[hypergeomsols] and LREtools[dAlembertiansols] can obtain recurrence solutions only for a single equation in a single recurrence variable.
Optionally, you can specify output=basis, output=basis[var], output=onesol, output=gensol, or output=anysol.
output=basis
Requests that independent solutions be provided in the form of a list of independent solutions (the basis). If the input recurrence is homogeneous, then the independent solutions are output in a list as [sol1,sol2,...,soln]. If the input recurrence is inhomogeneous, then the output is a list containing the list of independent solutions in the first element, and a particular solution in the second, as [[sol1,sol2,...,soln],part].
output=basis[var]
This is related to the output=basis form, but rather than providing the output in list form, it is provided as a single algebraic expression that is a var-linear combination of the independent solutions plus any particular solution for the inhomogeneous case. The independent solutions will have indexed coefficients of the form var0,var1,...,varn, where var is as provided in the output=basis[var] option. This is primarily provided for backward compatibility, as the default operation of the basis output used to be as though output=basis[_C] was provided.
output=onesol
This specifies that only a single solution be provided as output. In general, for inhomogeneous recurrences this is a particular solution for the problem, while for homogeneous recurrences this is simply one of the independent solutions for the recurrence.
output=gensol
This specifies that the fully general solution should be obtained for the problem, and will fail if unable to obtain as many independent solutions as the order of the recurrence (regardless of initial conditions). This is the default for systems of recurrences, and for any single recurrences specified in RESol form. The initial conditions are applied once the full solution is obtained.
output=anysol
This specifies that if a solution can be obtained that satisfies the initial conditions, then it should be returned regardless of the number of independent solutions obtained. For example, if no independent solutions can be obtained, but no initial conditions have been specified, then the particular solution is output. This is the default for any single recurrences that are not specified in RESol form.
For the definition of the format of a problem, see the help page for LREtools[REcreate].
As mentioned, the functions polysols and ratpolysols can also solve problems when the input is a system of recurrence relations. They invoke LinearFunctionalSystems[PolynomialSolution] and LinearFunctionalSystems[RationalSolution], respectively.
with⁡LREtools:
rec≔n⁢n+1⁢a⁡n+2−2⁢n⁢n+10⁢a⁡n+1+n+9⁢n+10⁢a⁡n=0:
polysols⁡rec,a⁡n,∅,output=basis
n10−750⁢n8−15120⁢n7−140847⁢n6−740880⁢n5−2304100⁢n4−4142880⁢n3−3904704⁢n2−1451520⁢n,n9+36⁢n8+546⁢n7+4536⁢n6+22449⁢n5+67284⁢n4+118124⁢n3+109584⁢n2+40320⁢n
rec≔a⁡n+2−2⁢n+1⁢a⁡n+1n+n⁢a⁡nn−1=n⁢n+1:
polysols⁡rec,a⁡n,∅,output=onesol
19⁢n4−518⁢n3−19⁢n2+518
Note: This fails because the general solution cannot be obtained.
polysols⁡rec,a⁡n,∅,output=gensol
But with the default, the result is
polysols⁡rec,a⁡n,∅
n49−5⁢n318−n29+1118+a⁡2⁢n−13−a⁡2
rec≔n+1⁢n+3⁢a⁡n+1−2⁢n⁢n+2⁢a⁡n+n2⁢a⁡n−1=a⁡n:
ratpolysols⁡rec,a⁡n,∅,output=basis
1n+2⁢n+1
rec≔n+4⁢a⁡n+2+a⁡n+1−n+1⁢a⁡n:
hypergeomsols⁡rec,a⁡n,a⁡0=1,a⁡1=3
8n+2⁢n+1−2⁢−1n⁢2⁢n+3n+1⁢n+2
rec≔−n−1⁢a⁡n+3+2⁢n⁢a⁡n+1+−n−2⁢a⁡n+2=1n+2:
dAlembertiansols⁡rec,a⁡n,∅,output=basis
1,∑n1=0n−1⁡1n1+1,−∑n1=0n−1⁡∑n2=0n1−1⁡1n2+2n1+1
sys≔y2⁡x⁢x2+3⁢y2⁡x⁢x+2⁢y2⁡x−2⁢y1⁡x⁢x2−4⁢y1⁡x⁢x+y1⁡x+1⁢x2+y1⁡x+1⁢x,y2⁡x+1−y1⁡x:
vars≔y1⁡x,y2⁡x:
polysols⁡sys,vars,∅,output=basis
_C1+x⁢_C1+2⁢_C2+x⁢x−1⁢_C2,x⁢_C1+x⁢x−1⁢_C2
The algorithm Maple uses to compute hypergeometric solutions is based on the following paper.
van Hoeij, M. "Finite Singularities and Hypergeometric Solutions of Linear Recurrence Equations." J. Pure Appl. Algebra. Vol. 139. (1999): 109-131.
See Also
hypergeom
LinearFunctionalSystems[PolynomialSolution]
LinearFunctionalSystems[RationalSolution]
LREtools[REcreate]
RESol
rsolve
Download Help Document