Re: [Integrate] Why two results of same eq. are different?
- To: mathgroup at smc.vnet.net
- Subject: [mg44691] Re: [mg44655] [Integrate] Why two results of same eq. are different?
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Fri, 21 Nov 2003 05:13:14 -0500 (EST)
- References: <200311200816.DAA01508@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On 20 Nov 2003, at 17:16, Sung Jin Kim wrote: > Dear all, > > I got very extraordinary results today from below two same integrals > except one is symbolic one and the other is numeric one: > A. In[1]= N[Integrate[ Log[2, 1 + 10*x]*Exp[-x]*x, {x, 0, Infinity}]] > Out[1]= -3.77002 > B. In[2]= NIntegrate[ Log[2, 1 + 10*x]*Exp[-x]*x, {x, 0, Infinity}] > Out[2]= 4.05856 > > Why did I got the different results of these, surprisingly? > > Thank you in advance! > --- > Sung Jin Kim > A member of MCL in SNU: kimsj at mobile.snu.ac.kr, > A MTS of i-Networking Lab in SAIT: communication at samsung.com > > > The answer given by Integrate is clearly wrong and seems to be due to Mathematica's failure to deal with a difficult limit. Not that if we set f[a_] = Integrate[Log[2, 1 + 10*x]*Exp[-x]*x, {x, 0, a}, Assumptions -> a > 0] (1/Log[1024])*(Log[10*a + 1]/E^a - 10*E^(1/10)*Gamma[2, a + 1/10]*Log[10*a + 1] + E^(1/10)*MeijerG[{{}, {1}}, {{0, 0}, {}}, a + 1/10] - 10*E^(1/10)*MeijerG[{{}, {1, 1}}, {{0, 0, 2}, {}}, a + 1/10] + 10*E^(1/10)*MeijerG[{{}, {1, 1}}, {{0, 0, 2}, {}}, 1/10] - E^(1/10)*MeijerG[{{}, {1}}, {{0, 0}, {}}, 1/10]) Then this agrees with NIntegrate, e.g. NIntegrate[Log[2,1+10*x]*Exp[-x]*x,{x,0,20}] 4.05856 N[f[20]] 4.05856 (Note also that using N for large a's will produce wrong answers unless you use more digits. For example, compare N[f[40]] with N[f[40],20]). In any case, the answer given for Integrate is almost certainly right, but Mathematica is unable to correctly find the limit of the expression as a->Infinity. It seems to preform some numerical checks that it is unable to carry out. Andrzej Kozlowski Chiba, Japan http://www.mimuw.edu.pl/~akoz/
- References:
- [Integrate] Why two results of same eq. are different?
- From: "Sung Jin Kim" <kimsj@mobile.snu.ac.kr>
- [Integrate] Why two results of same eq. are different?