       Hypergeometric and MeijerG

• To: mathgroup at smc.vnet.net
• Subject: [mg53107] Hypergeometric and MeijerG
• From: Maxim <ab_def at prontomail.com>
• Date: Thu, 23 Dec 2004 07:59:45 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```Most of the problems described at
http://forums.wolfram.com/mathgroup/archive/2004/Jul/msg00185.html
still remain in Mathematica 5.1, except for the two examples with
FunctionExpand of MeijerG function, where the errors have been fixed.
However, it is easy to construct more examples of the same kind:

In:=
MeijerG[{{1/2, 1/2}, {}}, {{0}, {}}, 1/2] // FunctionExpand

Out=
-3*BesselI[0, 1]*(E*EulerGamma*Sqrt[2*Pi] + E*Sqrt[2*Pi]*Log) -
2*Sqrt[2*Pi]*Derivative[0, 1, 0][Hypergeometric1F1][1/2, 1, 2]

The correct value is (-Sqrt[2*Pi])*(E*BesselI[0, 1]*(EulerGamma - Log)
+ 2*Derivative[0, 1, 0][Hypergeometric1F1][1/2, 1, 2] + Derivative[1, 0,
0][Hypergeometric1F1][1/2, 1, 2]). Curiously, sometimes it works the other
way around, when Mathematica internally uses some incorrect identities to
numerically evaluate MeijerG, and FunctionExpand avoids that:

In:=
MeijerG[{{1, 2}, {}}, {{2}, {}}, -1] // N
MeijerG[{{1, 2}, {}}, {{2}, {}}, -1] // FunctionExpand // N

Out=
-0.3028251167649334
+ 1.15572734979092195349743323680174483579`19.98675271785018*I

Out=
-0.30282511676493384 - 1.1557273497909217*I

The second one is correct. I believe that the transformation rules used by
Mathematica sometimes do not have a corresponding condition which should
specify the domain of the parameter values where the identity represented
by the rule holds (e.g., true only if Re[z] > 0, and so on). In such case
the errors like these are unavoidable.

Even automatic simplifications may give an incorrect result:

In:=
MeijerG[{{1}, {}}, {{-(1/2)}, {}}, -(1/2)]

Out=
-2*I*Sqrt[Pi]

The correct value is 2*I*Sqrt[Pi]. Taking limits of the hypergeometric
function at the points of discontinuity is still wrong as well:

In:=
Limit[Hypergeometric2F1[n, 2*n, (n + 1)^2 - 3, x], n -> -1]

Out=
1 - (2*x)/3

The correct value is 1 - (8*x)/3 + x^2/3 + (-2 + (4*x)/3)*Log[1 - x].

Maxim Rytin
m.r at inbox.ru

```

• Prev by Date: Zero testing
• Next by Date: Re: How input stacked characters with vertical bar
• Previous by thread: Re: Zero testing
• Next by thread: rotating 3D graphic by the mouse