gfun
guessgf
find a generating function from a list
guesseqn
find a differential equation satisfied by the generating function
Calling Sequence
Parameters
Description
Examples
guessgf(L, x, [typelist])
guesseqn(L, y(x), [typelist])
L
-
list
x
name
typelist
(optional) list of generating function types
y
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 optionsgf=ogf,egf.
The guessgf function does the following.
Tries to find a rational function using listtoratpoly.
Tries to find hypergeometric functions using listtohypergeom.
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.
with⁡gfun:
guessgf⁡1,2,4,7,11,16,22,x
−x2+x−1x−13,ogf
guessgf⁡1,1,3,10,41,196,1057,x,lgdegf
ⅇx⁢x+1,lgdegf
l≔1,4,36,400,4900,63504,853776,11778624,165636900,2363904400,34134779536,497634306624,7312459672336:
guesseqn⁡l,y⁡z
16⁢z2−z⁢ⅆ2ⅆz2y⁡z+32⁢z−1⁢ⅆⅆzy⁡z+4⁢y⁡z,y⁡0=1,D⁡y⁡0=4,ogf
See Also
dsolve
gfun/gftypes
gfun/parameters
gfun[listtodiffeq]
gfun[listtohypergeom]
gfun[listtoratpoly]
gfun[listtoseries]
Download Help Document