Power Series Representations of Hypergeometric Type Functions
 7 Downloads
Abstract
In 1992, Koepf proposed a symbolic approach to compute power series. This algorithm was extended for a larger family of expressions thanks to Petkovsek’s and van Hoeij’s algorithms (1993 and 1998) which compute hypergeometric term solutions of any given holonomic recurrence equation (RE). Mark van Hoeij’s algorithm whose outputs are bases is available in Maple through the command LREtools[hypergeomsols], and Koepf’s algorithm through convert and the builtin module FormalPowerSeries. LREtools[hypergeomsols] is internally used by convert/FormalPowerSeries.
However, using van Hoeij’s algorithm one cannot compute mfold hypergeometric term solutions of holonomic REs, for integers \(m>1\). Given a field K of characteristic zero, a term a(n) is said to be mfold hypergeometric if the term ratio \(a(n+m)/a(n)\) is rational over K. Note that the hypergeometric term case corresponds to \(m=1\). If one adds for example an odd hypergeometric function, like \(\arcsin (z)\), and an even hypergeometric function, like \(\cos (z)\) (which both are twofold hypergeometric), then van Hoeij’s algorithm cannot find those by solving the resulting recurrence equation. Due to this limitation, the computation of many power series is missed by Maple, in particular, linear combinations of power series having mfold hypergeometric term coefficients are generally not detected.
We overcome these issues by using a new algorithm called mfoldHyper, proposed in the first author’s Ph.D. thesis to compute bases of the subspace of mfold hypergeometric term solutions of holonomic REs. It turns out that mfoldHyper linearizes the computation of hypergeometric type power series, i.e. every linear combination of hypergeometric type power series is detected. This paper describes our Maple implementation of an algorithm that conclusively extends Maple’s capabilities regarding the computation of hypergeometric type power series.
Keywords
Hypergeometric type power series mfold hypergeometric term Holonomic recurrence equation1 Introduction
By connection to the generalized hypergeometric series, the term “hypergeometric type” had been introduced in [5] to denote expressions whose power series coefficients lead to a twoterm recurrence relation with polynomial coefficients. The type of such series is defined as the positive difference of the indeterminate sequence indices in the equation. However, despite the fact that we keep this terminology, we are considering a much larger family of expressions, mostly linear combinations of holonomic meromorphic functions. Indeed, the original definition does not consider arbitrary holonomic recurrence equations^{1}, and therefore neglects the possibility to have finitely many different types for the same power series. Specifically, we have the following definition.
Definition 1
Thus a hypergeometric type power series is a linear combination of LaurentPuiseux series whose coefficients are mfold hypergeometric terms^{2}. A hypergeometric function is a function that can be expanded as a hypergeometric type power series. T is called the Laurent polynomial part of the expansion, and the \(p_j\)’s are its Puiseux numbers.
The presence of \(\ln (z)\) in a hypergeometric type expansion is justified by the solution of the underlying holonomic differential equation (see [4]). The definition in [5] reduces to the case \(T=0\) and \(J\leqslant m\), where m is the unique type (\(m_1=\cdots =m_J=m\)) encountered in Definition 1.
Algorithmic attempts were proposed [1] to determine the Puiseux numbers in expression (1), but this was limited and could not be taken into account in the general case. This is why commonly used approaches to Puiseux number calculation are based on heuristic tests on the input function. But this generally only works in the case where one deals with a single Puiseux number (all the \(p_j\)’s are identical in (1)). Based on a symbolic approach, our algorithm offers a clear procedure to determine all different Puiseux numbers involved in a power series expansion. Note that the scope here is more general than what could be done using the Frobenius method (see [7]) which rather forces Puiseux numbers to appear additively (\(z^{n+r}, r\in \mathbb {Q}\)) in the power of the indeterminate.
Likewise, instead of checking expressions, our algorithm also proposes a symbolic approach to determine the Laurent polynomial part in (1).
Remark 1
 An mfold hypergeometric term \(a_n\) encodes m linearly independent hypergeometric terms. These can be enumerated by the m different representations of the corresponding ratios as$$\begin{aligned} \frac{a_{n+m+l}}{a_{n+l}}\in \mathbb {K}(n),~ 0\leqslant l\leqslant m1 . \end{aligned}$$(2)

Without loss of generality, we assume \(z_0=0\) since the nonzero case easily reduces to it. This is also implemented.

(Step 1) Compute a holonomic differential equation satisfied by f(z).

(Step 2) Convert the obtained differential equation into a recurrence equation for the power series coefficients of f(z).

