gfun
rectodiffeq
convert a linear recurrence into a differential equation
Calling Sequence
Parameters
Description
Examples
rectodiffeq(eqns, u(n), f(z))
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
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⁡z=∑n=0∞⁡u⁡n⁢zn. 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⁡n+k, with k as an integer.
The function returns either a single differential equation, or a set containing a differential equation and initial conditions.
with⁡gfun:
deq≔rectodiffeq⁡5⁢n+10⁢u⁡n+a⁢u⁡n+1−u⁡n+2,u⁡0=0,u⁡1=0,u⁡n,f⁡t
deq≔a⁢t+10⁢t2−1⁢f⁡t+5⁢t3⁢ⅆⅆtf⁡t
diffeqtorec⁡deq,f⁡t,u⁡n
5⁢n+10⁢u⁡n+a⁢u⁡n+1−u⁡n+2
deq≔rectodiffeq⁡n−10⁢u⁡n+1−u⁡n,u⁡n,y⁡z
deq≔−z−11⁢y⁡z+z⁢ⅆⅆzy⁡z
dsolve⁡deq,y⁡z
y⁡z=c__1⁢ⅇz⁢z11
See Also
dsolve
gfun/parameters
gfun[diffeqtorec]
rsolve
Download Help Document