Re: Why doesn't Mathematica know this?
- To: mathgroup at smc.vnet.net
- Subject: [mg22004] Re: Why doesn't Mathematica know this?
- From: Daniel Lichtblau <danl at wolfram.com>
- Date: Thu, 10 Feb 2000 02:25:46 -0500 (EST)
- Organization: Wolfram Research, Inc.
- References: <87lu84$6q9@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
ginsand wrote: > > Hello all, > > I think this is true: > > 4/Sqrt[Pi]*Integrate[x^2*Log[1 + z*Exp[-(x^2)]],{x, 0, Infinity}] > > Is actually: > > -PolyLog[5/2, -z] > > Yet Mathematica doesn't know that. > Moreover, even if I type a numerical value instead of z in the Integral, and > evaluate the expression numericaly (//N), Mathematica doesn't generally > converges (a $RecursionLimit message, supressed and hang), except for > special values of z. > > And finally, look at this: > > In[1]:=Timing[N[4/Sqrt[Pi]* > Integrate[x^2*Log[1 + 1*Exp[-x^2]], {x, 0, Infinity}]]] > > Out[1]={22.67999999999999*Second, 0.8671998802871057} > > In[2]:=Timing[N[-PolyLog[5/2, -1]]] > > Out[2]={0.3300000000000054*Second, 0.8671998890121841} > > It isn't exactly the same result... Still I think the equallity should hold > (It has a known physical meaning). > > Comments, suggestions or insight on this issue? For the numerical check it is typically better to use NIntegrate and to give PrecisionGoal/WorkingPrecision option values to control the quality of the result. For example, by upping the PrecisionGoal (default is 6 for dfault NIntegrate method) I can get fairly close to the numerical result shown above for the PolyLog. In[17]:= Timing[4/Sqrt[Pi]*NIntegrate[x^2*Log[1 + 1*Exp[-x^2]], {x,0,Infinity}]] // InputForm Out[17]//InputForm= {0.019999999999999574*Second, 0.8671998802871057} In[19]:= Timing[4/Sqrt[Pi]*NIntegrate[x^2*Log[1 + 1*Exp[-x^2]], {x,0,Infinity}, PrecisionGoal->12]] // InputForm Out[19]//InputForm= {0.07000000000000028*Second, 0.8671998890121846} Without much trouble I can get essentially full agreement. In[24]:= Timing[4/Sqrt[Pi]*NIntegrate[x^2*Log[1 + 1*Exp[-x^2]], {x,0,Infinity}, PrecisionGoal->20, WorkingPrecision->30]] // InputForm Out[24]//InputForm= {1.3199999999999994*Second, 0.86719988901218413819134718586552489872`20.6973} In[25]:= Timing[N[-PolyLog[5/2, -1], 20]] // InputForm Out[25]//InputForm= {0.07000000000000028*Second, 0.867199889012184138191347179660941`20} Note that these agree well into the guard digits (that is, past the stated precision of 20 digits). As to whether or why the integral should fail, I cannot help. To show the desired identity here are two useful methods. (i) Show the functions agree at one point and have equal derivatives. In[12]:= PolyLog[5/2, 0] Out[12]= 0 In[13]:= 4/Sqrt[Pi]*Integrate[x^2*Log[1], {x, 0, Infinity}] Out[13]= 0 In[15]:= InputForm[D[-PolyLog[5/2, -z], z]] Out[15]//InputForm= -(PolyLog[3/2, -z]/z) In[16]:= InputForm[Simplify[D[4/Sqrt[Pi]*Integrate[x^2*Log[1 + z*Exp[-(x^2)]],{x, 0, Infinity}], z]]] Out[16]//InputForm= -(PolyLog[3/2, -z]/z) (ii) Show the series expansions are equal. In[2]:= <<DiscreteMath`RSolve` In[7]:= SeriesTerm[PolyLog[5/2, -z], {z, 0, n}] // InputForm Out[7]//InputForm= ((-1)^n*UnitStep[-1 + n])/n^(5/2) In[8]:= Integrate[SeriesTerm[4/Sqrt[Pi]*x^2*Log[1 + z*Exp[-(x^2)]], {z,0,n}], {x,0,Infinity}, Assumptions->n>0] // InputForm Out[8]//InputForm= -(((-1)^n*UnitStep[-1 + n])/n^(5/2)) Daniel Lichtblau Wolfram Research