Re: Why does this happen?
- To: mathgroup at smc.vnet.net
- Subject: [mg78681] Re: Why does this happen?
- From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
- Date: Sat, 7 Jul 2007 05:52:48 -0400 (EDT)
- Organization: The Open University, Milton Keynes, UK
- References: <f6ks38$lbm$1@smc.vnet.net>
Budaoy wrote:
> I have a problem in calculating this integral shown below:
>
> Integrate[Log[1+Exp[x]/Sqrt[x]],{x,0,Infinity}]
> Pi^2/6
>
> N[%]
> 1.64493
>
> NIntegrate[Log[1+Exp[x]/Sqrt[x]],{x,0,Infinity}]
> 1.01799
>
> Where does this difference come from and which one is correct?
How did you get these results? On what platform are you working?
(* Mathematica 6.0 -- Similar messages with 5.2 *)
In[1]:= Integrate[Log[1 + Exp[x]/Sqrt[x]], {x, 0, Infinity}]
During evaluation of In[1]:= Integrate::idiv: Integral of Log[1+\
\[ExponentialE]^x/Sqrt[x]] does not converge on {0,\[Infinity]}. >>
Out[1]= Integrate[Log[1 + E^x/Sqrt[x]], {x, 0, Infinity}]
In[2]:= NIntegrate[Log[1 + Exp[x]/Sqrt[x]], {x, 0, Infinity}]
During evaluation of In[2]:= NIntegrate::inumri: The integrand Log[1+\
\[ExponentialE]^x/Sqrt[x]] has evaluated to Overflow, Indeterminate, \
or Infinity for all sampling points in the region with boundaries \
{{0.,4.64782*10^14}}.
Out[2]= NIntegrate[Log[1 + E^x/Sqrt[x]], {x, 0, Infinity}]
Regards,
Jean-Marc