       Re: Inconsistent behaviour of Integrate

• To: mathgroup at smc.vnet.net
• Subject: [mg112424] Re: Inconsistent behaviour of Integrate
• From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
• Date: Wed, 15 Sep 2010 04:38:14 -0400 (EDT)

```This depends on the speed on your computer. On my MacBook PRI I get:

In:== Integrate[
Sqrt[(x - 1/2)^2 + (y - 1/2)^2], {x, 0, 1}, {y, 0, 1}]

Out== (1/24)*(4*Sqrt + Log[17 + 12*Sqrt])

However, if I use Maxim Rytin's trick to reduce performance thus:

Dynamic[Pause[.5], UpdateInterval -> 1]

ClearSystemCache[]

Then I get:

In:== Integrate[
Sqrt[(x - 1/2)^2 + (y - 1/2)^2], {x, 0, 1}, {y, 0, 1}]

Out== (1/6)*(Sqrt + ArcSinh)

Andrzej Kozlowski

On 14 Sep 2010, at 11:12, Andreas Maier wrote:

> Hello,
>
> I'm using Mathematica 7.0.1.0 on Linux x86 (64bit). I have a notebook
> file, where I integrate the same integral twice:
>
> In:== Integrate[Sqrt[(x - 1/2)^2 + (y - 1/2)^2], {x, 0, 1}, {y, 0,
> 1}]
> Out== 1/6 (Sqrt + ArcSinh)
>
> In:== Integrate[Sqrt[(x - 1/2)^2 + (y - 1/2)^2], {x, 0, 1}, {y, 0,
> 1}]
> Out== 1/24 (4 Sqrt + Log[17 + 12 Sqrt])
>
> As you can see from the output, integrating the same integral a second
> time gives a different result. If I integrate the same integral a
> third and a fourth time I always get the second result again. Only if
> I restart the mathematica kernel, I get the first result again.
> The results are equivalent, since
>
> Log[17 + 12 Sqrt] == Log[(1 + Sqrt)^4] == 4* Log[(1 + Sqrt) == 4=
* ArcSinh
>
> but somehow Mathematica seems to be able to do this simplification
> only once. Is this inconsistent behaviour a bug? Is there a
> possibility to give mathematica a hint, so that he always find the
> first solution 1/6 (Sqrt + ArcSinh) to the integral?
> From
>
> In:== Expand[(1 + Sqrt)^4]
> Out== 17 + 12 Sqrt
>
> In:== Factor[%]
> Out== 17 + 12 Sqrt
>
> I also figured that Mathematica doesn't seem to be able to factorize
> an expression like 17 + 12 Sqrt into (1 + Sqrt)^4. Is this a
> known problem? Or should I use a different command to find this
> factorization?
>
> Sincerely,
> Andreas Maier
>

```

• Prev by Date: Re: PolarPlot3D?
• Next by Date: Re: Inconsistent behaviour of Integrate
• Previous by thread: Re: Inconsistent behaviour of Integrate
• Next by thread: Re: Inconsistent behaviour of Integrate