gfun[guessrelation] guess a polynomial-coefficient relation between series
gfun[hermite_pade] compute a Hermite-Pade approximant
gfun[approximantbasis] modular approximant basis
gfun[gfun_pade] rational approximant from coefficient data
gfun[pade2] historical compatibility entry point
Calling Sequence
guessrelation([s1,s2,...,sn], z, N)
guessrelation([s1,s2,...,sn], z, [d1,d2,...,dn])
guessrelation([s1,s2,...,sn], z=a, N)
guessrelation([s1,s2,...,sn], z=a, [d1,d2,...,dn])
hermite_pade([s1,s2,...,sn], z, N)
hermite_pade([s1,s2,...,sn], z, [d1,d2,...,dn])
hermite_pade([s1,s2,...,sn], z=a, N)
hermite_pade([s1,s2,...,sn], z=a, [d1,d2,...,dn])
approximantbasis([s1,s2,...,sn], z, N, modulo=p, <options>)
approximantbasis([s1,s2,...,sn], z=a, [d1,d2,...,dn], modulo=p, <options>)
gfun_pade(L, z)
pade2([s1,s2,...,sn], z, N)
pade2([s1,s2,...,sn], z, [d1,d2,...,dn])
pade2([s1,s2,...,sn], z=a, N)
pade2([s1,s2,...,sn], z=a, [d1,d2,...,dn])
Parameters
[s1,...,sn] - list of functions or power series; the series to be approximated
z - name; variable in the functions or power series
N - non-negative integer; order of approximation
[d1,d2,...,dn] - list of non-negative integers; degree bounds
a - algebraic expression; expansion point
p - prime; nonzero modulus required by approximantbasis
L - list; coefficients of a power series in ascending order
options - equations controlling mode, checkterms, and the column shift
Description
- The function
guessrelationfinds one linear relation with polynomial coefficients between the supplied power series and returns the coefficients of that relation as a list, orFAILif it finds none. It defaults tomode=guessing: the terms selected bychecktermsare held back from fitting and used to validate the candidate relation. hermite_padeperforms the corresponding Hermite-Pade approximation and defaults tomode=approximant. In this mode all available terms are used to construct the relation. It is a fast alternative to numapprox[hermite_pade].- Both
guessrelationandhermite_padeaccept an explicitmode=guessingormode=approximantoption, which overrides their respective defaults. pade2is the historical compatibility entry point. It retains its existing default,mode=guessing. New code should normally useguessrelationfor validated relation discovery orhermite_padefor approximation.approximantbasissolves the corresponding basis problem over the prime field selected bymodulo=p. Instead of choosing one relation, it returns aMatrixwhose rows are polynomial-coefficient relations. Inmode=approximantit returns the full square basis; inmode=guessingit returns the rows that satisfy the available series data.- Use
approximantbasiswhen the whole modular relation space is needed. It currently requires a nonzero prime modulus. Itsshiftoption (also accepted ascolumnshiftorcolumn_shift) supplies one integer column shift per input series. gfun_padeis the lower-level rational case. Given the coefficient listL, it returns a rational function whose expansion agrees with those coefficients, orFAIL. For conversions that also consider different generating-function types, use gfun[listtoratpoly].- If either single-relation command returns
[P1,...,Pn], thenP1*s1+...+Pn*snvanishes to the fitted precision and, inmode=guessing, also passes the requested held-out validation. - Use the specialized
listto*andseriesto*commands when a recurrence, rational function, algebraic equation, or differential equation is wanted in its usual formatted form. - The guessing commands share relation-finding algorithms based mainly on Hermite-Pade approximation and matrix rational interpolation.
- These commands are part of the
gfunpackage. Afterwith(gfun)they may be called by their short names; the long formsgfun[guessrelation](..),gfun[hermite_pade](..),gfun[approximantbasis](..),gfun[gfun_pade](..), and the historicalgfun[pade2](..)are always available.
Examples
> with(gfun):
> H := hermite_pade([1, exp(z)], z=0, [2,2]);
By default, hermite_pade uses all supplied terms to construct one approximant relation.
> A := approximantbasis([1, exp(z)], z=0, 5, modulo=1009);
> gfun_pade([1, 1, 1, 1, 1], z);
The first example is simply a Pad\303\251 approximant:
> S:=series(add(combinat[fibonacci](i)*z^i,i=0..10),z,10);
> guessrelation([1,S],z,10);
This means that [formula] coincides with the generating function of the Fibonacci numbers, at least up to order 10.
> series(-%[1]/%[2],z,10);
An example with powers of a series:
> S:=series(add(1/(i+1)*binomial(2*i,i)*z^i,i=0..10),z,10);
> guessrelation([1,S,S^2],z,10);
This means that the Catalan numbers [formula]have a generating function that is a solution of the simple polynomial:
> add(%[i]*Y^(i-1),i=1..nops(%));
Given a power series, one can look for various types of equations that it may satisfy. This is used extensively by gfun for linear differential equations (by taking a series S and its derivatives) or non-linear ones in guessode.
See Also
numapprox[hermite_pade], gfun[seriestodiffeq], gfun[listtorec], gfun