FoxH - A New Super Special Function

Tigran Ishkhanyan 
Wolfram Research, Inc.

(RowDefault[, (Spacer1), , (Spacer1), ])  #WolframTechConf

ABSTRACT

Wolfram Language has over 250 mathematical functions including well-known elementary and special functions. Most of these mathematical functions might be considered as specific cases of very general superfunctions like the G-function or MeijerG that was introduced in Version 3.0 of Mathematica. However, for various applications we need even more powerful superfunctions: for Version 12.3 we have introduced the FoxH function that is a natural generalization of MeijerG and plays an important role in problems of statistics and symbolic integration. FoxH is also able to represent functions that are not expressible in terms of MeijerG such as the Mittag-Leffler function and others. For the upcoming release we have implemented the FoxHReduce function which can be used to represent functions in terms of FoxH and also improved FoxH itself. I will give an elementary introduction to FoxH and its applications during the talk.

A gentle intro to superfunctions

Let’s start with the G-function. In Mathematica it is implemented as MeijerG:

meijerG=MeijerG[{{1/2},{1/3}},{{1/4},{1/5}},x];
TraditionalForm[meijerG]

Plot[meijerG,{x,0,1}]

What is it? What is its importance? Why was it implemented in Mathematica V.3 in 1996 25 years ago?

Wikipedia page gives very insightful and exhaustive information on its features. I’ll recall some of them:
	* G-function is a very general special function. Generally speaking G-function might be interpreted as a finite sum of pFq’s (MeijerG <-> finite sum of HypergeometricPFQ that are infinite series themselfs);
	* the closure of G-functions set under differentiation/indefinite integration/etc. is extremely important feature;
	* turning to G-function representation of special function might be insightful for different problems (symbolic integration/differentiation, integral transforms, etc.).

MeijerG: basic yet important facts

The formal definition via Mellin-Barnes integral

(RefLink[MeijerG, paclet:ref/MeijerG])[{(Subscript[a, 1]),...,(Subscript[a, p])},{(Subscript[b, 1]),...,(Subscript[b, q])},z]=(1/(2π I))∫(((∏_(j=1)^m)Gamma[(Subscript[b, j])+s](∏_(i=1)^n)Gamma[1-(Subscript[a, i])-s])/((∏_(j=m+1)^q)Gamma[1-(Subscript[b, j])-s](∏_(i=n+1)^p)Gamma[(Subscript[a, i])+s]))(z^(-s))ds

One might find insights on the integration contour in MathWorld.

MeijerG and HypergeometricPFQ

MeijerG[{{a1},{a2}},{{b1,b2},{b3}},x]//FunctionExpand

As I have mentioned above, the G-function is a finite sum of pFq’s with different structures:

Series[MeijerG[{{a1},{a2}},{{b1,b2},{b3}},x],{x,0,1}]

Series[MeijerG[{{a1,a2},{a3}},{{b1},{b2}},x],{x,∞,1}]

Differentiation/antidifferentiation

D[MeijerG[{{a1},{a2}},{{b1},{b2}},x],x]

D[MeijerG[{{a1},{a2}},{{b1},{b2}},x],{x,4}]

Integrate[MeijerG[{{a1},{a2}},{{b1},{b2}},x],x]

(x^n) MeijerG

(x^(1/2)) MeijerG[{{1},{1/2}},{{1/3},{1/7}},x]

(x^n) MeijerG[{{1},{1/2}},{{1/3},{1/7}},x]

Integrating MeijerG*MeijerG

There is a specific rule:

Integrate[MeijerG[___,ω z] MeijerG[___,η z],{z,0,∞}]=MeijerG[___,η/ω]

Obviously this rule might be used to calculate definite integrals of compositions of functions using their MeijerG-representations and this rule.

See the example from the Applications section of this ref page.

Integral transforms

MellinTransform[MeijerG[{{a1},{a2}},{{b1,b2},{b3}},x],x,s]

See the formal definition of MeijerG via Mellin-Barnes integral:

(RefLink[MeijerG, paclet:ref/MeijerG])[{(Subscript[a, 1]),...,(Subscript[a, p])},{(Subscript[b, 1]),...,(Subscript[b, q])},z]=(1/(2π I))∫(((∏_(j=1)^m)Gamma[(Subscript[b, j])+s](∏_(i=1)^n)Gamma[1-(Subscript[a, i])-s])/((∏_(j=m+1)^q)Gamma[1-(Subscript[b, j])-s](∏_(i=n+1)^p)Gamma[(Subscript[a, i])+s]))(z^(-s))ds

