MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Error?


"Baris Altunkaynak" <altunkai at boun.edu.tr> wrote:
> This integral below give 0 on Mathematica 5.0
> Integrate[Sqrt[R^2 - x^2], {x, -R, -R + d},
> Assumptions -> R > 0 && d > 0 && d < 2R]
>
> This is a mistake I think, isn't it?

Certainly! (And please report this bug!)

Here's my best suggestion for getting a correct answer from Mathematica:

In[1]:=
Integrate[Sqrt[R^2 - x^2], x]

Out[1]=
(1/2)*(x*Sqrt[R^2 - x^2] + R^2*ArcTan[x/Sqrt[R^2 - x^2]])

In[2]:=
Limit[%, x -> -R]

Out[2]=
-((Pi*R^2)/4)

In[3]:=
Simplify[%% /. x -> -R + d]

Out[3]=
(1/2)*(Sqrt[(-d)*(d - 2*R)]*(d - R) + R^2*ArcTan[(d - R)/Sqrt[(-d)*(d - 2*R)]])

In[4]:=
% - %%

Out[4]=
(Pi*R^2)/4 +
(1/2)*(Sqrt[(-d)*(d - 2*R)]*(d - R) + R^2*ArcTan[(d - R)/Sqrt[(-d)*(d - 2*R)]])

I believe that is correct. Unfortunately though, I am unable to get
FullSimplify to give me the simpler result

  (1/2)*(Sqrt[d*(2*R - d)]*(d - R) + R^2*ArcCos[1 - d/R])

But that may just be due to lack of cleverness on my part.

David Cantrell


  • Prev by Date: Re: Mesh generation in 2D
  • Next by Date: RE: Error?
  • Previous by thread: Error?
  • Next by thread: Re: Re: Error?