The gfun package
Gfun is a Maple package that provides tools for
-
guessing a sequence or a series from its first terms;
-
manipulating rigorously solutions of linear differential or recurrence equations, using the equation as a data-structure.
Latest version
gfun 4.02 (August 2024).
Once downloaded, put the folder somewhere in your home directory.
If gfun_path
is that location, set the variable libname
so that Maple knows how to find gfun, by libname:="gfun_path",libname:
Be careful: the new path should appear before that of Maple’s library, otherwise the version of gfun
shipped with Maple will be used. (See the help page of libname
for more information).
It is convenient to add that line to your .mapleinit file (creating it if it does not exist) so that Maple will find the correct version of gfun in your future sessions.
You can then check that the installation worked by asking gfun:-version;
This command should return the number above. (You may have to restart Maple for your changes to be taken into account.)
The source code can be read by anyone who can read Maple code, but if you want to use the package, then it’s better to download it with the link above.
algvalues
The function algvalues computes the algebraic values taken by an E-function at algebraic points. It is not part of gfun but can be downloaded here. A Maple worksheet of examples includes the examples given in the article
This code requires a version of gfun ≥ 3.96.
Help pages
All the help pages are available directly from within Maple, and here are pdf versions:
-
The gfun package itself.
-
Functions converting expressions to differential or algebraic equations: algfuntoalgeq, algeqtodiffeq, holexprtodiffeq.
-
Functions extracting information from these representations: algeqtoseries, ratpolytocoeff, rectoproc. See also the standard DEtools and LREtools Maple packages, and the NumGfun subpackage.
-
Functions manipulating these expressions, starting with the most commonly used: diffeqtorec, rectodiffeq, algebraicsubs, poltodiffeq, poltorec, borel, cauchyproduct, diffeq+diffeq, diffeq*diffeq, diffeqtohomdiffeq, hadamardproduct, invborel, rec+rec, rec*rec, rectohomrec.
-
New (Aug. 2022): minimizediffeq, a function that finds a minimal-order linear differential equation given an equation and initial conditions.
-
Functions for guessing: listtodiffeq, listtorec, listtoalgeq, listtoratpoly, listtohypergeom, guessgf, seriestodiffeq, seriestorec, seriestoalgeq, seriestoratpoly, seriestohypergeom.
-
NumGfun has its own documentation.
-
Functions related to continued fractions: the ContFrac subpackage, riccati_to_cfrac, expr_to_cfrac, examples from the Handbook of Continued Fractions.
Reference for gfun
The primary reference to use when citing gfun
is the following one:
B. Salvy and P. Zimmermann, “Gfun: a Maple package for the manipulation of generating and holonomic functions in one variable,” ACM Transactions on Mathematical Software, vol. 20, no. 2, pp. 163–177, 1994.
If you are using the NumGfun
subpackage, then the proper reference is:
M. Mezzarobba, “NumGfun: a Package for Numerical and Analytic Computation with D-finite Functions,” in Proceedings of the 2010 International Symposium on Symbolic and Algebraic Computation (ISSAC 2010), 2010, pp. 139–145.
Articles citing gfun
There are many of them. I used to maintain a list, but it is much easier to point directly to the corresponding page on Google Scholar.