gfun[listtoalgeq] - find an algebraic equation satisfied by a generating function
gfun[seriestoalgeq] - find an algebraic equation satisfied by a series
Calling Sequence
listtoalgeq(l, y(x), <[typelist]>)
seriestoalgeq(s, y(x), <[typelist]>)
Parameters
l - list
s - series
y,z - name of the unknown function and the generic variable
[typelist] - (optional) list of generating function types
Description
- The procedures
listtoalgeqandseriestoalgeqcompute a polynomial equation inyandxsatisfied by the generating functiony(x)of the expressions inlors, this generating function being of 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. The output is a tagged list whose first element is the polynomial iny(x)andxthat was found, and whose second element is the type to which it corresponds. - The search is controlled by the options
minordereqn,maxordereqn,maxdegcoeffs,maxtotaldegree,checkterms,mode, andmodulo. Withmaxtotaldegree=T, the search restricts the total degree inxandyof the algebraic polynomial to at mostT; thus the coefficient ofy^istarts with degree boundT-i. For more information on these options, see gfun[parameters]. - If sufficiently many terms are given and no solution is found, then no algebraic equation was found within the requested order, degree, coefficient-size, and validation bounds.
Examples
> with(gfun):
l:=[1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786]:
listtoalgeq(l,y(x));
\[1-y \! \left(x \right)+x y \! \left(x \right)^{2}\]
> s:=series((1-sqrt(1-4*x)),x,9);
\[2 x +2 x^{2}+4 x^{3}+10 x^{4}+28 x^{5}+84 x^{6}+264 x^{7}+858 x^{8}+\mathrm{O}\! \left(x^{9}\right)\]
> seriestoalgeq(s,y(x));
\[4 x -2 y \! \left(x \right)+y \! \left(x \right)^{2}\]