hypergeom
Hypergeometric functions
MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
hypergeom([a_{1}, a_{2}, …]
, [b_{1}, b_{2}, …]
, z
)
hypergeom([a1, a2, ...], [b1, b2, ...], z)
represents
the hypergeometric function.
The hypergeometric function is defined for complex arguments a_{i}, b_{j}, and z.
With a = [a_{1}, a_{2}, …, a_{p}] and b = [b_{1}, b_{2}, …, b_{q}], the hypergeometric function of order p, q is defined as
,
where (c)_{k} = c (c + 1) … (c + k  1), (c)_{0} = 1 is the usual Pochhammer symbol. The quantities a and b are called ‘the lists for the upper and lower parameters,’ respectively.
A floatingpoint value is returned if at least one of the arguments is a floatingpoint number and all other arguments can be converted to floatingpoint numbers.
For most exact arguments, the hypergeometric function returns a symbolic function call. If an upper parameter coincides with a lower parameter, these values cancel and are removed from the parameter lists.
The following special values are implemented:
if
the list of upper parameters a
contains more zeroes
than the list of lower parameters b
.
.
If, after cancellation of identical parameters, the upper parameters
contain a negative integer larger than the largest negative integer
in the lower parameters, then is
a polynomial in z
. If all upper and lower parameters
as well as the argument z
do not contain any symbolic
identifiers, a corresponding explicit result is returned. If the parameters
or z
contain symbols, expansion to the polynomial
representation is available via simplify
. Cf. Example 2.
Also empty lists a =
[] or b =
[] may be passed to hypergeom
.
The corresponding functions are:
,
,
.
When called with floatingpoint arguments, these functions are
sensitive to the environment variable DIGITS
which determines
the numerical working precision.
Symbolic calls are returned for exact or symbolic arguments:
hypergeom([], [2], x), hypergeom([1], [2, 3], PI), hypergeom([1, 1/2], [1/3], x + 3*I)
Floating point values are returned for floatingpoint arguments:
hypergeom([], [2], 3.0), hypergeom([1], [2.0], PI), hypergeom([PI], [2, 3], 4.0), hypergeom([1, 2], [3, 4, 5, 6], 1.0*I), hypergeom([1 + I], [1/(2 + I)], 1.0*I)
is equal to :
hypergeom([], [], z)
Because identical values in a and b cancel, the same is true for :
hypergeom([a, b], [a, b], z)
Any hypergeometric function, evaluated at 0, has the value 1:
hypergeom([a, b], [c, d, e], 0)
If, after cancelling identical parameters, the list of upper parameters contains a zero, the resulting hypergeometric function is constant with the value 1:
hypergeom([0, 0, 2, 3], [a, 0, 4], z)
If, after cancelling identical parameters, the upper parameters
contain a negative integer larger than the largest negative integer
in the lower parameters, the hypergeometric function is a polynomial.
If all parameters as well as the argument z
are
numerical, a corresponding explicit value is returned:
hypergeom([4, 2 , 3], [3, 1, 4], PI*sqrt(2))
For symbolic parameters or symbolic z
, the
polynomial representation may be obtained via simplify
or Simplify
:
hypergeom([40, 5], [1, 4], z) = simplify(hypergeom([40, 5], [1, 4], z))
hypergeom([3, a], [b], z) = Simplify(hypergeom([3, a], [b], z))
If the largest negative integer in the list of lower parameters is larger than the largest negative integer in the list of upper parameters, the corresponding hypergeometric function is not defined (because its definition involves a division by zero):
hypergeom([40, 5, 3], [3, 1, 4], z)
Error: Invalid arguments. [hypergeom]
The functions float
, diff
, and series
handle expressions
involving the hypergeometric functions:
float(ln(3 + hypergeom([17], [exp(1), ln(5)], sqrt(PI))))
diff(hypergeom([a, b], [c, d], x), x)
Note that differentiation of a hypergeometric function w.r.t. one of its uppper or lower parameters does not, in general, lead to hypergeometric functions. Certain peculiar cases are an exception:
diff(hypergeom([a + 1, b], [a + 2], x), a)
series(hypergeom([1, 2], [3], x), x)
Expansions about infinity are possible:
series(hypergeom([1/2], [1/3], x), x = infinity, 3)
However, there are very few (if any) complete expansions for hypergeometric functions about any of its upper or lower parameters.
Often, at particular choices of parameters, the hypergeometric function reduces to simpler special functions. For example, in the case of , also known as the standard confluent hypergeometric function, the hypergeometric function can be reduced to a Bessel function if its (single) lower parameter is exactly twice its (single) upper parameter. This is verified numerically below:
v:= 1.0 + I: z:= float(PI): hypergeom([v + 1/2], [2*v + 1], 2*I*z) = (gamma(1 + v)*exp(I*z)*((z/2)^(v))*besselJ(v, z))
delete v, z:
In the following example, ,
which is known as the Gauss hypergeometric function, can be reduced
into a simple elementary function involving logarithms when the parameters
are [1, 1], [2]
, as verified numerically below:
eq := hypergeom([1, 1], [2], z) = ln(1  z)/z: float(subs(eq, z = 1/3)), float(subs(eq, z = 1/2))
delete eq:
The interval is a branch cut for the hypergeometric function; the sign of the imaginary part changes when crossing the cut. The branch cut belongs to the lower branch:
eq := hypergeom([1, 1], [2], z) = ln(1  z)/z: float(subs(eq, z = 2 + I*10^(DIGITS)))
float(subs(eq, z = 2  I*10^(DIGITS)))
float(subs(eq, z = 2))

