gfun[diffeqtorec] - convert a linear differential equation into a recurrence
Calling Sequence
diffeqtorec(deq, y(z), u(n), <homogeneous=bool>, <operator=name>)
Parameters
deq - linear differential equation in y(z) with polynomial coefficients
y,z - name and variable of the function
u,n - name and index of the recurrence
homogeneous - (optional) boolean requesting that the output be homogeneous; the default is false
operator - (optional) name used verbatim as the shift operator
Description
- Let
fbe a power series solution of the differential equation. Ifu(n)is the n-th Taylor coefficient offaround zero, the procedure outputs a linear recurrence for the numbersu(n), with rational coefficients inn. - The syntax is the same as that of dsolve. Combined with algeqtodiffeq, this procedure produces a linear recurrence for the Taylor coefficients of an algebraic function.
- With
operator=name, recurrence initial conditions are not computed. Homogeneous output is a polynomial in the supplied name and inhomogeneous output has the formL(name)=q.
Examples
> with(gfun):
diffeqtorec(y(z)=a*diff(y(z),z),y(z),v(n));
\[v \! \left(n \right)+\left(-a n -a \right) v \! \left(n +1\right)\]
> deq:=algeqtodiffeq(y=1+z*(y^2+y^3),y(z),{}):
diffeqtorec(deq,y(z),u(m));
\[\{\left(2 m^{2}+m \right) u \! \left(m \right)+\left(18 m^{2}+30 m +9\right) u \! \left(m +1\right)+\left(-46 m^{2}-227 m -279\right) u \! \left(m +2\right)+\left(4 m^{2}+26 m +42\right) u \! \left(m +3\right), u \! \left(0\right) = 1, u \! \left(1\right) = 2, u \! \left(2\right) = 10\}\]
See Also
gfun, gfun[algeqtodiffeq], gfun[rectodiffeq], dsolve, dsolve[formal_series]