RE: [Integrate] Why two results of same eq. are different?

• To: mathgroup at smc.vnet.net
• Subject: [mg44705] RE: [mg44655] [Integrate] Why two results of same eq. are different?
• From: "Sung Jin Kim" <kimsj at mobile.snu.ac.kr>
• Date: Fri, 21 Nov 2003 05:13:26 -0500 (EST)
• Organization: MCL,SNU
• Reply-to: <kimsj at mobile.snu.ac.kr>
• Sender: owner-wri-mathgroup at wolfram.com

```Thank you, Andrzei.

However, why are my results in terms of the parameter (a) also different
I got the result as below:
In[1]:=  f[a_] = Integrate[Log[2, 1 + 10*x]*Exp[-x]*x, {x, 0, a},
Assumptions -> a > 0]
Out[1]:=
1/(10*Log[2])*(Exp[-a]*(10+Exp[a](-10+11*Exp[1/10]*Ei[-1/10]+11*Exp[1/10
]*Gamma[0,1/10+a])-10*(1+a)*Log[1+10*a]))
Furthermore numerical result is still incorrect:
In[3]:=  N[f[20]]
Out[3]:=  -4.63986  ==> Note that this is same to using 'limit'.

BR,
---
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

-----Original Message-----
From: Andrzej Kozlowski [mailto:akoz at mimuw.edu.pl]
To: mathgroup at smc.vnet.net
Subject: [mg44705] Re: [mg44655] [Integrate] Why two results of same eq. are
different?

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/

```

• Prev by Date: Re: Re: Improper integral
• Next by Date: RE: Re: filled plot on part of x-interval
• Previous by thread: Re: [Integrate] Why two results of same eq. are different?
• Next by thread: RE: [Integrate] Why two results of same eq. are different?