QDifferenceEquations
RationalSolution
return a rational solution of a q-difference equation
Calling Sequence
Parameters
Description
Output options
Examples
References
RationalSolution(eq, var, inits, output=type, 'minimize')
eq
-
q-difference equation or a list of such equations (for the system case)
var
function variable to solve for, such as y⁡x, or a list of such function variables (for the system case)
inits
set of initial conditions
output=type
(optional) where type is one of basis, basis[C], onesol, gensol, or anysol and "C" is a name. The words output, basis, onesol, gensol and anysol must be used literally.
'minimize'
(optional) indicates the universal denominator minimization algorithm must be used
The RationalSolution(eq, var) calling sequence returns the rational solutions of the given linear q-difference equation with polynomial coefficients. If such a solution does not exist, then NULL is returned.
The RationalSolution command solves the problem with a single q-difference equation and also with a system of such equations. In the latter case, the command invokes LinearFunctionalSystems[RationalSolution] in order to find solutions.
For the scalar case, the command computes a universal denominator and reduces the problem given to the problem of searching for polynomial solution, which is solved by PolynomialSolution.
If the option 'minimize' is specified, the command applies the universal denominator minimization algorithm by D.E. Khmelnov to try to lower the degree of the universal denominator found by the algorithm by S.A. Abramov. The goal is not always achieved, but if the degree of the universal denominator is lowered, then the problem of searching for numerator of the rational solution is simplified. This could lead to an overall gain in efficiency for finding the solution.
The parameter q in a scalar q-difference equation can be either a name or a rational number.
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[C]
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 C-linear combination of the independent solutions plus any particular solution for the inhomogeneous case. The independent solutions will have indexed coefficients of the form C0,C1,...,Cn, where C is as provided in the output=basis[C] option.
output=onesol
This specifies that only a single solution be provided as output.
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). 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.
with⁡QDifferenceEquations:
eq1≔q3⁢q⁢x+1⁢y⁡q2⁢x−2⁢q2⁢x+1⁢y⁡q⁢x+y⁡x⁢x+q=q6−2⁢q3+1⁢x2+x⁢q5−2⁢q3+q
sol1≔RationalSolution⁡eq1,y⁡x,∅,output=basis_K
sol1≔q⁢x2+x3+_K1x⁢x+q
IsSolution⁡sol1,eq1,y⁡x
true
alias⁡β=RootOf⁡x2−2:
eq2≔q3⁢q⁢x⁢β+1⁢y⁡q2⁢x−2⁢q2⁢x+1⁢y⁡q⁢x+y⁡x⁢x⁢β+q=q6−2⁢q3+1⁢x2+x⁢q5−2⁢q3+q:
sol2≔RationalSolution⁡eq2,y⁡x,∅,output=basis_C
sol2≔β2⁢q13⁢x+β2⁢q12⁢x2−β⁢q14−β⁢q13⁢x−β2⁢q11⁢x+β2⁢q10⁢x2+2⁢β⁢q13−2⁢β⁢q12⁢x−2⁢β⁢q11⁢x2+q14−2⁢β2⁢q9⁢x2+β⁢q12+β⁢q11⁢x−2⁢β⁢q10⁢x2−2⁢q13+2⁢q12⁢x−β2⁢q9⁢x+β2⁢q8⁢x2−4⁢β⁢q11+4⁢β⁢q10⁢x−q12−2⁢β2⁢q7⁢x2+β⁢q10+β⁢q9⁢x+2⁢β⁢q8⁢x2+4⁢q11−4⁢q10⁢x+4⁢q9⁢x2+2⁢β2⁢q7⁢x+2⁢β2⁢q6⁢x2+2⁢β⁢q9−2⁢β⁢q8⁢x+2⁢β⁢q7⁢x2−q10−2⁢β2⁢q5⁢x2−2⁢β⁢q8−2⁢β⁢q7⁢x−2⁢q9+2⁢q8⁢x−β2⁢q5⁢x+β2⁢q4⁢x2+2⁢β⁢q7−2⁢β⁢q6⁢x+2⁢β⁢q5⁢x2+2⁢q8−8⁢q6⁢x2−2⁢β2⁢q3⁢x2+β⁢q6+β⁢q5⁢x+2⁢β⁢q4⁢x2−2⁢q7+2⁢q6⁢x−β2⁢q3⁢x+β2⁢q2⁢x2−4⁢β⁢q5+4⁢β⁢q4⁢x−q6+β⁢q4+β⁢q3⁢x−2⁢β⁢q2⁢x2+4⁢q5−4⁢q4⁢x+4⁢q3⁢x2+β2⁢q⁢x+β2⁢x2+2⁢q3⁢β−2⁢β⁢q2⁢x−2⁢β⁢q⁢x2−q4−β⁢q2−q⁢x⁢β−2⁢q3+2⁢q2⁢x+q2x⁢β⁢q6−2⁢q3+β⁢β⁢q4−2⁢q2+β⁢β⁢q2+β−2⁢q
IsSolution⁡sol2,eq2,y⁡x
eq3≔q4⁢x−1⁢x⁢q7−1⁢y⁡x⁢x2+2⁢y⁡x⁢q⁢x+y⁡x⁢q2−y⁡x⁢q3⁢x2⁢q11−y⁡x⁢q3⁢q⁢x−y⁡x⁢q3⁢x⁢q10−y⁡x⁢q3=−x⁢x2⁢q14+q8⁢x2+q3+x11+x⁢q9−x⁢q7+x⁢q13+q4⁢x−x2−x3⁢q18+q7⁢x3−q17⁢x2+2⁢x10⁢q−x12⁢q7−2⁢x11⁢q8−q2−2⁢q⁢x+q44⁢x11−q40⁢x10+q34⁢x10−q30⁢x9+q35⁢x11−q9⁢x10−x11⁢q41−x10⁢q31+q45⁢x12+q2⁢x9
eq3≔q4⁢x−1⁢q7⁢x−1⁢y⁡x⁢x2+2⁢y⁡x⁢q⁢x+y⁡x⁢q2−y⁡q3⁢x⁢x2⁢q11−y⁡q3⁢x⁢q⁢x−y⁡q3⁢x⁢x⁢q10−y⁡q3⁢x=−x⁢q45⁢x12+q44⁢x11−x11⁢q41−q40⁢x10+q35⁢x11+q34⁢x10−x10⁢q31−q30⁢x9−q18⁢x3−q17⁢x2−q9⁢x10−2⁢x11⁢q8−x12⁢q7+q14⁢x2+q13⁢x+q2⁢x9+2⁢x10⁢q+x11+q9⁢x+q8⁢x2+q7⁢x3−q7⁢x+q4⁢x+q3−q2−2⁢q⁢x−x2
sol3≔RationalSolution⁡eq3,y⁡x,∅,output=basis_T
sol3≔x9−1⁢xq4⁢x−1
IsSolution⁡sol3,eq3,y⁡x
sys≔y2⁡q⁢x−y1⁡x,100⁢y2⁡x⁢q⁢x+10000⁢y2⁡x⁢q−100⁢y2⁡x⁢x−10000⁢y2⁡x−100⁢q3⁢y1⁡x⁢x−10000⁢q2⁢y1⁡x+100⁢q4⁢y1⁡q⁢x⁢x+10000⁢y1⁡q⁢x⁢q2−100⁢y1⁡q⁢x⁢q3⁢x−10000⁢y1⁡q⁢x⁢q+100⁢y1⁡x⁢q⁢x+10000⁢y1⁡x
vars≔y1⁡x,y2⁡x:
sol4≔RationalSolution⁡sys,vars,∅,output=basis_K
sol4≔x⁢_K2+_K1q⁢x+100⁢x,q⁢_K1+x⁢_K2x+100⁢x
IsSolution⁡sol4,sys,vars
q≔−2
eq4≔2⁢q2+x⁢y⁡x+q2+x⁢q4⁢y⁡x⁢q3+2+q⁢x⁢y⁡q⁢x+2⁢y⁡x⁢q2⁢1+x⁢q2⁢1+q5⁢x⁢1+x⁢q3⁢1+x⁢q4=x⁢x2+2⁢q3+3⁢q4+q7+2⁢q5⁢x+4⁢x⁢q2+2⁢q6⁢x+q8⁢x2+x3⁢q3+3⁢x⁢q4+q3⁢x2+2⁢x3⁢q5+7⁢x2⁢q9+7⁢x3⁢q11+x3⁢q4+5⁢q9⁢x+6⁢x2⁢q7+5⁢q7⁢x+8⁢q12⁢x2+2⁢x2⁢q5+3⁢x3⁢q10+2⁢q15⁢x4+q19⁢x5+7⁢q14⁢x3+3⁢q13⁢x3+2⁢q17⁢x4+q18⁢x4+3⁢q12⁢x3+q16⁢x4+4⁢q10⁢x2+3⁢x3⁢q8+q10⁢x4+q11⁢x+q10⁢x+q14⁢x2+2⁢q15⁢x3+x3⁢q7+4⁢x4⁢q14+x4⁢q7+2⁢x4⁢q9+x5⁢q12+x4⁢q8+4⁢q8⁢x+5⁢q11⁢x2+3⁢q13⁢x2+3⁢q16⁢x3+7⁢x2⁢q6+6⁢x3⁢q9+q14⁢x5+2⁢x4⁢q13+q12⁢x4+2⁢x2⁢q4
eq4≔2⁢x+4⁢y⁡x+16⁢x+4⁢y⁡−8⁢x+−2⁢x+2⁢y⁡−2⁢x+2⁢y⁡4⁢x⁢4⁢x+1⁢−32⁢x+1⁢−8⁢x+1⁢16⁢x+1=x⁢−503808⁢x5+53376⁢x4+219720⁢x3+14745⁢x2−3072⁢x−96
RationalSolution⁡eq4,y⁡x,∅,output=basis
,x⁢x+42⁢4⁢x+1
sol5≔RationalSolution⁡eq4,y⁡x,y⁡q2=q41+q4,output=anysol
sol5≔x⁢x+42⁢4⁢x+1
IsSolution⁡sol5,eq4,y⁡x
RationalSolution⁡eq4,y⁡x,y⁡q2=q41+q4,output=gensol
Abramov, S.A. "Rational Solutions to Linear Difference and q-Difference Equations with Polynomial Coefficients." Programmirovanie. No. 6. (1995): 3-11.
Khmelnov, D.E. "Improved Algorithms for Solving Difference and q-Difference Equations." Programming and Computer Software. Vol. 26 No. 2. (2000): 107-115. Translated from Programmirovanie. No. 2. 2000.
See Also
LinearFunctionalSystems[RationalSolution]
QDifferenceEquations[PolynomialSolution]
QDifferenceEquations[UniversalDenominator]
Download Help Document