MeijerGReduce

MeijerGReduce generates MeijerG objects:

MeijerGReduce[Sin[x],x]

MeijerGReduce[Hypergeometric2F1[a,b,c,x],x]

Use Activate to get back the special function:

Activate[%]//FullSimplify

Summary

So, this was a brief intro on the “monster” Meijer G-function, which is a very general special function having most of the other special functions as specific cases. The general G-function is constructed as a finite sum of pFq functions or using its Mellin-Barnes integral representation and is rather useful (sometimes irreplaceable) in various problems of Maths like integration, differentiation, etc. While having a rather well developed theory and algorithm in WL there is a small yet important problem here - most of the time users working with Mathematica will face not the G-function itself but it’s more general modification that we have called the “generalized” G-function.

MeijerGReduce[Sin[x],x]

(Sqrt[π]) (InactiveHead[MeijerG])[{{},{}},{{(1/2)},{0}},(x/2),(1/2)]

And here we go...

The generalized G-function and the Fox H-function

(RefLink[MeijerG, paclet:ref/MeijerG])[{(Subscript[a, 1]),...,(Subscript[a, p])},{(Subscript[b, 1]),...,(Subscript[b, q])},z]=(1/(2π I))∫(((∏_(j=1)^m)Gamma[(Subscript[b, j])+s](∏_(i=1)^n)Gamma[1-(Subscript[a, i])-s])/((∏_(j=m+1)^q)Gamma[1-(Subscript[b, j])-s](∏_(i=n+1)^p)Gamma[(Subscript[a, i])+s]))(z^(-s))ds

(RefLink[MeijerG, paclet:ref/MeijerG])[{(Subscript[a, 1]),...,(Subscript[a, p])},{(Subscript[b, 1]),...,(Subscript[b, q])},z,r]=(r/(2π I))∫(((∏_(j=1)^m)Gamma[(Subscript[b, j])+r s](∏_(i=1)^n)Gamma[1-(Subscript[a, i])-r s])/((∏_(j=m+1)^q)Gamma[1-(Subscript[b, j])-r s](∏_(i=n+1)^p)Gamma[(Subscript[a, i])+r s]))(z^(-s))ds

When r=1 the generalized G-function simplifies to the ordinary one. In fact, most of the time one will face this generalized G-function so, time for the next-level superfunction:

FoxH[{((Subscript[a, 1]),(Subscript[A, 1])),...,((Subscript[a, p]),(Subscript[A, p]))},{((Subscript[b, 1]),(Subscript[B, 1])),...,((Subscript[b, q]),(Subscript[B, q]))},z]=(1/(2π I))∫(((∏_(j=1)^m)Gamma[(Subscript[b, j])+(Subscript[B, j])s](∏_(i=1)^n)Gamma[1-(Subscript[a, i])-(Subscript[A, i])s])/((∏_(j=m+1)^q)Gamma[1-(Subscript[b, j])-(Subscript[B, j])s](∏_(i=n+1)^p)Gamma[(Subscript[a, i])+(Subscript[A, i])s]))(z^(-s))ds

Being a natural generalization of the G-function, the H-function is much more complicated. However, it opens new opportunities with applications in Statistics and other areas of Science, as well as possible improvement of formula simplification and symbolic integration routines. Also, FoxH can represent families of functions that are not representable in MeijerG (Mittag-Leffler and others).

MeijerG	<->	finite sum of HypergeometricPFQ’s
	FoxH 	<-> 	finite sum of the generalization of HypergeometricPFQ’s - Wright-Fox functions

New in 12.3 and improved in 13.0: FoxH

FoxH was introduced in Wolfram Mathematica V.12.3:

FoxH[{{{(1/2),1}},{{(1/3),2}}},{{{(1/4),3}},{{π,4}}},0.2]

Many special functions are special cases of FoxH:

FoxH[{{},{}},{{{b,1/2}},{}},z]

FoxH[{{{a1,1}},{{a2,1}}},{{{b1,1}},{{b2,1}}},z]

The family of Mittag-Leffler functions not representable in MeijerG’s are specific cases of FoxH:

FoxH[{{{0,1}},{}},{{{0,1}},{{0,5/3}}},z]

Of course FoxH has all the standard features of special functions:

