The new FPS package

latest update: November 2021



FPS is a mathematical software for symbolic computations that provides tools for:


     1- Computing homogeneous ordinary differential equations for a large family of meromorphic and special functions; henceforth deduce recurrence equations for the series coefficients. The procedures are HolonomicDE, LinearDE, and QDE for differential equations; and FindRE, FindQRE, and sumhyperRE for recurrence equations.New (November 2021): delta2guess for finding recurrence and differential equations from finitely many values.

     2- Solving linear recurrence equations with polynomial coefficients by computing the basis of m-fold hypergeometric term solutions. The main procedure is mfoldHyper. There is also rectohyperterm which is a procedure for finding (1-fold) hypergeometric term solutions using a variant of Mark van Hoeij's algorithm.

     3- Computing Formal Power Series, hence the name of the package. This is to find the power series representations of the so-called hypergeometric type functions (in closed form formulas) and non-holonomic functions by combining the procedures mentioned above. The resulting procedure is FPS which can be called without prefix.


As a byproduct, the package contains the procedure Taylor for computing series expansion for holonomic functions, and the procedure dispSet for computing the dispersion set of two given polynomials.

The acronym FPS was first used by Wolfram Koepf for his mathematical software which contains a variant of HolonomicDE, FindRE, and implementation for computing particular cases of hypergeometric type series. The software has been renewed by his former Ph.D. student Bertrand Teguia Tabuguia. Both are working on journal and conference articles to disclose the new contributions to the Computer Algebra community.

FPS is implemented in the computer algebra systems Maple and Maxima.

Incorporation in Maple from the 2022 release:

     FPS (the procedure) is convert/FormalPowerSeries

     FPS:-mfoldHyper is LREtools:-mhypergeomsols

     FPS:-HolonomicDE, FPS:-LinearDE, and FPS:-QDE constitute the core of DEtools:-FindODE

     FPS:-dispSet is incorporated in LREtools:-dispersion

Download and use FPS


  Click here to download FPS for Maple


The easiest way to use FPS in Maple is by putting the downloaded file, FPS.mla, in your working directory and include the lines

     > restart;

     > libname:=currentdir(), libname:

     > with(FPS):

at the beginning of your worksheet.

However, to avoid carrying the file FPS.mla in all your working directories, you can just put it in a directory that you defined for libraries. For more details about this, please have a look at the Maple help page of libname.


  Click here to download FPS for Maxima


To use FPS in Maxima, you have to put the file FPS.mac in one of the directories listed by the Maxima global variable file_search_maxima, and load the package as follows

     (%i1) batchload(FPS);



User guide of procedures


Compute a holonomic differential equation satisfied by the function f in the dependent variable y(z) and the independent variable z.The default maximum order of the differential equation sought is 10.

In Maple:

HolonomicDE(f,y(z),maxdeorder): maxdeorder most be a positive integer used to allow a larger value for the maximum order of the differential equation sought.

HolonomicDE(f,y(z),maxdeorder,destep): destep is a positive integer representing the minimum possible value of the difference between two derivative orders appearing in the computed differential equation. The default value is 1. The value of destep is only taken into account when maxdeorder is also specified. Common use: HolonomicDE(f,y(z),10,2), HolonomicDE(f,y(z),12,3), etc.

HolonomicDE(f,y(z),specialfunctions) or

HolonomicDE(f,y(z),maxdeorder,specialfunctions) or


(only for the Maple version) to be used when some special functions like hypergeom, Fibonacci, Bateman, JacobiP, etc. occur in f.

In Maxima:

The maximum order of the differential equation sought is controlled by the global variable Nmax whose default value is 10. The only optional argument is destep.

FindRE(f,z,a(n)) in Maple, FindRE(f,z,a[n]) in Maxima

Converts a holonomic differential equation computed by HolonomicDE into a recurrence relation. The optional arguments maxdeorder, destep, and specialfunctions are also valid for this procedure in Maple. In Maxima, only destep is considered.

The Maxima version provides the procedure DEtoRE(DE,F(z),a[n]) to convert any holonomic differential equation into a recurrence relation.

mfoldHyper(RE,a(n)) in Maple, mfoldHyper(RE,a[n]) in Maxima

Computes m-fold hypergeometric term solutions of holonomic recurrence equations. An m-fold hypergeometric term a(n) is such that a(n+m)/a(n) is rational over the considered field. The field of computation is controled by an optional argument. By default, the field of rationals (values and not symbols) is assumed. The output is a list of

     [an integer m, set of m-fold hypergeometric terms].


mfoldHyper(RE,a(n),complex) in Maple

mfoldHyper(RE,a[n],C) in Maxima:

the computation considers algebraic extension fields, which includes solutions containing symbols. 

mfoldHyper(RE,a(n),ml=[m,l]) or mfoldHyper(RE,a(n),ml=[m,l],complex) in Maple

mfoldHyper(RE,a[n],m,l) or mfoldHyper(RE,a(n),m,l,C) in Maxima:

to compute m-fold hypergeometric term solutions for a specific positive integer value of m and l, with m>l . The output is a set of m-fold hypergeometric terms.

