QDifferenceEquations - Maple Programming Help

Home : Support : Online Help : Mathematics : Factorization and Solving Equations : QDifferenceEquations : QDifferenceEquations/PolynomialSolution

QDifferenceEquations

 PolynomialSolution
 return a polynomial solution of a q-difference equation

 Calling Sequence PolynomialSolution(eq, var, inits, output=type)

Parameters

 eq - q-difference equation or a list of such equations (for the system case) var - function variable to solve for, such as $y\left(x\right)$, 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.

Description

 • The PolynomialSolution(eq,var) calling sequence returns the polynomial solutions of the given linear q-difference equation with polynomial coefficients. If such a solution does not exist, then NULL is returned.
 • The PolynomialSolution 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[PolynomialSolution] in order to find solutions.
 • For the scalar case the command computes an indicial equation corresponding to the given equation. The indicial equation is used to bound the degree of the polynomial solution. Then coefficients of the polynomial solution are found either by the undetermined coefficients method for small equations or successively using the indicial equation and the given equation.
 The parameter q in a scalar q-difference equation can be either a name or a rational number.

Output options

 • 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 $[\mathrm{sol1},\mathrm{sol2},...,\mathrm{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 $[[\mathrm{sol1},\mathrm{sol2},...,\mathrm{soln}],\mathrm{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 ${C}_{0},{C}_{1},...,{C}_{n}$, 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.

Examples

 > $\mathrm{with}\left(\mathrm{QDifferenceEquations}\right):$
 > $\mathrm{eq1}≔\left(1-{q}^{10}-\left(q-{q}^{10}\right)x\right)y\left({q}^{2}x\right)-\left(1-{q}^{20}-\left({q}^{2}-{q}^{20}\right)x\right)y\left(qx\right)+{q}^{10}\left(1-{q}^{10}-\left({q}^{2}-{q}^{11}\right)x\right)y\left(x\right)=\left({q}^{21}-{q}^{20}-{q}^{12}+{q}^{10}+{q}^{2}-q\right)x$
 ${\mathrm{eq1}}{≔}\left({1}{-}{{q}}^{{10}}{-}\left({-}{{q}}^{{10}}{+}{q}\right){}{x}\right){}{y}{}\left({{q}}^{{2}}{}{x}\right){-}\left({1}{-}{{q}}^{{20}}{-}\left({-}{{q}}^{{20}}{+}{{q}}^{{2}}\right){}{x}\right){}{y}{}\left({q}{}{x}\right){+}{{q}}^{{10}}{}\left({1}{-}{{q}}^{{10}}{-}\left({-}{{q}}^{{11}}{+}{{q}}^{{2}}\right){}{x}\right){}{y}{}\left({x}\right){=}\left({{q}}^{{21}}{-}{{q}}^{{20}}{-}{{q}}^{{12}}{+}{{q}}^{{10}}{+}{{q}}^{{2}}{-}{q}\right){}{x}$ (1)
 > $\mathrm{sol1}≔\mathrm{PolynomialSolution}\left(\mathrm{eq1},y\left(x\right),\left\{\right\},\mathrm{output}={\mathrm{basis}}_{\mathrm{_K}}\right)$
 ${\mathrm{sol1}}{≔}{{x}}^{{10}}{}{{\mathrm{_K}}}_{{1}}{+}{x}{}{{\mathrm{_K}}}_{{2}}{-}{{\mathrm{_K}}}_{{2}}{+}{1}$ (2)
 > $\mathrm{IsSolution}\left(\mathrm{sol1},\mathrm{eq1},y\left(x\right)\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{PolynomialSolution}\left(\mathrm{eq1},y\left(x\right),\left\{y\left({q}^{10}\right)={q}^{10}\right\},'\mathrm{output}'='\mathrm{basis}'\right)$
 $\left[\left[{{x}}^{{10}}{,}{x}{-}{1}\right]{,}{1}\right]$ (4)
 > $q≔\frac{1}{2}$
 ${q}{≔}\frac{{1}}{{2}}$ (5)
 > $\mathrm{sol1a}≔\mathrm{PolynomialSolution}\left(\mathrm{eq1},y\left(x\right),\left\{y\left({q}^{10}\right)={q}^{10}\right\},'\mathrm{output}'='\mathrm{gensol}'\right)$
 ${\mathrm{sol1a}}{≔}{-}\frac{{1266412660188944021221804081152}}{{523265}}{}{{x}}^{{10}}{+}\frac{{648403282016739338865563689549824}}{{523265}}{}{{x}}^{{10}}{}{y}{}\left(\frac{{1}}{{512}}\right){+}\frac{{512}}{{523265}}{}{x}{}{y}{}\left(\frac{{1}}{{512}}\right){+}\frac{{523264}}{{523265}}{}{x}{-}\frac{{512}}{{523265}}{}{y}{}\left(\frac{{1}}{{512}}\right){+}\frac{{1}}{{523265}}$ (6)
 > $\mathrm{IsSolution}\left(\mathrm{sol1a},\mathrm{eq1},y\left(x\right)\right)$
 ${\mathrm{true}}$ (7)
 > $\mathrm{simplify}\left(\genfrac{}{}{0}{}{\mathrm{sol1a}}{\phantom{x={q}^{10}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}|\phantom{\rule[-0.0ex]{0.1em}{0.0ex}}\genfrac{}{}{0}{}{\phantom{\mathrm{sol1a}}}{x={q}^{10}}-{q}^{10}\right)$
 ${0}$ (8)
 > $q≔'q':$
 > $\mathrm{eq2}≔{q}^{3}\left(qx+1\right)y\left({q}^{2}x\right)-2{q}^{2}\left(x+1\right)y\left(qx\right)+y\left(x\right)\left(x+q\right)=\left({q}^{6}-2{q}^{3}+1\right){x}^{2}+x\left({q}^{5}-2{q}^{3}+q\right)$
 ${\mathrm{eq2}}{≔}{{q}}^{{3}}{}\left({q}{}{x}{+}{1}\right){}{y}{}\left({{q}}^{{2}}{}{x}\right){-}{2}{}{{q}}^{{2}}{}\left({x}{+}{1}\right){}{y}{}\left({q}{}{x}\right){+}{y}{}\left({x}\right){}\left({x}{+}{q}\right){=}\left({{q}}^{{6}}{-}{2}{}{{q}}^{{3}}{+}{1}\right){}{{x}}^{{2}}{+}{x}{}\left({{q}}^{{5}}{-}{2}{}{{q}}^{{3}}{+}{q}\right)$ (9)
 > $\mathrm{sol2}≔\mathrm{PolynomialSolution}\left(\mathrm{eq2},y\left(x\right),\left\{\right\},\mathrm{output}={\mathrm{basis}}_{\mathrm{_C}}\right)$
 ${\mathrm{sol2}}{≔}{x}$ (10)
 > $\mathrm{IsSolution}\left(\mathrm{sol2},\mathrm{eq2},y\left(x\right)\right)$
 ${\mathrm{true}}$ (11)
 > $\mathrm{sys}≔\left[200\mathrm{y2}\left(x\right)qx-200\mathrm{y2}\left(x\right){q}^{2}x-200x\mathrm{y1}\left(x\right)+200x\mathrm{y1}\left(qx\right)+200\mathrm{y1}\left(x\right){q}^{2}x-200\mathrm{y1}\left(qx\right)qx,\mathrm{y2}\left(qx\right)-\mathrm{y1}\left(x\right)\right]$
 ${\mathrm{sys}}{≔}\left[{200}{}{\mathrm{y2}}{}\left({x}\right){}{q}{}{x}{-}{200}{}{\mathrm{y2}}{}\left({x}\right){}{{q}}^{{2}}{}{x}{-}{200}{}{x}{}{\mathrm{y1}}{}\left({x}\right){+}{200}{}{x}{}{\mathrm{y1}}{}\left({q}{}{x}\right){+}{200}{}{\mathrm{y1}}{}\left({x}\right){}{{q}}^{{2}}{}{x}{-}{200}{}{\mathrm{y1}}{}\left({q}{}{x}\right){}{q}{}{x}{,}{\mathrm{y2}}{}\left({q}{}{x}\right){-}{\mathrm{y1}}{}\left({x}\right)\right]$ (12)
 > $\mathrm{vars}≔\left[\mathrm{y1}\left(x\right),\mathrm{y2}\left(x\right)\right]:$
 > $\mathrm{sol3}≔\mathrm{PolynomialSolution}\left(\mathrm{sys},\mathrm{vars},\left\{\right\},\mathrm{output}={\mathrm{basis}}_{\mathrm{_K}}\right)$
 ${\mathrm{sol3}}{≔}\left[{q}{}{x}{}{{\mathrm{_K}}}_{{2}}{+}{{\mathrm{_K}}}_{{1}}{,}{x}{}{{\mathrm{_K}}}_{{2}}{+}{{\mathrm{_K}}}_{{1}}\right]$ (13)
 > $\mathrm{IsSolution}\left(\mathrm{sol3},\mathrm{sys},\mathrm{vars}\right)$
 ${\mathrm{true}}$ (14)

References

 Abramov, S.A. "Problems in Computer Algebra Related to Constructing Solutions to Linear Difference Equations with Polynomial Coefficients." Vest. Moskov. University, Ser.15. Vychisl. Mat. Kibern. No. 3. (1989): 56-60.
 Abramov, S.A.; Bronstein, M.; and Petkovsek, M. "On polynomial solutions of linear operator equations." Proceedings of ISSAC'95, pp. 290-296. ACM Press: New York, 1995.