 firstlin - Maple Help

LREtools

 firstlin
 find solutions of First Order Linear Recurrence Equations Calling Sequence firstlin(problem) Parameters

 problem - problem statement or RESol Description

 • Solves first order, linear recurrence equations.
 • A first order linear recurrence equation in y(k) is $A\left(k\right)y\left(k+1\right)+B\left(k\right)y\left(k\right)=C\left(k\right)$ where A(k), B(k), and C(k) are independent of y(k).
 • If A(k) is undefined for some k, then a set of equations may be returned, giving values of y(k) for specific k as well as the general formula.
 • See the help page for LREtools[REcreate] for the definition of the format of a problem. Examples

 > $\mathrm{with}\left(\mathrm{LREtools}\right):$
 > $\mathrm{prob}≔\mathrm{REcreate}\left(\left\{y\left(k+1\right)-by\left(k\right)=a\right\},\left\{y\left(k\right)\right\},\left\{y\left(0\right)=c-\frac{a}{b-1}\right\}\right)$
 ${\mathrm{prob}}{≔}{\mathrm{RESol}}{}\left(\left\{{y}{}\left({k}{+}{1}\right){-}{b}{}{y}{}\left({k}\right){=}{a}\right\}{,}\left\{{y}{}\left({k}\right)\right\}{,}\left\{{y}{}\left({0}\right){=}{-}\frac{{-}{c}{}{b}{+}{a}{+}{c}}{{b}{-}{1}}\right\}{,}{\mathrm{INFO}}\right)$ (1)
 > $\mathrm{firstlin}\left(\mathrm{prob}\right)$
 ${-}\frac{{{b}}^{{k}}{}{a}{}{\left(\frac{{1}}{{b}}\right)}^{{k}}{-}{{b}}^{{k}{+}{1}}{}{c}{+}{{b}}^{{k}}{}{c}}{{b}{-}{1}}$ (2)
 > $\mathrm{firstlin}\left(\left\{y\left(k+3\right)-\mathrm{exp}\left(2k+4\right)y\left(k+2\right)=0\right\},\left\{y\left(k\right)\right\},\varnothing \right)$
 ${{ⅇ}}^{{k}{}\left({k}{-}{1}\right)}{}{y}{}\left({0}\right)$ (3)
 > $\mathrm{firstlin}\left(u\left(n+1\right)=\frac{2u\left(n\right)\left(n+1\right)}{n},u\left(n\right),\varnothing \right)$
 $\left\{{u}{}\left({0}\right){=}{0}{,}{u}{}\left({n}\right){=}{{2}}^{{n}{-}{1}}{}{n}{}{u}{}\left({1}\right)\right\}$ (4)