Plot[FoxH[{{{(1/2),(2/3)}},{}},{{{(3/4),(4/5)}},{{(5/6),(6/7)}}},x],{x,0,10}]

Series[FoxH[{{{a1,1/2}},{}},{{{b1,1}},{}},z],{z,0,1}]

Asymptotic[FoxH[{{{a1,1}},{}},{{{b1,1/2}},{}},z],z->∞]

FoxH[{{{1,1},{2,(1/2)}},{{3,(1/3)}}},{{{4,(1/4)}},{{5,(1/5)}}},z+(p/q)]//TraditionalForm

Differentiation/integration of FoxH:

D[FoxH[{{{a1,α1},{a2,α2}},{{a3,α3}}},{{{b1,β1}},{{b2,β2}}},z],z]

Integrate[FoxH[{{{a1,α1}},{{a2,α2}}},{{{b1,β1}},{{b2,β2}}},z],z]

Some other stuff:

Integrate[ z  FoxH[{{{1/2,1}},{{2,1}}},{{{1/2,1}},{{-3,1}}},(z^2)],{z,0,3}]

SeriesCoefficient[FoxH[{{{a,1}},{}},{{{b,1}},{}},x],{x,1,m}]

New in 13.0: FoxHReduce

FoxHReduce is the analog of MeijerGReduce for the FoxH function:

FoxHReduce[(1/(Sqrt[(Sqrt[x])+(Sqrt[1+x])])),x]

FoxHReduce[Sin[a x],x]

FoxHReduce[MeijerG[{{(Subscript[a, 1])},{(Subscript[a, 2])}},{{(Subscript[b, 1])},{(Subscript[b, 2])}},x],x]

Remove the “r” parameter in MeijerG:

FoxHReduce[AiryAi[x],x]
MeijerGReduce[AiryAi[x],x]

Represent functions that do not have a MeijerG representation:

FoxHReduce[(E^(-(x^a))) (x^b),x]
MeijerGReduce[(E^(-(x^a))) (x^b),x]

The family of Mittag-Leffler functions:

FoxHReduce[MittagLefflerE[3/2,x],x]

Plot[{Activate[%]},{x,-40,2},PlotRange->Automatic]

Disclaimer: The Heun class of functions (Heun, Lamé, Spheroidal, Mathieu) are not expressible in terms of MeijerG or FoxH functions. For them we need even more powerful superfunctions!

One simple example of FoxH application:

Sometimes MeijerGReduce generates rather complicated results:

MeijerGReduce[(E^(x^2)) Erfc[-x],x]

While the representation in FoxH is simpler:

FoxHReduce[(E^(x^2)) Erfc[-x],x]

Major applications of FoxH are in Statistics

FoxH is a very important function in Statistics as PDFs of various distributions might be written in the terms of it. 
Here is an example of a PDF of StableDistribution for the case of α≤1 (more details in this article by Rathie et al.):

StableDistributionPDF[x_,α_,β_,μ_,σ_]:=With[{Α=σ (((1+(β^2)((Tan[((π α)/2)])^2)))^(1/(2α))),Β=(2/(π α))Sign[x-μ]ArcTan[β Tan[((π α)/2)]]},(1/(α Α))*FoxH[{{{1-(1/α),(1/α)}},{{ ((1-Β)/2),((1+Β)/2)}}},{{{0,1}},{{ ((1-Β)/2),((1+Β)/2)}}},((Abs[x-μ])/Α)]]

We evaluate it and compare with the built-in PDF generated using StableDistribution:

Show[{ListPlot[Table[{x,StableDistributionPDF[x,0.6,0.4,0.5,2]},{x,-20,20,0.2}],],Plot[PDF[StableDistribution[1,0.6,0.4,0.5,2],x], {x,-20,20},]}]

For other examples of applications see the ref page of FoxH.

Summary

Wolfram Language is being constantly updated and we are doing our best to implement newer and newer useful functions to fulfill the rising interest in new special functions or applications. In 12.3 we have implemented one of the most general functions which is called the Fox H-function and have started active development of this function’s ecosystem. This step is required to generalize and strengthen the MeijerG capabilities and possibly close the gaps there.

Although the theory of Fox H-function is underdeveloped and we're at the beginning of this route, it seems that this function is potent to significantly affect various fields of Science (like MeijerG did decades ago).

The FoxH ecosystem:

Thank you!