LREtools
REtoDE
convert a recurrence into a differential equation
Calling Sequence
Parameters
Description
Examples
REtoDE(problem, f(z))
REtoDE(problem, f(z), output=val)
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
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].
withLREtools:
REtoDEan+2−2an+1+an=0,an,∅,fz
DESol2f+4z−4Df+z2−2z+1D2f,f
rec≔REcreatean+2−2an+1+an=0,an,∅
rec≔RESolan+2−2an+1+an=0,an,a0=a0,a1=a1,INFO
REtoDErec,fz,output=diff
2fz+4z−4ⅆⅆzfz+z2−2z+1ⅆ2ⅆz2fz
An example with conditions:
REtoDE2nan+2+n2+1an+1−n+12an=0,an,∅,fz
DESol−8z+8f+−40z2−8Df+−28z3+8z2+8zD2f+−4z4+4z3D3f,f,f0=Df0
REtoDE2nan+2+n2+1an+1−n+12an=0,an,∅,fz,output=diff
−8z+8fz+−40z2−8ⅆⅆzfz+−28z3+8z2+8zⅆ2ⅆz2fz+−4z4+4z3ⅆ3ⅆz3fz,f0=Df0
See Also
DESol
dsolve
gfun[diffeqtorec]
gfun[rectodiffeq]
LREtools[REcreate]
RESol
rsolve
Download Help Document