gfun - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Mathematics : Discrete Mathematics : Combinatorics : gfun : gfun/rectodiffeq

gfun

 rectodiffeq
 convert a linear recurrence into a differential equation

 Calling Sequence rectodiffeq(eqns, u(n), f(z))

Parameters

 eqns - single equation or set of equations u - name; recurrence name n - name; index of the recurrence u f - name; function name z - name; variable of the function z

Description

 • The rectodiffeq(eqns, u(n), f(z)) command converts a linear recurrence into a differential equation.
 Let f be the generating function associated with the sequence u(n) where $f\left(z\right)=\sum _{n=0}^{\mathrm{\infty }}u\left(n\right){z}^{n}$. The rectodiffeq function returns a linear differential equation with polynomial coefficients satisfied by f.
 • The input syntax is the same as for rsolve.  The first argument is a single recurrence relation or a set containing one recurrence relation and boundary conditions. The recurrence relation is linear in the variable u, with polynomial coefficients in n. The terms of the sequence appearing in the relation should be of the form $u\left(n+k\right)$, with k as an integer.
 • The function returns either a single differential equation, or a set containing a differential equation and initial conditions.

Examples

 > $\mathrm{with}\left(\mathrm{gfun}\right):$
 > $\mathrm{deq}≔\mathrm{rectodiffeq}\left(\left\{\left(5n+10\right)u\left(n\right)+au\left(n+1\right)-u\left(n+2\right),u\left(0\right)=0,u\left(1\right)=0\right\},u\left(n\right),f\left(t\right)\right)$
 ${\mathrm{deq}}{≔}\left({a}{}{t}{+}{10}{}{{t}}^{{2}}{-}{1}\right){}{f}{}\left({t}\right){+}{5}{}{{t}}^{{3}}{}\left(\frac{{ⅆ}}{{ⅆ}{t}}{}{f}{}\left({t}\right)\right)$ (1)
 > $\mathrm{diffeqtorec}\left(\mathrm{deq},f\left(t\right),u\left(n\right)\right)$
 $\left({5}{}{n}{+}{10}\right){}{u}{}\left({n}\right){+}{a}{}{u}{}\left({n}{+}{1}\right){-}{u}{}\left({n}{+}{2}\right)$ (2)
 > $\mathrm{deq}≔\mathrm{rectodiffeq}\left(\left(n-10\right)u\left(n+1\right)-u\left(n\right),u\left(n\right),y\left(z\right)\right)$
 ${\mathrm{deq}}{≔}\left({-}{z}{-}{11}\right){}{y}{}\left({z}\right){+}{z}{}\left(\frac{{ⅆ}}{{ⅆ}{z}}{}{y}{}\left({z}\right)\right)$ (3)
 > $\mathrm{dsolve}\left(\mathrm{deq},y\left(z\right)\right)$
 ${y}{}\left({z}\right){=}{\mathrm{_C1}}{}{{ⅇ}}^{{z}}{}{{z}}^{{11}}$ (4)

 See Also

## Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam