       Re: Integrate got slower in Version 3.0/Example

• To: mathgroup at smc.vnet.net
• Subject: [mg8990] Re: Integrate got slower in Version 3.0/Example
• From: Paul Abbott <paul at physics.uwa.edu.au>
• Date: Tue, 7 Oct 1997 03:35:36 -0400
• Organization: University of Western Australia
• Sender: owner-wri-mathgroup at wolfram.com

```Elias Saab wrote:
>
> In version 2.2
>
> In:= Integrate[Sqrt[R^2-x^2-y^2],{x,-R,R},
>         {y,-Sqrt[R^2-x^2],Sqrt[R^2-x^2]}]//Timing
>
>                             3
>                       2 Pi R
> Out= {5.17 Second, -------}
>                          3
>
> In Version 3.0
> Integrate[Sqrt[R^2-x^2-y^2],{x,-R,R},
>         {y,-Sqrt[R^2-x^2],Sqrt[R^2-x^2]}]//Timing
> Integrate::"gener": "Unable to check convergence"
>
>                            3
>                       2 Pi R
> Out= {32.8 Second, -------}
>                          3

For

In:= Integrate[Sqrt[R^2 - x^2 - y^2], {x, -R, R},
{y, -Sqrt[R^2 - x^2], Sqrt[R^2 - x^2]}]//Timing

Integrate::"gener": "Unable to check convergence"

Out=
3
2 Pi R
{13.92 Second, -------}
3

you can turn off GenerateConditions:

In:= SetOptions[Integrate,GenerateConditions->False]
Out= {Assumptions->{},GenerateConditions->False,
PrincipalValue->False}

but this is not faster for this case:

In:= Integrate[Sqrt[R^2 - x^2 - y^2], {x, -R, R},
{y, -Sqrt[R^2 - x^2], Sqrt[R^2 - x^2]}]//Timing

Integrate::"gener": "Unable to check convergence"

Out=
3
2 Pi R
{13.41 Second, -------}
3

However, why not use polar coordinates anyway?

In:= PowerExpand[Integrate[r*Sqrt[R^2 - r^2],
{theta, 0, 2*Pi}, {r, 0, R}]]//Timing

Out=
3
2 Pi R
{0.41 Second, -------}
3

Cheers,
Paul
s
____________________________________________________________________
Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia
Nedlands WA  6907                     mailto:paul at physics.uwa.edu.au
AUSTRALIA                             http://www.pd.uwa.edu.au/~paul

God IS a weakly left-handed dice player
____________________________________________________________________

```

• Prev by Date: Re: Integrate got slower in Version 3.0/Example
• Next by Date: Re: Problem with simultaneous equations with several variables - population genetics
• Previous by thread: Re: Integrate got slower in Version 3.0/Example
• Next by thread: TraceInternal and OptionQ