The ‘upper parameters’: arithmetical expressions 

The ‘lower parameters’: arithmetical expressions 

The ‘argument’: an arithmetical expression 
Arithmetical expression.
z
When no b_{j} in the list b lies in the set {0,  1,  2, …}, the series
converges if one of the following conditions hold:
p ≤ q, z < ∞;
p = q + 1, z < 1;
p = q + 1, z = 1, ℜ(ψ_{q}) > 0;
;
a contains a zero or a negative integer;
where . The series diverges in the remaining cases. If one of the parameters in a isequal to zero or a negative integer, then the series terminates, turning into what is called a hypergeometric polynomial.
The generalized hypergeometric function of order (p, q) is given by the series definition in the region of convergence, while for p = q + 1, z ≥ 1, it is defined as an analytic continuation of this series.
The function is symmetric w.r.t. the parameters, i.e., it does not depend on the order of the arrangement a_{1}, a_{2}, … in a or b_{1}, b_{2}, … in b.
As mentioned above, if some upper parameter is equal to n = 0,  1,  2, …, the function turns into a polynomial of degree n. If we relax the condition stated above for the lower parameters b and there is some lower parameter equal to m = 0,  1,  2, …, the function also reduces to a polynomial in z provided n > m. It is undefined if m > n or if no upper parameter is a nonpositive integer (resulting in division by zero in one of the series coefficients). The case m = n is handled by the following rule.
If for r values of the upper parameters, there are r values of the lower parameters equal to them (i.e., a = [a_{1}, …, a_{p  r}, c_{1}, …, c_{r}], b = [b_{1}, …, b_{q  r}, c_{1}, …, c_{r}]), then the order (p, q) of the function is reduced to (p  r, q  r):
.
The above rule applies even if any of the c_{i} happens to be zero or a negative integer (for details, see Luke in the list of references, p. 42).
satisfies a differential equation in z:
,
where (δ + a) and (δ + b) stand for and , respectively. Thus, the order of this differential equation is max(p, q + 1) and the hypergeometric function is only one of its solutions. If p < q + 1, this differential equation has a regular singularity at z = 0 and an irregular singularity at z = ∞. If p = q + 1, the points z = 0, z = 1, and z = ∞ are regular singularities, thus explaining the convergence properties of the hypergeometric series.
The analytic continuation for p = q + 1, z ≥ 1, is defined by selecting the principal branch of this continuation (also denoted as ) satisfying the condition arg(1  z) < π, the cut along [1, ∞) is drawn in the complex zplane. In particular, the analytic continuation can be obtained by means of an integral representation (for details, see Prudnikov et al. in the references) or by the Meijer G function.
[1] Luke, Y.L. “The Special Functions and Their Approximations”, Vol. 1, Academic Press, New York, 1969.
[2] Prudnikov, A.P., Yu.A. Brychkov, and O.I. Marichev, “Integrals and Series”, Vol. 3: More Special Functions, Gordon and Breach, 1990.
[3] Abramowitz, M. and I.A. Stegun, “Handbook of Mathematical Functions”, Dover Publications, New York, 9th printing, 1970.