Hypergeometric series appeared in the mid-seventeenth century; since then, they have played an important role in the development of mathematical and physical theories. Most of the elementary and special functions are members of the large hypergeometric class.
Hypergeometric functions have been a part of Wolfram Language since Version 1.0. The following plot shows the implementation timeline of different hypergeometric functions during the evolution of our system:
The Gauss hypergeometric 2F1, Kummer hypergeometric 1F1 and confluent hypergeometric 0F1 functions were implemented in Wolfram Language Version 1.0, and in Versions 3.0, 4.0 and 7.0, powerful updates were made that implemented four very general functions: the generalized hypergeometric pFq function, the “monster” superfunction MeijerG, the AppellF1 function and the so-called q-hypergeometric function, implemented as QHypergeometricPFQ. All these general functions significantly increased the integration, summation and other symbolic manipulation capabilities of Wolfram Language.
During the last three years, we have made a strong effort to implement the remaining computable hypergeometric functions. Three Appell functions (AppellF2, AppellF3 and AppellF4) were implemented in Version 13.3; further generalization of MeijerG—the FoxH function—was implemented a little earlier, in Version 12.3; and, finally, for Version 14.0, we’re presenting the doubly infinite hypergeometric function of one variable—the so-called bilateral hypergeometric function—as BilateralHypergeometricPFQ.
A Bit of History
The term “hypergeometric series” appears to have first been used by John Wallis in his 1655 book Arithmetica Infinitorum, and then these hypergeometric series were treated by Leonhard Euler.
Starting from the works of Carl Gauss and continuing with Ernst Kummer, Bernhard Riemann, Paul Appell and other great scholars, these functions were systematically studied, along with the differential equations they satisfy and their vast applications in different engineering, physical and other applications.
Hypergeometric Series
A hypergeometric series is a power series , where the ratio of successive coefficients is a rational function of n (, where A(n) and B(n) are polynomials in n).
Let’s take a look at the Taylor series of the exponential function:
Calculate the ratio of successive coefficients (this can be done via DiscreteRatio):
This ratio is obviously a rational function of n, and for this case A(n) = 1, B(n) = n + 1, hence the Taylor series of Exp is hypergeometric.
In fact, various well-known series are hypergeometric, so having a comprehensive theory of such series-based functions is interesting as well as very useful in different areas of science. So let’s switch to the class of hypergeometric functions and start with the leading one—the generalized hypergeometric function pFq—and then move on to the well-known Kummer 1F1 and Gauss 2F1 hypergeometric functions that frequently arise in different physical and mathematical applications.
The Generalized Hypergeometric Function
The main function of the hypergeometric class is the generalized hypergeometric function pFq, which is defined by the following series:
where (ai)n is the Pochhammer symbol or the rising factorial.
The ratio of successive terms of pFq is obviously rational:
The generalized hypergeometric function pFq is implemented in Wolfram Language as HypergeometricPFQ[a;b;z]. Here, the number of parameters in the a and b lists is not fixed; they might even be empty lists.
The q-analog of pFq is the basic hypergeometric function rΦs, which has the series expansion
where (a;q)n is the q-Pochhammer symbol. The basic hypergeometric function rΦs, implemented in Wolfram Language as QHypergeometricPFQ, becomes the generalized hypergeometric function pFq in the limit q → 1.
pFq plays an important role in the theory of differential equations. A large set of ordinary differential equations (ODEs) can be solved in terms of pFq functions (we refer to such equations as hypergeometric ODEs). Following, we present such an ODE that is solved in terms of pFq functions:
pFq has a well-developed theory and various fundamental applications in science (one might take a look at the Applications section of the HypergeometricPFQ reference page).
Another remarkable application example is the trinomial equation xn – x + t = 0 that, in the general form, is solved in terms of pFq functions:
The trinomial equation has n roots. Let’s generate one of them for, say, n = 5 and t = 2:
Now we generate a table of five solutions and check that they really solve the trinomial equation:
pFq is extensively used for integration and summation as well as for symbolic expression simplification. For example, here is a seemingly simple integration example:
And here is an example of an infinite sum:
Other hypergeometric functions can be written in terms of HypergeometricPFQ:
The following table shows some special cases of pFq:
Although pFq is a very general and important function, its special cases are even more popular. They significantly affected mathematical and physical theories of the nineteenth and twentieth centuries. Two of the most famous special cases are the Gauss hypergeometric function 2F1 and the Kummer confluent hypergeometric function 1F1.
Gauss Hypergeometric Function
The well-known 2F1 function is defined by the following series:
It is a solution of the Gauss differential equation, which is a singular second-order linear ODE:
ComplexPlot3D demonstrates the pole of 2F1 at the singular point 1:
Why is this function of fundamental importance? Because every second-order linear ODE with three regular singular points can be transformed to it, hence the Gauss differential equation is the “basic” ODE with three singular points.
Second-order linear ODEs with a low number of singularities (the majority of ODEs that describe some physical phenomenon) can often be treated as special or limiting cases of the Gauss hypergeometric equation. This means that the powerful 2F1 incorporates most of the known special functions as special cases, including the famous Bessel functions, Legendre polynomials and others.
More information about the second-order linear ODEs, their solutions and their singularities is available in the author’s earlier blog post, titled “From Sine to Heun,” as well as a comprehensive tutorial on Wolfram Language’s DSolve function.
Aside from its mathematical importance, the Gauss hypergeometric function has various applications in physics, statistics and other areas of science. The twentieth-century quantum mechanical potentials can typically be solved in terms of hypergeometric functions.
Some of the applications are presented on the reference page of Hypergeometric2F1.
Kummer Confluent Hypergeometric Function
The confluent hypergeometric function 1F1 is defined by the following series:
It is a solution of the Kummer confluent differential equation xy”(x) + (b – x)y'(x) – ay(x) = 0. This differential equation can be obtained from the Gauss differential equation for 2F1 via the complex procedure of merging two regular singularities (coalescence).
The radial wavefunction for the continuous spectrum for the hydrogen atom is written in terms of the 1F1 function:
Here is a plot of the solution:
Plotting the solution in 3D gives more insight about the behavior of the radial wavefunction for the hydrogen atom:
Finally, here is a differential equation that can be solved in terms of 1F1:
Hypergeometric Functions of Two Variables
So far, we’ve talked about hypergeometric functions of one variable. pFq is a very general function with an unlimited number of parameters, but it has only one argument. What if we turn to hypergeometric functions of two or more arguments? Does that make sense?
The answer is yes. Further extensions to two or more variables are possible and yes, they open some new possibilities.
The first class is the Appell hypergeometric functions of two variables, named after French mathematician Paul Émile Appell.
Appell was a remarkable French mathematician who contributed to various fields of mathematics (projective geometry, algebraic functions, differential equations, complex analysis, etc.). Appell polynomials and Appell’s equations of motion in mechanics are named after him. Appell hypergeometric functions were introduced by him in 1880, and in 1926 he authored a treatise on these functions with another famous French mathematician, Joseph Kampé de Fériet:
There are four Appell functions. These functions have the following double series definitions around the origin (presented here with their convergence regions):
Appell functions reduce to Hypergeometric2F1 when x = 0 or y = 0.
As noted earlier, AppellF1 was introduced in Wolfram Language 4.0 back in 1999, while we’ve implemented the AppellF2, AppellF3 and AppellF4 functions only in 2023 in Wolfram Language 13.3.
Here are plots of a family of AppellF2 functions:
The series expansions of Appell functions can be written in Hypergeometric2F1 functions:
As with HypergeometricPFQ, we use AppellF1 for integration:
And here is another general example of a whole class of integrands:
All four Appell functions solve the corresponding Horn PDEs with polynomial coefficients (we might think about these PDEs as a generalization of Gauss hypergeometric ODEs). This is the PDE that AppellF3 solves:
And as for HypergeometricPFQ, many elementary and special functions are to be considered as special cases of the Appell functions:
Even More General Hypergeometric Functions
The Appell functions are the first four functions in the set of 34 Horn hypergeometric functions of two variables.
The Appell functions are special cases of the Kampé de Fériet function, which is the general hypergeometric function of two variables. The Kampé de Fériet function can be used to represent the derivatives of pFq with respect to parameters and multiple integrals of the Meijer G-function.
Further hypergeometric generalizations to n dimensions include the Lauricella functions, which are very general and very complex. For n = 2, they reduce to the Appell F1–F4 functions, while for n = 1 we get the 2F1 Gauss hypergeometric function.
Bilateral or Doubly Infinite Hypergeometric Series
Another generalization of the hypergeometric pFq function is the doubly infinite hypergeometric function (the bilateral hypergeometric function). It is written as
with a very similar definition to pFq except that for the bilateral series, the sum is computed from negative infinity to infinity. This function is available in Wolfram Language 14.0 as BilateralHypergeomtricPFQ.
There are two completely different subcases of the bilateral hypergeometric function: the “good” case when p = q (i.e. 2H2) and the “bad” case when p ≠ q.
For the first case, we can think about the bilateral function as a sum of two ordinary generalized hypergeometric functions. For example:
In the following, we calculate the value of 2H2 (1/2, 3/4; 1/4, 1/3; 5.4) and plot this function:
And for this “good” case of BilateralHypergeometricPFQ, simplifications are possible:
For the second case, where p ≠ q, the bilateral hypergeometric series is divergent. Usually for the calculation of such sums, various regularization methods are used. The blog post “The ABCD of Divergent Series” gives comprehensive information about this topic.
For calculation of the bilateral hypergeometric function, we use the Borel regularization technique:
Following is the series expansion for BilateralHypergemoetricPFQ at the origin:
The bilateral hypergeometric series has its unique and important role: it can be used for summing doubly infinite series:
So to sum a doubly infinite series, we internally first sum it to BilateralHypergeometricPFQ (as in the previous example) and then, where possible, simplify it—as in the following example:
The use of BilateralHypergeometricPFQ gives a huge speedup in the summation of doubly infinite hypergeometric series. As an example, the summation of the previous series in Wolfram Language 13.3 (without using BilateralHypergeometricPFQ) took more than 46 seconds, but now we’re able to reduce the calculation time by a factor of 1,000!
Closing Words
Hypergeometric functions have been at the core of Wolfram Language since the first version was launched more than 35 years ago. We constantly improve them, along with implementing new ones.
Version 14.0 contains the whole set of hypergeometric functions of one variable; the four Appell functions; the bilateral hypergeometric function and related ones (the monster superfunctions MeijerG/FoxH and others); and the q-analog of pFq—the basic hypergeometric function rΦs.
It seems that we now have an almost complete “hypergeometric” infrastructure needed by researchers. This infrastructure includes powerful symbolic and numeric computational abilities as well as documentation that is being updated in almost every new version of Wolfram Language.
To close this blog post, we would like to thank all the Wolfram Research developers that contributed to this huge project.