The QDifferenceEquations Package
The QDifferenceEquations package provides algorithms for solving linear q-difference (q-recurrence) equations or systems in terms of polynomials or rational functions.
Let K be a field and q an indeterminate over K. A linear q-difference equation with polynomial coefficients has the form an⁢Qn⁢y+an−1⁢Qn−1⁢y+...+a1⁢Q⁢y+a0⁢y=b , where an,an−1,...,a1,a0,b are polynomials in x with coefficients from K⁡q and Q is the q-shift operator Qi⁢y⁡x=y⁡qi⁢x for all integers i . (This is a multiplicative analog of the ordinary shift operator Ei⁢y⁡x=y⁡x+i .)
The goal is to find all solutions y that are polynomials or rational functions with coefficients from K⁡q. More generally, a system of such equations has the same form as above, but now y is a vector of m unknown functions, a[n], ..., a, which are m by k matrices with polynomial entries, and b is a vector with k polynomial entries. As in the case of (systems of) ordinary difference equations, the polynomial (or rational) solutions form a finite-dimensional vector space over K⁡q .
Note: The Maple LREtools package provides methods for solving ordinary difference equations or systems. For information on solving systems of ordinary or q-difference equations, see the LinearFunctionalSystems package.
To illustrate the connection between ordinary and q-difference equations, a simple example is provided. Consider the recurrence equation y⁡q⁢x=q2⁢y⁡x+x. Substituting qx for x and letting z⁡x=y⁡qx, you obtain the ordinary difference equation z⁡x+1=q2⁢z⁡x+qx. Use LREtools to solve this recurrence equation.
Here, z⁡0 represents an arbitrary constant. But you can also solve the original q-difference equation. In the notation from above, you have n=1, a1=1, a0=−q2, and b=x :
The arbitrary constant is represented by _C1 in this case, and after substituting qx for x, this solution is equivalent to the one above, which uses a slightly different parametrization.
Commands Exported by QDifference Equations
The remainder of this worksheet describes the commands exported by QDifferenceEquations.
In analogy to LREtools[REcreate], the QECreate command returns a data structure with a normalized representation of the input equation(s) together with some useful information, for example, whether the equation is linear, the order of the equation, and the list of coefficients. This information is used internally by the other commands in the package.
This works for non-linear equations, with less information, though.
Q2 ≔ QECreatey⁡q⁢x⁢y⁡x=y⁡x+1,y⁡x
Here is an example of a system of linear q-difference equations.
The PolynomialSolution command computes all polynomial solutions of a given q-difference equation. It returns them in the form of a general solution involving arbitrary constants _C0,_C1,... . The number of these constants is equal to the dimension of the space of all polynomial solutions and is generally less or equal to the order n of the equation. If it is strictly less, then the equation has non-polynomial solutions.
Using IsSolution, verify this solution for values of _C1:
If IsSolution is applied to an expression that does not solve the given equation, then it returns the degree of the difference of both sides of the equation.
The q-difference equation qe has order two, but the polynomial solution space has dimension only one, so there are non-polynomial solutions. All solutions of this equation are rational.
Both PolynomialSolution and RationalSolution work for systems of linear q-difference equations.
The AreSameSolution command checks whether two given general solutions of a q-difference equation are equivalent, that is, they describe the same solution space. The command assumes that both its arguments solve the equation, but does not check this.
The q-dispersion of two polynomials f,g is defined analogously to the dispersion in the ordinary difference case, namely as the maximal non-negative integer d such that Qd⁢f and g have a nonconstant common divisor (that is, a common root). However, powers of the independent variable (that is, the root 0) are excluded. More generally, the set of all such non-negative integers is called the q-dispersion set of f and g. The QDispersion command returns this set, or if the option maximal is specified, it returns the q-dispersion. If no such d exists, or if the only common divisors are powers of the independent variable, FAIL is returned.
The UniversalDenominator command computes a common multiple of the denominators of all rational solutions of a given q-difference equation.
Return to Index for Example Worksheets
Download Help Document
What kind of issue would you like to report? (Optional)