Re: Why two results of same eq. are different?
- To: mathgroup at smc.vnet.net
- Subject: [mg44753] Re: Why two results of same eq. are different?
- From: "Tanel Telliskivi" <maria.08.6689847 at telia.com>
- Date: Tue, 25 Nov 2003 00:45:21 -0500 (EST)
- References: <200311200816.DAA01508@smc.vnet.net> <bpkpd7$ce1$1@smc.vnet.net>
- Reply-to: "Tanel Telliskivi" <maria.08.6689847 at telia.com>
- Sender: owner-wri-mathgroup at wolfram.com
Hello, "4.1 for Microsoft Windows (December 11, 2000)" In[2]:= f[a_]=Integrate[Log[2,1+10*x]*Exp[-x]*x,{x,0,a},Assumptions\[Rule]a>0] Out[2]= -((1/(20*Log[2]))*((20 - 20*E^a + 18*E^(1/10 + a)* ExpIntegralEi[-(1/10)] + 18*E^(1/10 + a)*Gamma[0, 1/10 + a] + 9*E^(1/10 + a)*Log[1/(-1 - 10*a)] - 9*E^(1/10 + a)* Log[-1 - 10*a] + 20*Log[1 + 10*a] + 20*a*Log[1 + 10*a] + 18*E^(1/10 + a)*Log[1 + 10*a])/E^a)) Out[4]= 4.05855803419172 + 0.*I /Tanel Telliskivi "Andrzej Kozlowski" <akoz at mimuw.edu.pl> skrev i meddelandet news:bpkpd7$ce1$1 at smc.vnet.net... > 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?