(Step 3) Find all mfold hypergeometric term solutions of the resulting recurrence equation, and use some initial values to find a linear combination corresponding to the power series of f(z).
Although we have implementations that can be used to improve the efficiency (the function HolonomicDE in our Maple package FPS is generally faster than Maple’s DEtools[FindODE] for expressions of the form (3)) for (Step 1), this article puts emphasis on (Step 3), given that (Step 2) is straightforward.
Let f(z) be as in (3). One may think of using Koepf’s algorithm on every summand of f(z), but this will not always work as some \(f_i\) in (3) could lead to a recurrence equation with more than two terms in (Step 2). In such a situation, the current Maple implementation internally uses van Hoeij’s algorithm. The issue with the latter algorithm is the fact that it only looks for hypergeometric term solutions (\(m=1\)) which is just a particular case of what should be considered; also, it may find hypergeometric terms that are equivalent to all the needed mfold hypergeometric terms but by using unnecessary extension fields. Usually when this happens, the current Maple implementation fails to find a linear combination for the power series representation sought.
We give some details explaining why Maple fails to find the power series of \({z}^{2}\sin \left( z \right) +{z}^{4}\ln \left( 1+z+{z}^{2}+{z}^{3} \right) \).
Example 1
Hence no representation is found. Sometimes this could happen if the holonomic differential equation to be used has an order larger than 4, but this is not the case since a holonomic recurrence equation can be found without such a specification.
Example 2
Since (4) has more than two terms, LREtools[hypergeomsols] is internally used.
Example 3
It is not difficult to prove that the above basis of hypergeometric terms can be used to represent the power series sought, but this is missed by convert/FormalPowerSeries. Moreover, using this builtin command on individual summands does not give much improvement on the result because the same issue occurs for \(z^4\cdot \ln (1+z+z^2+z^3)\) whose recurrence equation also has more than two terms. Example 7 shows by using our implementation that ‘simpler’ (no extension field used) coefficients exist over the rationals.
It may happen, moreover, that the power series coefficients of two distinct hypergeometric type functions reduce to a single mfold hypergeometric term computed in (Step 3). This is another reason why calling convert/FormalPowerSeries for individual summands does not always give the best possible representation.
Example 4
As one can see, our algorithm is implemented in our Maple package FPS under the name FPS, presented as the main function of the package^{4}.
The main ingredient of our approach is algorithm mfoldHyper from [8, Chapter 7] that we implemented with the same name. This algorithm computes a basis of the subspace of all mfold hypergeometric term solutions of any given holonomic recurrence equation.
Example 5
Note that each 2fold solution above corresponds to two hypergeometric terms. By default, the algorithm computes terms corresponding to \(l=0\) in (2). Once we know that 2fold hypergeometric term solutions exist, we can call the algorithm again to get the other representations.
Example 6
Finally with all these mfold hypergeometric terms we look for a linear combination using appropriate initial values and get the representation
Example 7
Observe that some shifts may be applied to the coefficients according to the starting point obtained from the Laurent polynomial part of the series. This is always used even when the corresponding Laurent polynomial part is zero, because it leads to appropriate starting points.
Note that (Step 3) can be divided into two important substeps. Indeed, finding a linear combination after obtaining mfold hypergeometric terms requires a certain number of initial values and evaluations that can be determined from the obtained basis of mfold hypergeometric terms. If a precise matching between evaluations and initial values is not correctly made then the representation sought might be missed. Therefore the algorithm (see [10], [8]) behind our method could work as a decision procedure to decide whether a given holonomic meromorphic function is of hypergeometric type.
On the other hand, it is proved in [8, Theorem 7.2, 7.3] that the explike and the rational function series types considered in [5] are both of hypergeometric type. Therefore it is not necessary to split our development into these particular cases.
In the following sections we give an overview of algorithm mfoldHyper and some details about the steps of our algorithm. Many examples where the current Maple convert/FormalPowerSeries misses results will be presented.
2 An Overview of Algorithm mfoldHyper
mfold hypergeometric terms have sometimes been referred to as mhypergeometric sequences in [6], minterlacings of hypergeometric sequences (see the conclusion of [11]) that are also considered as a particular case of Liouvillian sequences in [2]. We use the phrase mfold hypergeometric term from the most recent paper about this notion in [3]. However, none of the approaches described in these previous works corresponds to the method used by mfoldHyper. Indeed, most of the effort on finding mfold hypergeometric term solutions of holonomic recurrence equations has been focused on extending Petkovšek’s or van Hoeij’s algorithm. Specifically, the aim is usually to compute right factors of the form \(\tau ^m  r(n)\), where \(\tau \) denotes the shift operator, and r(n) is a rational function over a field of characteristic zero, of the given recurrence operator, and adapt the steps of Petkovšek’s or van Hoeij’s algorithm to the mfold case. As mentioned in [6], these approaches usually increase the complexity dramatically, which may explain the lack of implementations. mfoldHyper uses a completely different strategy, the algorithm in [9], Petkovšek’s or van Hoeij’s algorithm, can be used as a black box. The method results from a study of holonomic recurrence equations. In the sequel, we give the theorem upon which mfoldHyper is based and present its steps towards computing mfold hypergeometric term solutions of holonomic recurrence equations.
Definition 2
(m fold holonomic recurrence equation). Let m be a positive integer. A holonomic recurrence equation is said to be mfold holonomic if it has at least two nonzero terms, and the difference between every pair of indices in the equation is a multiple of m.
Example 8

