gfun[rectodiffeq] - convert a linear recurrence into a differential equation

Calling Sequence

rectodiffeq(eqns, u,n, f,z, <homogeneous=bool>, <operator=name>)

Parameters

eqns - a single equation or a set of equations

u,n - the name and index of the recurrence

f,z - the name and variable of the function

homogeneous - (optional) boolean requesting homogeneous output; the default is false

operator - (optional) name used verbatim as the differential operator

Description

Examples

> 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));
\[\left(a t +10 t^{2}-1\right) f \! \left(t \right)+5 t^{3} \left(\frac{d}{d t}f \! \left(t \right)\right)\]
> diffeqtorec(deq,f(t),u(n));
\[\left(5 n +10\right) u \! \left(n \right)+a u \! \left(n +1\right)-u \! \left(n +2\right)\]
> deq:=rectodiffeq((n-10)*u(n+1)-u(n),u(n),y(z));
\[\left(-z -11\right) y \! \left(z \right)+z \left(\frac{d}{d z}y \! \left(z \right)\right)\]
> dsolve(deq,y(z));
\[y \! \left(z \right) = c_{1} {\mathrm e}^{z} z^{11}\]

See Also

gfun, gfun[parameters], gfun[diffeqtorec], rsolve