### 15.8 Hypergeometric Functions

The Hypergeometric Functions are defined in Abramowitz and Stegun, Handbook of Mathematical Functions, A&S Chapters 13 and A&S 15.

Maxima has very limited knowledge of these functions. They can be returned from function `hgfred`.

Function: %m [k,u] (z)

  Whittaker M function (A&S eqn 13.1.32):

  $$ M_{\kappa,\mu}(z) = e^{-{1\over 2}z} z^{{1\over 2} + \mu} M\left({1\over 2} + \mu - \kappa, 1 + 2\mu, z\right) $$

  where M(a,b,z) is Kummer’s solution of the confluent hypergeometric equation.

  This can also be expressed by the series (DLMF 13.14.E6): $$ M_{\kappa,\mu}(z) = e^{-{1\over 2} z} z^{{1\over 2} + \mu} \sum_{s=0}^{\infty} {\left({1\over 2} + \mu - \kappa\right)_s \over (1 + 2\mu)_s s!} z^s $$

  Categories:Special functions ·

Function: %w [k,u] (z)

  Whittaker W function (A&S eqn 13.1.33): $$ W_{\kappa,\mu}(z) = e^{-{1\over 2}z} z^{{1\over 2} + \mu} U\left({1\over 2} + \mu - \kappa, 1+2\mu,z\right) $$

  where U(a,b,z) is Kummer’s second solution of the confluent hypergeometric equation.

  Categories:Special functions ·

Function: %f [p,q] ([a],[b],z)

  The \(_{p}F_{q}(a_1,a_2,...,a_p;b_1,b_2,...,b_q;z)\) hypergeometric function, where a a list of length p and b a list of length q.

  Categories:Bessel functions ·Special functions ·

Function: hypergeometric ([a1, ..., ap],[b1, ... ,bq], x)

  The hypergeometric function. Unlike Maxima’s `%f` hypergeometric function, the function `hypergeometric` is a simplifying function; also, `hypergeometric` supports complex double and big floating point evaluation. For the Gauss hypergeometric function, that is p = 2 and q = 1, floating point evaluation outside the unit circle is supported, but in general, it is not supported.

  When the option variable `expand_hypergeometric` is true (default is false) and one of the arguments `a1` through `ap` is a negative integer (a polynomial case), `hypergeometric` returns an expanded polynomial.

  Examples:

      (%i1)  hypergeometric([],[],x);
      (%o1) %e^x

  Polynomial cases automatically expand when `expand_hypergeometric` is true:

      (%i2) hypergeometric([-3],[7],x);
      (%o2) hypergeometric([-3],[7],x)

      (%i3) hypergeometric([-3],[7],x), expand_hypergeometric : true;
      (%o3) -x^3/504+3*x^2/56-3*x/7+1

  Both double float and big float evaluation is supported:

      (%i4) hypergeometric([5.1],[7.1 + %i],0.42);
      (%o4)       1.346250786375334 - 0.0559061414208204 %i
      (%i5) hypergeometric([5,6],[8], 5.7 - %i);
      (%o5)     .007375824009774946 - .001049813688578674 %i
      (%i6) hypergeometric([5,6],[8], 5.7b0 - %i), fpprec : 30;
      (%o6) 7.37582400977494674506442010824b-3
                                - 1.04981368857867315858055393376b-3 %i

Function: hypergeometric_simp (e)

  `hypergeometric_simp` simplifies hypergeometric functions by applying `hgfred` to the arguments of any hypergeometric functions in the expression e.

  Only instances of `hypergeometric` are affected; any `%f`, `%w`, and `%m` in the expression e are not affected. Any unsimplified hypergeometric functions are returned unchanged (instead of changing to `%f` as `hgfred` would).

  `load("hypergeometric");` loads this function.

  See also `hgfred`.

  Examples:

      (%i1) load ("hypergeometric") $
      (%i2) foo : [hypergeometric([1,1], [2], z), hypergeometric([1/2], [1], z)];
      (%o2) [hypergeometric([1, 1], [2], z),
                                                           1
                                           hypergeometric([-], [1], z)]
                                                           2
      (%i3) hypergeometric_simp (foo);
                       log(1 - z)              z    z/2
      (%o3)         [- ----------, bessel_i(0, -) %e   ]
                           z                   2
      (%i4) bar : hypergeometric([n], [m], z + 1);
      (%o4)            hypergeometric([n], [m], z + 1)
      (%i5) hypergeometric_simp (bar);
      (%o5)            hypergeometric([n], [m], z + 1)

  Categories:Hypergeometric functions ·Simplification functions ·Special functions ·

Function: hgfred (a, b, t)

  Simplify the generalized hypergeometric function in terms of other, simpler, forms. a is a list of numerator parameters and b is a list of the denominator parameters.

  If `hgfred` cannot simplify the hypergeometric function, it returns an expression of the form `%f[p,q]([a], [b], x)` where p is the number of elements in a, and q is the number of elements in b. This is the usual \(_pF_q\) generalized hypergeometric function.

      (%i1) assume(not(equal(z,0)));
      (%o1)                          [notequal(z, 0)]
      (%i2) hgfred([v+1/2],[2*v+1],2*%i*z);

                           v/2                               %i z
                          4    bessel_j(v, z) gamma(v + 1) %e
      (%o2)               ---------------------------------------
                                             v
                                            z
      (%i3) hgfred([1,1],[2],z);

                                         log(1 - z)
      (%o3)                            - ----------
                                             z
      (%i4) hgfred([a,a+1/2],[3/2],z^2);

                                     1 - 2 a          1 - 2 a
                              (z + 1)        - (1 - z)
      (%o4)                   -------------------------------
                                       2 (1 - 2 a) z

  It can be beneficial to load orthopoly too as the following example shows. Note that L is the generalized Laguerre polynomial.

      (%i5) load("orthopoly")$
      (%i6) hgfred([-2],[a],z);

                                          (a - 1)
                                       2 L       (z)
                                          2
      (%o6)                            -------------
                                         a (a + 1)

      (%i7) ev(%);

                                        2
                                       z        2 z
      (%o7)                         --------- - --- + 1
                                    a (a + 1)    a