Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Integrals involving square roots
Replies: 4   Last Post: Mar 5, 2007 5:06 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Paul Abbott

Posts: 1,437
Registered: 12/7/04
Re: Integrals involving square roots
Posted: Mar 5, 2007 5:06 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

In article <es90ol$2lt$1@smc.vnet.net>,
"Andre Giroux" <giroux@dms.umontreal.ca> wrote:

> Hi All.
> Mathematica is very unreliable when it computes integrals involving square
> roots. The following were obtained running Mathematica 5.2 and 5.1 with
> Windows XP pro:
>
> In[1]:=
> \!\(\[Integral]\_\(-3\)\%3\(\[Integral]\_\(-\@\(9 - x\^2\)\)\%\(\@\(9 -
> \x\^2\)\)\(\[Integral]\_0\%\(y - 3\)2 y \[DifferentialD]z \[DifferentialD]y
> \[DifferentialD]x\)\)\)
> Out[1]=
> \!\(\(81\ \[Pi]\)\/2\)
> In[5]:=
> \!\(\[Integral]\_0\%2\(\[Integral]\_\(-R\)\%R\( Rz\^2\/\@\(R\^2 - x\^2\)\)
> \\[DifferentialD]x \[DifferentialD]z\)\)
> Out[5]=
> \!\(\(-2\)\ \[Pi]\ Rz\^2\)
>
> In both cases, the sign is wrong and, with the first integral, it is not
> obvious. Interestingly, Mathematica 5.0 computes these integrals correctly.
> So beware!


More than not obvious. I assume that the first integral is

Integrate[2 y, {x, -3, 3}, {y, -Sqrt[9 - x^2], Sqrt[9 - x^2]},
{z, 0, y - 3}]

for which Mathematica returns.

(81 Pi)/2

As far as I can see, this integral _is_ correct. It certainly agrees
with the numerical integral:

NIntegrate[2 y, {x, -3, 3}, {y, -Sqrt[9 - x^2], Sqrt[9 - x^2]},
{z, 0, y - 3}]

127.23450236818807

For the second integral, there is no space between R and z^2 in your
input expression. Moreover, telling Mathematica that R > 0, yields the
correct answer:

Assuming[R > 0, Integrate[(R z^2)/Sqrt[R^2 - x^2],
{z, 0, 2}, {x, -R, R}]]

(8 Pi R)/3

Cheers,
Paul

_______________________________________________________________________
Paul Abbott Phone: 61 8 6488 2734
School of Physics, M013 Fax: +61 8 6488 1014
The University of Western Australia (CRICOS Provider No 00126G)
AUSTRALIA http://physics.uwa.edu.au/~paul




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.