REtoDE - Maple Help

LREtools

 REtoDE
 convert a recurrence into a differential equation

 Calling Sequence REtoDE(problem, f(z)) REtoDE(problem, f(z), output=val)

Parameters

 problem - either a RESol recurrence structure, or a recurrence definition f(z) - name and variable of the function output=val - form of the output, where output=DESol or output=diff

Description

 • This routine returns the differential operator or differential equation satisfied by the generating function associated to the recurrence. This operator is returned as either a DESol operator or a differential equation (both possibly with initial conditions). No attempt is made to explicitly solve the result.
 • For the definition of the format of a problem, see the help page for LREtools[REcreate]. The problem can be an RESol structure resulting from a call to LREtools[REcreate].
 • The output option val can be either DESol which requests operator output (the default) or diff which requests the output in terms of a differential system.
 Note: In some cases initial conditions are also needed, so the output=diff result is returned as a set. If no initial conditions are needed, the output is a single ODE.
 Note: This command performs the same operation as gfun[rectodiffeq] and the inverse operation is provided by gfun[diffeqtorec].

Examples

 > $\mathrm{with}\left(\mathrm{LREtools}\right):$
 > $\mathrm{REtoDE}\left(a\left(n+2\right)-2a\left(n+1\right)+a\left(n\right)=0,a\left(n\right),\varnothing ,f\left(z\right)\right)$
 ${\mathrm{DESol}}{}\left(\left\{{2}{}{f}{+}\left({4}{}{z}{-}{4}\right){}{\mathrm{D}}{}\left({f}\right){+}\left({{z}}^{{2}}{-}{2}{}{z}{+}{1}\right){}{{\mathrm{D}}}^{\left({2}\right)}{}\left({f}\right)\right\}{,}\left\{{f}\right\}\right)$ (1)
 > $\mathrm{rec}≔\mathrm{REcreate}\left(a\left(n+2\right)-2a\left(n+1\right)+a\left(n\right)=0,a\left(n\right),\varnothing \right)$
 ${\mathrm{rec}}{≔}{\mathrm{RESol}}{}\left(\left\{{a}{}\left({n}{+}{2}\right){-}{2}{}{a}{}\left({n}{+}{1}\right){+}{a}{}\left({n}\right){=}{0}\right\}{,}\left\{{a}{}\left({n}\right)\right\}{,}\left\{{a}{}\left({0}\right){=}{a}{}\left({0}\right){,}{a}{}\left({1}\right){=}{a}{}\left({1}\right)\right\}{,}{\mathrm{INFO}}\right)$ (2)
 > $\mathrm{REtoDE}\left(\mathrm{rec},f\left(z\right),\mathrm{output}=\mathrm{diff}\right)$
 ${2}{}{f}{}\left({z}\right){+}\left({4}{}{z}{-}{4}\right){}\left(\frac{{ⅆ}}{{ⅆ}{z}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({z}\right)\right){+}\left({{z}}^{{2}}{-}{2}{}{z}{+}{1}\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{z}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({z}\right)\right)$ (3)

An example with conditions:

 > $\mathrm{REtoDE}\left(2na\left(n+2\right)+\left({n}^{2}+1\right)a\left(n+1\right)-{\left(n+1\right)}^{2}a\left(n\right)=0,a\left(n\right),\varnothing ,f\left(z\right)\right)$
 ${\mathrm{DESol}}{}\left(\left\{\left({-}{8}{}{z}{+}{8}\right){}{f}{+}\left({-}{40}{}{{z}}^{{2}}{-}{8}\right){}{\mathrm{D}}{}\left({f}\right){+}\left({-}{28}{}{{z}}^{{3}}{+}{8}{}{{z}}^{{2}}{+}{8}{}{z}\right){}{{\mathrm{D}}}^{\left({2}\right)}{}\left({f}\right){+}\left({-}{4}{}{{z}}^{{4}}{+}{4}{}{{z}}^{{3}}\right){}{{\mathrm{D}}}^{\left({3}\right)}{}\left({f}\right)\right\}{,}\left\{{f}\right\}{,}\left\{{f}{}\left({0}\right){=}{\mathrm{D}}{}\left({f}\right){}\left({0}\right)\right\}\right)$ (4)
 > $\mathrm{REtoDE}\left(2na\left(n+2\right)+\left({n}^{2}+1\right)a\left(n+1\right)-{\left(n+1\right)}^{2}a\left(n\right)=0,a\left(n\right),\varnothing ,f\left(z\right),\mathrm{output}=\mathrm{diff}\right)$
 $\left\{\left({-}{8}{}{z}{+}{8}\right){}{f}{}\left({z}\right){+}\left({-}{40}{}{{z}}^{{2}}{-}{8}\right){}\left(\frac{{ⅆ}}{{ⅆ}{z}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({z}\right)\right){+}\left({-}{28}{}{{z}}^{{3}}{+}{8}{}{{z}}^{{2}}{+}{8}{}{z}\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{z}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({z}\right)\right){+}\left({-}{4}{}{{z}}^{{4}}{+}{4}{}{{z}}^{{3}}\right){}\left(\frac{{{ⅆ}}^{{3}}}{{ⅆ}{{z}}^{{3}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({z}\right)\right){,}{f}{}\left({0}\right){=}{\mathrm{D}}{}\left({f}\right){}\left({0}\right)\right\}$ (5)