Hypergeometric type power series considered in [5] lead to an mfold holonomic recurrence equation with two terms.
 One can always write an mfold holonomic recurrence equation as$$\begin{aligned} P_{md}(n)a_{n+md} + P_{m(d1)}a_{n+m(d1)}+\cdots + P_0(n)a_n = 0 \end{aligned}$$(6)
An important point to notice is that representation (6) is just a particular notation. We may have many different representations of mfold holonomic recurrence equations in the equation of study, and these have to be considered separately. The following definition is used to identify these differences.
Definition 3
(m fold distinct holonomic recurrence equations). Let m be a positive integer. Two mfold holonomic recurrence equations are said to be mfold distinct, if the difference between any index taken from one and another taken from the second is not a multiple of m.
Example 9
We can now state the fundamental theorem behind algorithm mfoldHyper (see [8, Theorem 7.1]).
Theorem 1
(Structure of holonomic recurrence equations having m fold hypergeometric term solutions). Let \(m\in \mathbb {N}\), \(\mathbb {K}\) a field of characteristic zero, and \(h_n\) be an mfold hypergeometric term which is not ufold hypergeometric over \(\mathbb {K}\) for all positive integers \(u<m\). Then \(h_n\) is a solution of a given holonomic recurrence equation, if that equation can be written as a linear combination of mfold holonomic recurrence equations; such that \(h_n\) is solution of each of the mfold distinct holonomic recurrence equations of that linear combination.
Remark 2
In Theorem 1 the aim of the assumption that the recurrence equation should be written as a linear combination of mfold holonomic recurrences is to eliminate those with only one (nonzero) term which are not taken into account by Definition 2.
Example 10
 For \(m=2\), we find that (8) is 2fold, we then apply the substitutionthat transforms (8) into the recurrence equation We solve (10) using the algorithm in [9] and substitute the initial variable back to get the following basis of 2fold hypergeometric terms solutions$$\begin{aligned} {\left\{ \begin{array}{ll} 2\cdot k = n \\ s_{k} = a_{2\cdot k} \end{array}\right. }, \end{aligned}$$(9)$$\begin{aligned} \left\{ \frac{1}{n!}\right\} . \end{aligned}$$(11)
 For \(m=4\), we find a combination of two 4fold holonomic REs, namely,and$$\begin{aligned} 2\cdot \left( 2+n\right) \cdot \left( 4+n\right) \cdot {{a}_{n+4}}8\cdot {{a}_{n}}=0, \end{aligned}$$These lead to the same basis of 4fold hypergeometric term solutions, which is$$\begin{aligned} \left( 2+n\right) \cdot \left( 4+n\right) \cdot \left( 6+n\right) \cdot {{a}_{n+6}}+4\cdot \left( 2+n\right) \cdot {{a}_{n+2}}=0. \end{aligned}$$$$\begin{aligned} \left\{ \frac{{{\left( 1\right) }^{n}}}{\left( 2\cdot n\right) !}\right\} . \end{aligned}$$(12)
 No more linear combination is found. Therefore the final output is$$\begin{aligned} \left[ \left[ 2,\left\{ \frac{1}{n!}\right\} \right] ,\left[ 4,\left\{ \frac{{{\left( 1\right) }^{n}}}{\left( 2\cdot n\right) !}\right\} \right] \right] . \end{aligned}$$(13)
Our Maple package has an implementation of Algorithm 1 under the name mfoldHyper.
3 Computing Hypergeometric Type Power Series
Having presented how mfoldHyper works, we can now give some details about how our procedure builds a hypergeometric type power series from a given expression. Remember, as mentioned in the introduction, we consider a much larger family of expressions than what is described in [5] or currently internally used by Maple. The decision property of the algorithm in [10] could not be reached by previous approaches since mfold hypergeometric terms were barely accessible. However, we highlight a possible gap between the algorithm and its implementation since limitations can be encountered due to unavailability of computer algebra tools to deal with hypergeometric terms over larger algebraic extension fields; an example will be presented. Nevertheless, as our Maxima implementation (see [8])^{5}, our Maple implementation demonstrates an important improvement that covers a very large family of hypergeometric type functions given as in (3), which can also be used to show equivalences between them.
Once a holonomic recurrence equation satisfied by the power series coefficients of a given expression is computed, determining the following items is the essential focus of our procedure.

Puiseux numbers.

Laurent polynomial part and starting points.

A basis (in its complete form^{6}) of mfold hypergeometric term solutions of the obtained holonomic recurrence equation.

A linear combination of hypergeometric type power series.
We use our Maple implementation to describe these steps for some interesting examples.
Consider \(f(z)=\arctan (z) + \ln (1+z^2) + \exp (z^3)\), we want to find the power series representation of f around \(z_0=0\). This first example is used to give some details about the way we get the complete basis of mfold hypergeometric terms and how to find the needed linear combination of hypergeometric type power series. The recurrence equation found is the following.
Example 12
Using mfoldHyper, we find the following basis of hypergeometric terms (incomplete form).
Example 13
This reveals that we have one more 2fold hypergeometric term, and two more 3fold hypergeometric terms. They can be computed using mfoldHyper as follows.
Example 14
Hence we obtain the basis of mfold hypergeometric term solutions in its complete form. We emphasize on repeated use of mfoldHyper because thanks to [9], it represents all its outputs in appropriate normal forms. We recall that \((1/3)_n\) denotes the Pochhammer symbol or rising factorial.
Example 15
Remark 3

Sometimes the linear system has many solutions leading to different (but equivalent) representations of the same power series. We have observed that in certain cases our Maxima implementation yields a different representation than our Maple implementation. This could be explained by the way both CASes represent solutions of linear systems. Our Maple implementation uses Solve[Linear] and sometimes solve.

Although the number of initial coefficients can be computed using limit computations, in our implementation we rather use Maple’s series command. Note, however, that this command does not always give expansions of the required orders due to internal cancellations, therefore it is always important to check the degree of the obtained Taylor polynomial. That is one difference we encountered between Maple and Maxima which mostly handles Taylor polynomials as desired.
Our next example is \(f(z):=1+(1+z^2)\cdot \exp (z) + {{\,\mathrm{arcsech}\,}}(\sqrt{z})\). In the previous case, we could neither expect shifted starting points nor Puiseux numbers. With this new example one may expect the hypergeometric type part of the expansion starting summations at 1 (or with \(z^1\) instead of \(z^0\)) since a constant term appears in f. One also observes that a possible Puiseux number is 2 as \(\sqrt{z}\) appears. However, our procedure does not make any checking on its inputs, everything is deduced from the holonomic recurrence equations which encode all this information.
Example 16
Observe that 7/2 (or 1/2 after normalizing the equation) is a root of the trailing polynomial coefficient of (17). What we have established is that for hypergeometric type power series, the least common multiple of the leading and trailing polynomial coefficient root denominators should be taken as the Puiseux number of the representation sought. Thus by computing the power series of \(f(z^p)\), where p denotes that Puiseux number, and replacing z by \(z^{1/p}\) in the final representation will automatically generate all the Puiseux numbers of the representation. Hence next we compute a holonomic recurrence equation for \(f(z^2)\).
Example 17
Remark that all the rational roots of the leading and trailing polynomial coefficient are now integers. This is even more advantageous since it allows mfoldHyper to get nicer formulas for mfold hypergeometric terms.
Finally using the other steps described in the first example, we get the representation below.
Example 18
Our implementation groups coefficients with same zpowers together.
Remark 4
As we mentioned earlier, rational functions are all of hypergeometric type. However some of their power series representations need extension fields where computations cannot easily be handled. The main issue with such cases relies on the linear system to be solved to find the corresponding linear combination of hypergeometric type power series.
Example 19
This is a particular issue that we should try to overcome while finalizing our implementation.
Let us now present more examples describing our algorithm.
Example 20
For special functions like the generalized hypergeometric function, the approach used to compute holonomic differential equations must slightly be modified. That is why in this previous example the option fpstype=SpecialFunctions is used.
Example 21
As one can observe, our implementation linearizes the computation of hypergeometric type power series. None of the above examples can directly be computed using the builtin Maple convert/FormalPowerSeries.
4 Conclusion
We have presented an algorithm and its Maple implementation to compute hypergeometric type power series as defined in Definition 1. We have shown that this extends Maple’s capabilities to consider more expressions for which power series could not be directly computed before. We believe that this is an important advancement that should be integrated into computer algebra systems.
Besides other important steps like computing Puiseux numbers, the Laurent polynomial part, or finding a linear combination of hypergeometric type power series, the main ingredient of the algorithm is mfoldHyper which computes mfold hypergeometric term solutions of holonomic recurrence equations. The latter was the main deficiency of the algorithm in [5] on which Maple’s original implementation is based.
There are further types of series considered in [8]. The question is, what to do when it turns out that a given expression is not of hypergeometric type, or is even nonholonomic. We mention for example the case where the given expression is not of hypergeometric type but holonomic. That means a recurrence equation can be computed. Some trivial cases like \(\exp (z+z^2)\cdot \cos (z)\) are well handled as we could find a recursive representation that could be used for fast computations of larger order Taylor expansions.
Example 22
On the other hand, we also look for techniques to consider more special functions. We mention Mathieu functions (see this Maple link^{7}) for which we are able to recover differential equations that they satisfy using our code FPS[LinearDE] which does not necessarily look for polynomial coefficients inside the differential equation sought.
Example 23
Further steps to consider rely on change of variables transformations (when possible) of such types of equations to holonomic equations. We are grateful to have gotten a question regarding Mathieu functions during our presentation at the 2020 Maple conference.
Footnotes
 1.
We recall that a recurrence equation is said to be holonomic if it is linear and homogeneous having polynomial coefficients.
 2.
An mfold hypergeometric term is implicitly defined in Definition 1 by the property of hypergeometric type series coefficients. This is admitted in the remaining part of the paper.
 3.
Recursive because hypergeometric type functions are used in (3).
 4.
FPS contains some other results that will not be discussed in this paper.
 5.
Currently being discussed for integration into the system.
 6.
Complete form means that all representations of mfold hypergeometric terms are given. These are m linearly independent terms.
 7.
References
 1.Gruntz, D., Koepf, W.: Maple package on formal power series. Maple Tech. Newsl. 2(2), 22–28 (1995)Google Scholar
 2.Hendricks, P.A., Singer, M.F.: Solving difference equations in finite terms. J. Symb. Comput. 27(3), 239–259 (1999)MathSciNetCrossRefGoogle Scholar
 3.Horn, P., Koepf, W., Sprenger, T.: mfold hypergeometric solutions of linear recurrence equations revisited. Math. Comput. Sci. 6(1), 61–77 (2012). https://doi.org/10.1007/s1178601201078MathSciNetCrossRefzbMATHGoogle Scholar
 4.Kauers, M., Paule, P.: The Concrete Tetrahedron. Symbolic Sums, Recurrence Equations, Generating Functions, Asymptotic Estimates. Springer, Vienna (2011). https://doi.org/10.1007/9783709104453CrossRefzbMATHGoogle Scholar
 5.Koepf, W.: Power series in computer algebra. J. Symb. Comput. 13(6), 581–603 (1992)MathSciNetCrossRefGoogle Scholar
 6.Petkovšek, M., Salvy, B.: Finding all hypergeometric solutions of linear differential equations. In: Bronstein, M. (ed.) ISSAC, pp. 27–33. Association for Computing Machinery, New York (1993)Google Scholar
 7.Ryabenko, A.: Special formal series solutions of linear ordinary differential equations. In: Krob, D., Mikhalev, A.A., Mikhalev, A.V. (eds.) Formal Power Series and Algebraic Combinatorics, pp. 356–366. Springer, Heidelberg (2000). https://doi.org/10.1007/9783662041666_32CrossRefzbMATHGoogle Scholar
 8.Teguia Tabuguia, B.: Power series representations of hypergeometric types and nonholonomic functions in computer algebra. Ph.D. thesis, University of Kassel (2020). https://kobra.unikassel.de/handle/123456789/11598
 9.Teguia Tabuguia, B.: A variant of van Hoeij’s algorithm to compute hypergeometric term solutions of holonomic recurrence equations. arXiv:2012.11513 [cs.SC] preprint (2020)
 10.Teguia Tabuguia, B., Koepf, W.: Symbolic computation of hypergeometric type and nonholonomic power series. arXiv:2102.04157 [cs.SC] preprint (2021)
 11.Van Hoeij, M.: Finite singularities and hypergeometric solutions of linear recurrence equations. J. Pure Appl. Algebra 139(1–3), 109–131 (1999)MathSciNetCrossRefGoogle Scholar