       Enhancements to special functions in Version 5.2

• To: mathgroup at smc.vnet.net
• Subject: [mg58709] Enhancements to special functions in Version 5.2
• From: Maxim <ab_def at prontomail.com>
• Date: Fri, 15 Jul 2005 03:02:27 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```Here are three expressions which are equivalent for x>0:

In:=
expr1 = MeijerG[{{0, 1}, {}}, {{1/2}, {}}, x];
expr2 = -Sqrt[Pi]*E^(1/(2*x))*
(BesselK[0, 1/(2*x)] - BesselK[1, 1/(2*x)])/(2*x);
expr3 = Pi*HypergeometricU[3/2, 2, 1/x]/(2*x);

One problem is that we still cannot evaluate expr1 numerically near x = 0.
Mathematica 5.1 just returned results with zero precision, no matter how
high the value of \$MaxExtraPrecision was set. Mathematica 5.2 gives an
incorrect result:

In:=
N[expr1 /. x -> 1/100, 20]

Out=
4.3516430954922696409302990656967`20.*^22

(all digits are incorrect). If we increase the value of \$MinPrecision,
then Mathematica will be able to compute several significant digits, but
still the answer will be wrong in the sense of the Mathematica
significance arithmetic model: with \$MinPrecision = 50 the precision of
the answer will be 50, but only about 6 digits will be correct. I suppose
this could be called an improvement.

The series expansions about x = 0:

In:=
Series[expr1, {x, 0, 1}]
Series[expr2, {x, 0, 1}] // Simplify[#, x > 0]&
Series[expr3, {x, 0, 1}] // Simplify[#, x > 0]&

Out=
MeijerG[{{0, 1}, {}}, {{1/2}, {}}, 0] + Derivative[0, 0, 1][MeijerG][{{0,
1}, {}}, {{1/2}, {}}, 0]*x + O[x]^2

Out=
Pi*Sqrt[x]/2 + O[x]^1

Out=
Pi*Sqrt[x]/2 + O[x]^1

Out is incorrect because the leading term should be O(sqrt(x)) for
positive x.

The series expansions about x = Infinity:

In:=
Series[expr1, {x, Infinity, 1}]
Series[expr2, {x, Infinity, 1}]
Series[expr3, {x, Infinity, 1}]

Out=
MeijerG[{{0, 1}, {}}, {{1/2}, {}}, x]

Out=
Sqrt[Pi] + Sqrt[Pi]*(1 + EulerGamma - Log + Log[1/x])/(2*x) + O[x,
Infinity]^2

Out=
Sqrt[Pi] + Sqrt[Pi]*(-1 + 2*EulerGamma + PolyGamma[0, 3/2])/(2*x) + O[x,
Infinity]^2

Now Out is incorrect, because the Log[x]/x term is missing.

Overall, obtaining asymptotic expansions about singular points is still
hopeless: such examples can probably be constructed for any of the higher
transcendental functions in Mathematica, e.g., Series[StruveL[1, Sqrt[z]],
{z, Infinity, 1}], which goes into infinite recursion and returns a
meaningless result, or Series[HypergeometricPFQ[{1/2, 1/2, 1}, {3/4, 5/4},
1/a], {a, 0, 1}], which returns ComplexInfinity + HypergeometricPFQ[{1/2,
1/2, 1}, {3/4, 5/4}, ComplexInfinity].

Integration:

In:=
Integrate[(expr1 - Sqrt[Pi])/x, {x, 1, Infinity}]
Integrate[(expr2 - Sqrt[Pi])/x, {x, 1, Infinity}]
Integrate[(expr3 - Sqrt[Pi])/x, {x, 1, Infinity}]

Out=
-Sqrt[E*Pi]*BesselK[0, 1/2]

Out=
-Infinity

Integrate::gener : Unable to check convergence.

Out=
-EulerGamma*Sqrt[Pi] - Sqrt[E*Pi]*BesselK[0, 1/2] + Sqrt[Pi]*Log

Out and Out are both incorrect. Taking into account that I picked
the initial MeijerG function and the two identities for it pretty much at
random, all this seems rather disappointing.

The identities expr1 == expr2 == expr3 are the formulas 07.34.03.0393.01
and 07.34.03.0392.01 from functions.wolfram.com. The domain of validity
for the second one is given as !IntervalMemberQ[Interval[{-1, 0}], z],
which seems to be incorrect: if z approaches a negative real value from
above, then 1/z approaches the real line from below, so expr1 is
continuous from above and expr3 isn't. Hence, their values on the branch
cut of HypergeometricU cannot be the same.

Maxim Rytin
m.r at inbox.ru

```

• Prev by Date: Re: Light and surface colors
• Next by Date: Re: Light and surface colors
• Previous by thread: Re: Comparison of Mathematica on Various Computers
• Next by thread: Re: How can get the Path of current Notebook ?