Re: Simple integral problem

*To*: mathgroup at smc.vnet.net*Subject*: [mg32660] Re: [mg32650] Simple integral problem*From*: BobHanlon at aol.com*Date*: Sat, 2 Feb 2002 01:19:36 -0500 (EST)*Sender*: owner-wri-mathgroup at wolfram.com

In a message dated 2/1/02 5:40:01 PM, kkumer at phy.hr writes: >I tried this simple-looking integral in Mathematica 4.0 for Unix: > > Integrate[x(1 - x)Log[1 + 1/x], {x, 0, 1}] > >and I got > > -37/36 -2 Log[2]/3 ( = -1.48988 ) > >which seems to be wrong because: > > NIntegrate[x*(1 - x)*Log[1 + 1/x], {x, 0, 1}] = 0.204569 > >If perform undefinite Integral[ ... , x] and than do Limit[..]s, >I get the right result. >If I put together the argument of Log: 1+1/x -> (x+1)/x, >I again get the right result: 2/3 -2 Log[2]/3. > >Is this some bug or am I missing something? I have to do a lot of similar >integrals these days so I would be glad if someone could shed some light >on >this. I find that Integrate is more reliable if the integrand is simplified as much as practical prior to integration. Integrate[Expand[ x(1-x)Log[1+1/x]],{x,0,1}] (-(2/3))*(-1 + Log[2]) %==Integrate[FunctionExpand[ x(1-x)Log[1+1/x]],{x,0,1}] True and, as you noted, %%==Integrate[x(1-x)Log[ Together[1+1/x]],{x,0,1}] True Bob Hanlon Chantilly, VA USA