rectohyperterm(RE,a(n)) in Maple, HypervanHoeij(RE,a[n]) in Maxima

works as mfoldHyper but only reduce to the case of (1-fold) hypergeometric terms.


Computes a closed-form formula for the power series representation of f in the variable z and the summation index n. The output is either a hypergeometric type series, or a recursive formula deduce from the recurrence equation satisfied by series coefficients.

Note that no prefix is needed for this procedure even when the package is not loaded (with(FPS)) in Maple.

FPS(f,z,n,z0): for expansion about z0.

By default, the procedure searches for a hypergeometric type series representation. If this is not found but a holonomic recurrence equation instead, then a recursive formula is given from that recurrence relation. Otherwise, a third approach base on computing quadratic differential equations is used.

In Maple:

FPS(f,z,n,onlyhyper=boolean): if boolean is true, then the computations stop once the search for a hypergeometric type power series is completed.

FPS(f,z,n,hypergeomcoeffs=true): to search for a hypergeometric type representation where every m-fold hypergeometric term solution of the underlying recurrence equation appears in a different summation.

FPS(f,z,n,fpstype=name): name can be 'holonomic', 'quadratic' or 'specialfunctions'.

     holonomic: for deducing a recursive formula of the series from a holonomic recurrence equation. In Maxima, this is done using HoloRep(f,z,n).

     quadratic: for deducing a recursive formula of the series from a quadratic recurrence equation. In Maxima, this is done by the QNF(f,z,n).

     specialfunctions: to do the same computations when special functions appear in the input. This is not a proper optional method. The version incorporated in Maple does not need such a specification from the user since special functions can be detected by internal checking.

FPS(f,z,n,maxdeorder=M): To allow the search for a higher-order differential equation in order to have more chance in finding a representation of hypergeometric type or a holonomic recursive formula. This is done in Maxima by increasing the value of Nmax.

The Maxima package applied further techniques (Cauchy product, reciprocal of a series) to cover some other cases.




Searches for a quadratic differential equation with polynomial coefficients, i.e. a differential equation which contains at most one product of derivatives (the square of a derivative is also included) in its summands.

LinearDE(f,y(z)) (only in Maple)

A variant of HolonomicDE which allows some elementary functions as coefficients. This can be used to compute the differential equations for Mathieu functions for example.

FindQRE(f,z,a(n)) in Maple, FindQRE(f,z,a[n]) in Maxima

Computes quadratic recurrence equations from quadratic differential equations computed by QDE.

sumhyperRE(L,a(n)) in Maple, sumhyperRE(L,a[n]) in Maxima

Computes a holonomic recurrence equation satisfied by the sum of hypergeometric terms given the list L.


Computes the Taylor polynomial of order N of the holonomic function f at the point of expansion z0. The used approach is based on holonomic recurrence equations and is more efficient for computing truncated Taylor series of larger-order.

delta2guess(L,degpoly=d) (currently only in Maple)

Computes [RE, DE], where RE is a non-linear recurrence equation satisfied by the values in L, and DE is the corresponding differential equation that can be used to find the generating function of the values in L. The parameter degpoly (default value is 2) gives the degree bound of the polynomial coefficients.

This procedure mainly concerns sequences that cannot be defined by linear differential or recurrence equations like the Bernoulli numbers. The algorithm is quite fast since most differential equations in this category have polynomial coefficients with lower degrees.

For personal notation, one can use the optional parameters devars=[y,z] and revars=[a,n,k].

For Maxima users

See also this webpage for another presentation of the Maxima implementation. The corresponding worksheet can be downloaded here.

For Maple users

See also this worksheet made with Maple 2019 (the computations are valid for Maple 2020). The presentation demonstrates the importance of FPS in Maple. Save (Ctrl+s) the file with a name as you wish with the extension ".mw". The file should look like this pdf file.


[1] Teguia Tabuguia, Bertrand. Power Series Representations of Hypergeometric Type and Non-Holonomic Functions in Computer Algebra. Ph.D. thesis, University of Kassel, Germany. May 2020.

[2] Teguia Tabuguia, Bertrand and Koepf, Wolfram. Symbolic conversion of holonomic functions to hypergeometric type power series. To appear in the Computer Algebra issue of the Journal of Programming and Computer Software. February 2022.

[3] Teguia Tabuguia, Bertrand. A variant of van Hoeij's algorithm to compute hypergeometric term solutions of linear recurrence equations. December 2020 (submitted).

[4] Teguia Tabuguia, Bertrand and Koepf, Wolfram. On the representation of non-holonomic power series. September 2021 (submitted).

[5] Teguia Tabuguia, Bertrand and Koepf, Wolfram. Power series representations of hypergeometric type functions. In Corless R., Gerhard J., Kotsireas I. (eds): Maple in Mathematics Education and Research. MC 2020. Communications in Computer and Information Science, Springer.

[6] Teguia Tabuguia, Bertrand and Koepf, Wolfram. Hypergeometric type power series. 4th International Conference "Computer Algebra", Moscow. Pages 105-108. June 2021.