Overview of the LREtools Package - Maple Programming Help

Home : Support : Online Help : Mathematics : Packages : LREtools

Overview of the LREtools Package

 Calling Sequence LREtools[command](arguments) command(arguments)

Description

 • The LREtools package contains commands to manipulate and find certain types of solutions of Linear Recurrence Equations.
 • The name LRETools can be used as a synonym for LREtools.
 • Each command in the LREtools package can be accessed by using either the long form or the short form of the command name in the command calling sequence.

List of LREtools Package Commands

 • The following is a list of available commands.

 To display the help page for a particular LREtools command, see Getting Help with a Command in a Package.

List of LREtools Subpackages

 • The following is a list of available subpackages.

Examples

 > $\mathrm{LREtools}[\mathrm{REtodelta}]\left(u\left(n+2\right)-2u\left(n+1\right)+u\left(n\right),u\left(n\right),\left\{\right\}\right)$
 ${{{\mathrm{LREtools}}}_{{\mathrm{Δ}}}}_{{n}}^{{2}}$ (1)
 > $\mathrm{rec}≔a\left(n+2\right)-\frac{\left(2n+1\right)a\left(n+1\right)}{n}+\frac{na\left(n\right)}{n-1}=n\left(n+1\right):$
 > $\mathrm{re}≔\mathrm{LREtools}[\mathrm{REcreate}]\left(\mathrm{rec},a\left(n\right),\left\{\right\}\right)$
 ${\mathrm{re}}{:=}{\mathrm{RESol}}{}\left(\left\{{{n}}^{{2}}{}{a}{}\left({n}\right){+}\left({-}{2}{}{{n}}^{{2}}{+}{n}{+}{1}\right){}{a}{}\left({n}{+}{1}\right){+}\left({{n}}^{{2}}{-}{n}\right){}{a}{}\left({n}{+}{2}\right){=}{{n}}^{{2}}{}\left({n}{-}{1}\right){}\left({n}{+}{1}\right)\right\}{,}\left\{{a}{}\left({n}\right)\right\}{,}\left\{{a}{}\left({1}\right){=}{0}{,}{a}{}\left({2}\right){=}{a}{}\left({2}\right){,}{a}{}\left({3}\right){=}{a}{}\left({3}\right)\right\}{,}{\mathrm{INFO}}\right)$ (2)
 > $\mathrm{LREtools}[\mathrm{polysols}]\left(\mathrm{re},\mathrm{output}=\mathrm{basis}\right)$
 $\left[\left[{n}{-}{1}\right]{,}\frac{{1}}{{9}}{}{{n}}^{{4}}{-}\frac{{5}}{{18}}{}{{n}}^{{3}}{-}\frac{{1}}{{9}}{}{{n}}^{{2}}{+}\frac{{5}}{{18}}\right]$ (3)
 > $f≔\mathrm{LREtools}[\mathrm{REtoproc}]\left(\left(1-{n}^{2}\right)u\left(n+1\right)+\frac{3u\left(n-1\right)}{2}+\left(\frac{1}{2}+\frac{3n}{2}+{n}^{2}\right)u\left(n\right),u\left(n\right),\left\{u\left(0\right)=1,u\left(2\right)=a\right\}\right)$
 ${f}{:=}{\mathbf{proc}}\left({n}{::}{\mathrm{nonnegint}}{,}{}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{local}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{i}{,}{\mathrm{u0}}{,}{\mathrm{u1}}{,}{\mathrm{u2}}{;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{u0}}{:=}{−}{1}{/}{2}{;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{u1}}{:=}{a}{;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{if}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{n}{=}{1}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{then}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{u0}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{elif}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{n}{=}{2}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{then}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{u1}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{else}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{for}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{i}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{from}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{3}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{to}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{n}{-}{1}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{do}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{u2}}{:=}{−}\left({3}{*}{\mathrm{u0}}{+}\left({2}{*}{\mathrm{u1}}{*}{i}{-}{\mathrm{u1}}\right){*}{i}\right){/}\left(\left({4}{-}{2}{*}{i}\right){*}{i}\right){;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{u0}}{:=}{\mathrm{u1}}{;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{u1}}{:=}{\mathrm{u2}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end do}}{;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{−}\left({3}{*}{\mathrm{u0}}{+}\left({2}{*}{\mathrm{u1}}{*}{n}{-}{\mathrm{u1}}\right){*}{n}\right){/}\left(\left({4}{-}{2}{*}{n}\right){*}{n}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end if}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (4)
 > $f\left(10\right)$
 $\frac{{86773903}}{{3440640}}{}{a}{-}\frac{{41665019}}{{17203200}}$ (5)
 > $\mathrm{LREtools}[\mathrm{REtoDE}]\left(\left(18+12n\right)t\left(n\right)+\left(-20-7n\right)t\left(n+1\right)+\left(4+n\right)t\left(n+2\right),t\left(n\right),\left\{t\left(0\right)=0,t\left(1\right)=2\right\},y\left(z\right)\right)$
 ${\mathrm{DESol}}{}\left(\left\{\left({-}{18}{}{{z}}^{{2}}{+}{13}{}{z}{-}{2}\right){}{y}{+}\left({-}{12}{}{{z}}^{{3}}{+}{7}{}{{z}}^{{2}}{-}{z}\right){}{\mathrm{D}}{}\left({y}\right){+}{6}{}{z}\right\}{,}\left\{{y}\right\}{,}\left\{{y}{}\left({0}\right){=}{0}{,}{\mathrm{D}}{}\left({y}\right){}\left({0}\right){=}{2}\right\}\right)$ (6)