1\hypertarget{SPECFNS2}{}
2
3The package SPECFN2 is designed to provide algebraic and numeric manipulations
4for some less commonly used special functions:
5\index{Hypergeometric functions}
6\begin{itemize}
7\item \hyperlink{operator:HYPERGEOMETRIC}{Hypergeometric function};
8\item \hyperlink{operator:MEIJERG}{Meijer's G function}.
9\end{itemize}
10
11These functions are from the non-core package SPECFN2, which
12needs to be loaded before use with the command:
13\begin{verbatim}
14        load_package specfn2;
15\end{verbatim}
16
17More information on the functions provided may be found on the website
18\href{https://dlmf.nist.gov/}{DLMF:NIST} although currently not all functions
19may conform to these standards.
20
21\index{Pochhammer symbol}
22\subsection{Hypergeometric Functions: Introduction}
23The (generalised) hypergeometric functions
24\[
25_pF_q \left( \genfrac{}{}{0pt}{}{a_1, \ldots , a_p}{b_1, \ldots ,b_q} \Bigg\vert z \right)
26\]
27are defined in textbooks on special functions as
28\[
29_pF_q \left( \genfrac{}{}{0pt}{}{a_1, \ldots , a_p}{b_1, \ldots ,b_q} \Bigg\vert z \right)
30  = \sum_{n=0}^{\infty}\frac{(a_{1})_{n}\dots(a_{p})_{n}}{(b_{1})_{n}\dots(b_{q})_{n}}\frac{z^{n}}{n!}
31\]
32where $(a)_{n}$ is the Pochhammer symbol
33\[
34 (a)_{n} = \prod_{k=0}^{n-1} (a+k).
35\]
36
37The function
38\[
39G_{p q}^{m n} \left( z \  \Bigg\vert \  \genfrac{}{}{0pt}{}{(a_p)}{(b_q)} \right)
40\]
41has been studied by C.~S.~Meijer beginning in 1936 and has been
42called Meijer's G function later on. The complete definition of Meijer's
43G function can be found in \cite{Prudnikov:90c}.
44Many well-known functions can be written as G functions,
45e.g.\ exponentials, logarithms, trigonometric functions, Bessel functions
46and hypergeometric functions.
47
48Several hundreds of particular values can be found in \cite{Prudnikov:90c}.
49
50\hypertarget{operator:HYPERGEOMETRIC}{}
51\ttindex{hypergeometric}
52\subsection{The Hypergeometric Operator}
53
54The operator \f{hypergeometric} expects 3 arguments, namely the
55list of upper parameters (which may be empty), the list of lower
56parameters (which may be empty too), and the argument, e.g.\ the input:
57\begin{verbatim}
58hypergeometric ({},{},z);
59\end{verbatim}
60yields the output
61\begin{verbatim}
62 z
63e
64\end{verbatim}
65and the input
66\begin{verbatim}
67hypergeometric ({1/2,1},{3/2},-x^2);
68\end{verbatim}
69gives
70\begin{verbatim}
71 atan(abs(x))
72--------------
73    abs(x)
74\end{verbatim}
75
76
77Since hundreds of particular cases for the generalised hypergeometric
78functions can be found in the literature, one cannot expect that all
79cases are known to the \f{hypergeometric} operator.
80Nevertheless the set of special cases can be augmented by adding
81rules to the \REDUCE{} system, e.g.
82\begin{verbatim}
83let {hypergeometric({1/2,1/2},{3/2},-(~x)^2) => asinh(x)/x};
84\end{verbatim}
85
86\ttindex{MeijerG}
87\subsection{Meijer's G Function}
88\hypertarget{operator:MEIJERG}{}
89
90The operator \f{MeijerG} expects 3 arguments, namely the
91list of upper parameters (which may be empty), the list of lower
92parameters (which may be empty too), and the argument.
93
94The first element of the lists has to be the list of the
95first $n$ or $m$ respective parameters, e.g.\ to describe
96\[
97G_{1 1}^{1 0} \left( x \  \Bigg\vert \  \genfrac{}{}{0pt}{}{1}{0} \right)
98\]
99one has to write
100\begin{verbatim}
101MeijerG({{},1},{{0}},x); % and the result is:
102
103 sign( - x + 1) + sign(x + 1)
104------------------------------
105              2
106\end{verbatim}
107and for
108\[
109G_{0 2}^{1 0} \left( \frac{x^2}{4} \  \Bigg\vert \ \genfrac{}{}{0pt}{}{}{{1+ \frac{1}{4} },
110{1-\frac{1}{4}}} \right)
111\]
112\begin{verbatim}
113MeijerG({{}},{{1+1/4},1-1/4},(x^2)/4) * sqrt pi;
114
115
116                    2                    2
117 sqrt(pi)*sqrt(-----------)*sin(abs(x))*x
118                abs(x)*pi
119-------------------------------------------
120                     4
121\end{verbatim}
122
123