MMA Integration Warnings

*To*: mathgroup at yoda.physics.unc.edu*Subject*: MMA Integration Warnings*From*: bert at netcom.com (Roberto Sierra)*Date*: Thu, 18 Nov 1993 02:37:59 -0800

I tried to evaluate the following definite integral in Mathematica (Mac v2.03), and encountered some unexpected problems. As I have a fairly old version of MMA, I'd be curious to find out if the trouble still manifests itself in the current version. Does this indicate that there are typos in the v2.03 integration package? Here's the integral (from a posting to sci.math on USENET): +1 _ / i i i i -0.98 -0.98 i (1-x) (1+x) dx i i_/ -1 Here's the session, with comments: In[1]:= $Version Out[1]= Macintosh 2.0 (September 3, 1991) In[2]:= f[x_] := (1-x)^(-98/100) (1+x)^(-98/100) [Note rational exponents] In[3]:= g = Integrate[f[x],{x,-1,1}] Syntax::bktwrn: Warning: "f (b+a x^dg)" should probably be "f [b+a x^dg]". (line 169 of "Integrate`mainalgorithm`") Syntax::bktwrn: Warning: "f (Denominator[a]^Abs[b])" should probably be "f [Denominator[a]^Abs[b]]". (line 1227 of "Integrate`mainalgorithm`") [What gives with these warnings? I've never seen MMA warnings like these before. Do these suggest that there are typos in Integrate.m?] Out[3]= 51 25 Sqrt[Pi] Gamma[--] 50 --------------------- 13 Gamma[--] 25 In[4]:= N[g,30] (* numeric value to 30 digits *) Out[4]= 25.686418380599329666080166119 The answer *looks* about right, but I haven't been able to verify it by hand or by performing a numerical integration. NIntegrate gives a vastly different answer, and seems to have trouble due to the singularities at +1 and -1 -- I haven't figured out how to get around that yet by adjusting RecursionLimit or WorkingPrecision. In[5]:= NIntegrate[f[x],{x,-1,1}] NIntegrate::ncvb: NIntegrate failed to converge to prescribed accuracy after 7 recursive bisections in x near x = -1.. Out[5]= 51.3739 Another thing I checked was to see what would happen if I used real exponents (-0.98) instead of rational exponents (98/100), to see if the answer was the same. Interestingly, though the same internal warnings are generated, the results are defined in terms of the HypergeometricPFQ function, for which I can find no documentation. In[6]:= f[x_] := (1-x)^(-0.98) (1+x)^(-0.98) [Note real exponents] In[7]:= g = Integrate[f[x],{x,-1,1}] Syntax::bktwrn: Warning: "f (b+a x^dg)" should probably be "f [b+a x^dg]". (line 169 of "Integrate`mainalgorithm`") Syntax::bktwrn: Warning: "f (Denominator[a]^Abs[b])" should probably be "f [Denominator[a]^Abs[b]]". (line 1227 of "Integrate`mainalgorithm`") Out[7]= 50. HypergeometricPFQ[{1, 0.98}, {1.02}, -1] In[8]:= N[g,30] Out[8]= 49.9999999999999999 HypergeometricPFQ[{1., 0.9800000000000000001}, {1.02}, -1.] [Why can't MMA evaluate a numerical solution here?] Also, I can find no mention of the HypergeometricPFQ function anywhere in the doc, except for what little MMA has to say when you ask about it: In[9]:= ??HypergeometricPFQ Out[9]= HypergeometricPFQ[numlist, denlist, z] gives the generalized hypergeometric function pFq where numlist is a list of the p parameters in the numerator and denlist is a list of the q parameters in the denominator. Attributes[HypergeometricPFQ] = {Protected, ReadProtected} Does anyone know what this function is and how it is used?? How do I get a numeric solution from it? What about those integration warnings? Have they been fixed in the current version of MMA? Thanks in advance for any replies... -- \\|// "Television is a medium -- it is - - neither rare nor well done." o o -- Ernie Kovacs J roberto sierra O tempered microdesigns NOTICE: \_/ san francisco, ca The ideas and opinions expressed bert at netcom.com herein are not those of the author.