MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Enhancements to special functions in Version 5.2

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

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

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:

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


(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:

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

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

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

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

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

The series expansions about x = Infinity:

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

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

Sqrt[Pi] + Sqrt[Pi]*(1 + EulerGamma - Log[4] + Log[1/x])/(2*x) + O[x,  

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

Now Out[10] 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].


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

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


Integrate::gener : Unable to check convergence.

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

Out[11] and Out[12] 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  
and from 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

  • 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 ?