gfun - Maple Programming Help

Home : Support : Online Help : Mathematics : Discrete Mathematics : Combinatorics : gfun : gfun/guessgf

gfun

 guessgf
 find a generating function from a list
 guesseqn
 find a differential equation satisfied by the generating function

 Calling Sequence guessgf(L, x, [typelist]) guesseqn(L, y(x), [typelist])

Parameters

 L - list x - name typelist - (optional) list of generating function types y - name

Description

 • The guessgf(L, x) command finds a closed form for the generating function for the series defined by L.
 • You should specify as many terms as possible in the list L.
 • If typelist is specified, it indicates the type of generating functions, for example, ordinary (ogf) or exponential (egf), to try.  If typelist contains more than one element, these types are considered in the order that they are listed.  For a complete list of available generating function types, see gftypes.
 • If typelist is not specified, the default are ordinary and exponential generating functions,  specified by the parameter $\mathrm{optionsgf}=\left['\mathrm{ogf}','\mathrm{egf}'\right]$.
 • The guessgf function does the following.
 1 Tries to find a rational function using listtoratpoly.
 2 Tries to find hypergeometric functions using listtohypergeom.
 3 Tries to find a linear differential equation with polynomial coefficients using listtodiffeq which is then passed to dsolve.
 • The guesseqn(L, y(x)) finds an equation satisfied by the generating function. The guesseqn function might succeed even if the guessgf function fails because it does not attempt to solve the equation in closed-form.

Examples

 > $\mathrm{with}\left(\mathrm{gfun}\right):$
 > $\mathrm{guessgf}\left(\left[1,2,4,7,11,16,22\right],x\right)$
 $\left[\frac{{-}{{x}}^{{2}}{+}{x}{-}{1}}{{\left({x}{-}{1}\right)}^{{3}}}{,}{\mathrm{ogf}}\right]$ (1)
 > $\mathrm{guessgf}\left(\left[1,1,3,10,41,196,1057\right],x,\left['\mathrm{lgdegf}'\right]\right)$
 $\left[{{ⅇ}}^{{x}}{}{x}{+}{{ⅇ}}^{{x}}{,}{\mathrm{lgdegf}}\right]$ (2)
 > $l≔\left[1,4,36,400,4900,63504,853776,11778624,165636900,2363904400,34134779536,497634306624,7312459672336\right]:$
 > $\mathrm{guesseqn}\left(l,y\left(z\right)\right)$
 $\left[\left\{\left({16}{}{{z}}^{{2}}{-}{z}\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{z}}^{{2}}}{}{y}{}\left({z}\right)\right){+}\left({32}{}{z}{-}{1}\right){}\left(\frac{{ⅆ}}{{ⅆ}{z}}{}{y}{}\left({z}\right)\right){+}{4}{}{y}{}\left({z}\right){,}{y}{}\left({0}\right){=}{1}{,}{\mathrm{D}}{}\left({y}\right){}\left({0}\right){=}{4}\right\}{,}{\mathrm{ogf}}\right]$ (3)