gfun[listtodiffeq] - find a linear differential equation for the generating function
gfun[seriestodiffeq] - find a linear differential equation satisfied by a series
Calling Sequence
listtodiffeq(l, y(x), <[typelist]>, <operator=op>, <homogeneous=bool>)
seriestodiffeq(s, y(x), <[typelist]>, <operator=op>, <homogeneous=bool>)
Parameters
l - a list
s - a series
y,z - the name of the unknown function and the generic variable
[typelist] - (optional) a list of generating function types
operator=op - (optional) output form, where op is equation or a name
homogeneous=bool - (optional) request a homogeneous or inhomogeneous relation; the default is true
Description
- The procedures
listtodiffeqandseriestodiffeqcompute a linear differential equation iny(x)with polynomial coefficients inxsatisfied by the generating functiony(x)of the expressions inlors. The generating function type is one of the types specified bytypelist, for example ordinary (ogf) or exponential (egf). For a full list of available choices see gftypes. - If
typelistcontains more than one element, these types are tried in order. - If
typelistis not provided, the defaultoptionsgf, initially['ogf'], is used. Without an explicittypelistoroptionsgfoption, the output is the equation with its initial conditions. When a type list is supplied, the output is tagged with the type for which an equation was found. - The default
operator=equationreturns the differential equation and its initial conditions. Ifoperatoris set to a name, for exampleoperator=Dx, the result is instead a polynomial inDx, representing the differential operator obtained by replacing each derivative of orderibyDx^i. Initial conditions are omitted from this form. If a generating function type was explicitly supplied, the operator polynomial is tagged with that type. - With
homogeneous=false, the constant series is included directly in the Hermite-Pade search. In equation form the returned relation may therefore have a nonzero term independent ofy. In operator form the result is an equationL=-q, whereLis the operator acting on the unknown series andqis the independent term. - The search is controlled by the options
minordereqn,maxordereqn,maxdegcoeffs,maxtotaldegree,checkterms,mode, andmodulo. Withmaxtotaldegree=T, the search restricts the total degree of the differential operator, counting a termx^j Dx^iwith degreei+j. Thus the coefficient ofDx^istarts with degree boundT-i. For more information on these options, see gfun[parameters]. - If sufficiently many terms were given and no solution was found, it means that no equation was found within the requested order, degree, coefficient-size, and validation bounds.
Examples
> with(gfun):
l:=[1,2,6,22,91,408,1938,9614,49335,260130,1402440,7702632,42975796,243035536,1390594458,8038677054,46892282815,275750636070,1633292229030,9737153323590]:
listtodiffeq(l,y(x));
\[\{60 y \! \left(x \right)+\left(276 x -30\right) \left(\frac{d}{d x}y \! \left(x \right)\right)+\left(189 x^{2}-26 x \right) \left(\frac{d^{2}}{d x^{2}}y \! \left(x \right)\right)+\left(27 x^{3}-4 x^{2}\right) \left(\frac{d^{3}}{d x^{3}}y \! \left(x \right)\right), y \! \left(0\right) = 1, D\! \left(y \right)\! \left(0\right) = 2, D^{\left(2\right)}\! \left(y \right)\! \left(0\right) = 12\}\]
> listtodiffeq(l,y(x),operator=Dx);
\[60+\left(276 x -30\right) \mathit{Dx} +\left(189 x^{2}-26 x \right) \mathit{Dx}^{2}+\left(27 x^{3}-4 x^{2}\right) \mathit{Dx}^{3}\]
> s:=series(exp(x)/sqrt(1-x),x,7);
\[1+\frac{3}{2} x +\frac{11}{8} x^{2}+\frac{53}{48} x^{3}+\frac{115}{128} x^{4}+\frac{2947}{3840} x^{5}+\frac{31411}{46080} x^{6}+\mathrm{O}\! \left(x^{7}\right)\]
> seriestodiffeq(s,y(x));
\[\{\left(-2 x +3\right) y \! \left(x \right)+\left(-2+2 x \right) \left(\frac{d}{d x}y \! \left(x \right)\right), y \! \left(0\right) = 1\}\]