LREtools[HypergeometricTerm] - Maple Programming Help

Home : Support : Online Help : Mathematics : Factorization and Solving Equations : LREtools : HypergeometricTerm : LREtools/HypergeometricTerm/IsSolution

LREtools[HypergeometricTerm]

 IsSolution
 verify whether an expression is a solution of a linear difference equation depending on a hypergeometric term
 AreSameSolution
 verify whether solutions of a linear difference equation depending on a hypergeometric term are equivalent

 Calling Sequence IsSolution(sol, r, eq, var) AreSameSolution(sol, r, sol1, r1, n)

Parameters

 sol - solution to be checked r - hypergeometric term in the solution sol; specified as a list consisting of the name representing the term in the equation and in the solution and the certificate of the term, such as [t, n+1] eq - difference equation depending on a hypergeometric term var - function variable for which to solve, such as y(x) sol1 - solution against which sol is compared r1 - hypergeometric term in the solution sol1; specified as a list consisting of the name representing the term in the equation and in the solution and the certificate of the term, such as [t, n+1] n - independent variable

Description

 • The IsSolution(sol, r, eq, var) command returns true if eq is a linear difference equation with polynomial coefficients depending on a hypergeometric term and sol is its solution. Otherwise, false is returned.
 The IsSolution function substitutes sol for the function variable and checks the result.
 • The AreSameSolution(sol, r, sol1, r1, n) command returns true if the solutions sol and sol1 are equivalent. Otherwise, false is returned.
 The function transforms sol and sol1 to have the same term and checks that the number of linear independent solutions and degrees of corresponding elements in sol and sol1 are the same.

Examples

 > $\mathrm{with}\left({\mathrm{LREtools}}_{\mathrm{HypergeometricTerm}}\right):$
 > $\mathrm{eq}≔y\left(n+2\right)-\left(n!+n\right)y\left(n+1\right)+n\left(n!-1\right)y\left(n\right)$
 ${\mathrm{eq}}{:=}{y}{}\left({n}{+}{2}\right){-}\left({n}{!}{+}{n}\right){}{y}{}\left({n}{+}{1}\right){+}{n}{}\left({n}{!}{-}{1}\right){}{y}{}\left({n}\right)$ (1)
 > $\mathrm{sol},r≔\mathrm{PolynomialSolution}\left(\mathrm{eq},y\left(n\right)\right)$
 ${\mathrm{sol}}{,}{r}{:=}\frac{{t}{}{{\mathrm{_C}}}_{{1}}}{{n}}{,}\left[{t}{,}{n}{+}{1}\right]$ (2)
 > $\mathrm{IsSolution}\left(\mathrm{sol},r,\mathrm{eq},y\left(n\right)\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{sol1}≔t{\mathrm{_C}}_{1}$
 ${\mathrm{sol1}}{:=}{t}{}{{\mathrm{_C}}}_{{1}}$ (4)
 > $\mathrm{r1}≔\left[t,n\right]$
 ${\mathrm{r1}}{:=}\left[{t}{,}{n}\right]$ (5)
 > $\mathrm{IsSolution}\left(\mathrm{sol1},\mathrm{r1},\mathrm{eq},y\left(n\right)\right)$
 ${\mathrm{true}}$ (6)
 > $\mathrm{AreSameSolution}\left(\mathrm{sol1},\mathrm{r1},\mathrm{sol},r,n\right)$
 ${\mathrm{true}}$ (7)
 > $\mathrm{eq}≔\left({2}^{n}n!+{n}^{2}\right)z\left(n+1\right)-\left(2n{2}^{n}n!+2{2}^{n}n!+{n}^{2}+2n+1\right)z\left(n\right)$
 ${\mathrm{eq}}{:=}\left({{2}}^{{n}}{}{n}{!}{+}{{n}}^{{2}}\right){}{z}{}\left({n}{+}{1}\right){-}\left({2}{}{n}{}{{2}}^{{n}}{}{n}{!}{+}{2}{}{{2}}^{{n}}{}{n}{!}{+}{{n}}^{{2}}{+}{2}{}{n}{+}{1}\right){}{z}{}\left({n}\right)$ (8)
 > $\mathrm{sol},r≔\mathrm{PolynomialSolution}\left(\mathrm{eq},z\left(n\right)\right)$
 ${\mathrm{sol}}{,}{r}{:=}{{n}}^{{2}}{}{{\mathrm{_C}}}_{{1}}{+}{t}{}{{\mathrm{_C}}}_{{1}}{,}\left[{t}{,}{2}{}{n}{+}{2}\right]$ (9)
 > $\mathrm{IsSolution}\left(\mathrm{sol},r,\mathrm{eq},z\left(n\right)\right)$
 ${\mathrm{true}}$ (10)
 > $\mathrm{sol1}≔{\mathrm{_C}}_{1}{n}^{2}+tn\left(n-1\right)\left(n-2\right){\mathrm{_C}}_{1}$
 ${\mathrm{sol1}}{:=}{{\mathrm{_C}}}_{{1}}{}{{n}}^{{2}}{+}{t}{}{n}{}\left({n}{-}{1}\right){}\left({n}{-}{2}\right){}{{\mathrm{_C}}}_{{1}}$ (11)
 > $\mathrm{r1}≔\left[t,2n-4\right]$
 ${\mathrm{r1}}{:=}\left[{t}{,}{2}{}{n}{-}{4}\right]$ (12)
 > $\mathrm{IsSolution}\left(\mathrm{sol1},\mathrm{r1},\mathrm{eq},z\left(n\right)\right)$
 ${\mathrm{true}}$ (13)
 > $\mathrm{AreSameSolution}\left(\mathrm{sol1},\mathrm{r1},\mathrm{sol},r,n\right)$
 ${\mathrm{true}}$ (14)
 > $\mathrm{sol2}≔{n}^{2}+tn\left(n-1\right)\left(n-2\right)$
 ${\mathrm{sol2}}{:=}{{n}}^{{2}}{+}{t}{}{n}{}\left({n}{-}{1}\right){}\left({n}{-}{2}\right)$ (15)
 > $\mathrm{IsSolution}\left(\mathrm{sol2},\mathrm{r1},\mathrm{eq},z\left(n\right)\right)$
 ${\mathrm{true}}$ (16)
 > $\mathrm{AreSameSolution}\left(\mathrm{sol2},\mathrm{r1},\mathrm{sol},r,n\right)$
 ${\mathrm{false}}$ (17)