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].
with⁡LREtools:
REtoDE⁡a⁡n+2−2⁢a⁡n+1+a⁡n=0,a⁡n,∅,f⁡z
DESol⁡2⁢f+4⁢z−4⁢D⁡f+z2−2⁢z+1⁢D2⁡f,f
rec≔REcreate⁡a⁡n+2−2⁢a⁡n+1+a⁡n=0,a⁡n,∅
rec≔RESol⁡a⁡n+2−2⁢a⁡n+1+a⁡n=0,a⁡n,a⁡0=a⁡0,a⁡1=a⁡1,INFO
REtoDE⁡rec,f⁡z,output=diff
2⁢f⁡z+4⁢z−4⁢ⅆⅆzf⁡z+z2−2⁢z+1⁢ⅆ2ⅆz2f⁡z
An example with conditions:
REtoDE⁡2⁢n⁢a⁡n+2+n2+1⁢a⁡n+1−n+12⁢a⁡n=0,a⁡n,∅,f⁡z
DESol⁡−8⁢z+8⁢f+−40⁢z2−8⁢D⁡f+−28⁢z3+8⁢z2+8⁢z⁢D2⁡f+−4⁢z4+4⁢z3⁢D3⁡f,f,f⁡0=D⁡f⁡0
REtoDE⁡2⁢n⁢a⁡n+2+n2+1⁢a⁡n+1−n+12⁢a⁡n=0,a⁡n,∅,f⁡z,output=diff
−8⁢z+8⁢f⁡z+−40⁢z2−8⁢ⅆⅆzf⁡z+−28⁢z3+8⁢z2+8⁢z⁢ⅆ2ⅆz2f⁡z+−4⁢z4+4⁢z3⁢ⅆ3ⅆz3f⁡z,f⁡0=D⁡f⁡0
See Also
DESol
dsolve
gfun[diffeqtorec]
gfun[rectodiffeq]
LREtools[REcreate]
RESol
rsolve
Download Help Document