Evaluating Volume of a Sphere in Cartesian Framework

  • Thread starter billiards
  • Start date
  • #1
765
15

Main Question or Discussion Point

I'm trying to sharpen up my maths before I go back to university to start my PhD and am working through Roel Snieder's excellent book 'A Guided Tour of Mathematical Methods for the Physical Sciences'.

The problem I am working on is how to evaluate the volume of a sphere in Cartesian co-ordinates.

I was never really that advanced in my mathematics, but always managed to pick up the bits I needed. I have made some progress on my own but have got stuck.

So far I have formulated the problem in terms of a volume integral:

[tex]\int^{R}_{-R}\int^{\sqrt{R^{2}-x^{2}}}_{-\sqrt{R^{2}-x^{2}}}\int^{\sqrt{R^{2}-x^{2}-y^{2}}}_{-\sqrt{R^{2}-x^{2}-y^{2}}}dzdydx[/tex]

I have performed the integration as far as this:

[tex]\int^{R}_{-R}2\sqrt{R^{2}-x^{2}} sin^{-1}\sqrt{R^{2}-x^{2}}dx[/tex]

Which may well be wrong, because I have had to do quite a bit of looking around and take leaps of faith to get even just that far!
But now I am completely stumped. I have reformulated this integral by trigonometric substitution to give this:

[tex]2R\int^{R}_{-R}cos^{2}\theta sin^{-1}(Rcos\theta) d\theta[/tex]

Which looks a bit easier to solve, but I really need some help here, I am weak and cannot progress.

Thanks
 

Answers and Replies

  • #2
tiny-tim
Science Advisor
Homework Helper
25,832
250
Hi billiards! :smile:

I haven't completely checked your working, but the argumnet of a sin-1 must be dimensionless, so that'll be sin-1√(1 - x2/R2). :wink:
 
  • #3
765
15
Hi tiny-tim,

So you're saying my second equation is wrong?

I suspected it would be because the algebra got quite hairy. I'll go back and have a look.

Cheers
 
  • #4
phyzguy
Science Advisor
4,502
1,446
Your original triple integral formulation looks correct to me, and when I evaluate this, I get
[tex]\frac{4 \pi R^3}{3}[/tex]
, which is of course the right answer. So you must have done something wrong in the integration steps. the first integration of course just gives z, evaluated at the limits of:
[tex]\pm \sqrt{R^2-x^2-y^2}[/tex]
So your next integral is:
[tex]2\int{\sqrt{R^2-x^2-y^2}dy}[/tex]
This indefinite integral is done with a trigonometric substitution, and the result should be:
[tex]y \sqrt{R^2-x^2-y^2}+\left(R^2-x^2\right) \text{ArcTan}\left[\frac{y}{\sqrt{R^2-x^2-y^2}}\right\[/tex]
When you evaluate this at the limits, the first term gives zero, and the second term, when evaluated properly using a limiting procedure, gives:
[tex]\pi \left(R^2-x^2\right)[/tex]
Now you integrate this with respect to x, and you should get:
[tex]\pi \left[R^2x-\frac{x^3}{3}\right\[/tex]
When evaluated at your limits of +/- R, this should give:
[tex]\frac{4 \pi R^3}{3}[/tex]

Hope this helps.
 
  • #5
765
15
Thanks phyzguy!

I realised I slipped up pretty bad in the second integration!

So I get:

[tex]V=\int^{R}_{-R}\int^{\sqrt{R^{2}-x^{2}}}_ {-\sqrt{R^{2}-x^{2}}} 2\sqrt{R^{2}-x^{2}-y^{2}} dy dx [/tex]

Which I am not currently strong enough to do -- hence my slipping up. Can you help me out with the trig substitution I need here?

Thanks
 
  • #7
765
15
Right, I've been away from home but have been dipping in and out of this problem, but I've finally cracked it, so for posterity* here's what I got:

We start with this expression for the volume integral of the volume of a sphere in Cartesian co-ordinates.

[tex]V=\int^{R}_{-R}\int^{\sqrt{R^{2}-x^{2}}}_{-\sqrt{R^{2}-x^{2}}}\int^{\sqrt{R^{2}-x^{2}-y^{2}}}_{-\sqrt{R^{2}-x^{2}-y^{2}}}dzdydx[/tex]

The first integration is very easy, it's just:

[tex]\int^{\sqrt{R^{2}-x^{2}-y^{2}}}_{-\sqrt{R^{2}-x^{2}-y^{2}}}dz = \left[z\right]^{\sqrt{R^{2}-x^{2}-y^{2}}}_{-\sqrt{R^{2}-x^{2}-y^{2}}}=2\sqrt{R^{2}-x^{2}-y^{2}}[/tex]

Nothing fancy needed.

And you're left with:

[tex]V=\int^{R}_{-R}\int^{\sqrt{R^{2}-x^{2}}}_{-\sqrt{R^{2}-x^{2}}}2\sqrt{R^{2}-x^{2}-y^{2}}}dydx[/tex]

The second integration got me a bit stuck because you need to use a trigonometric substitution and I'm not too familiar with those. But I figured it out in the end and it really wasn't too difficult.

[tex]\int^{\sqrt{R^{2}-x^{2}}}_{-\sqrt{R^{2}-x^{2}}}2\sqrt{R^{2}-x^{2}-y^{2}}}dy = 2(R^{2}-x^{2})\int^{\sqrt{R^{2}-x^{2}}}_{-\sqrt{R^{2}-x^{2}}}cos^{2}\theta d\theta = 2(R^{2}-x^{2})\left[\frac{\theta}{2}+\frac{sin2\theta}{2}\right] ^{\sqrt{R^{2}-x^{2}}}_{-\sqrt{R^{2}-x^{2}}}[/tex]

But remember we did a trig substitution where
[tex]\theta = sin^{-1}(y/\sqrt{R^{2}-x^{2}})[/tex]

Which when substituted back in and evaluated gives:
[tex]\pi(R^{2}-x^{2})[/tex]

So now our volume expression is:

[tex]V=\pi\int^{R}_{-R}(R^{2}-x^{2})dx[/tex]

Which is quite an easy one if you've followed it this far. Another trig substitution is helpful.

[tex]\pi\int^{R}_{-R}(R^{2}-x^{2})dx = \pi R^{3}\int^{R}_{-R}cos^{3}\theta d\theta[/tex]

This turns out to be:

[tex]\pi R^{3}\int^{R}_{-R}cos^{3}\theta d\theta = \pi R^{3} \left[sin \theta - \frac{sin ^{3} \theta} {3} \right]^{R}_{-R}[/tex]

Which when evaluated gives me the familiar expression:

[tex]V=\frac{4}{3}\pi R^{3}[/tex]


I hope there's no mistakes in there!:smile:

*In trying to perform some of these integration I found it very helpful to dig up old threads here at PF, so I thought I would return the favour by documenting the route I found for this problem here.

(I think the main reason this took me so long was because I was determined not to cheat by using a programme to help me with any of the integrations, doing this by hand has really helped me to brush up my mathematics and get rid of years of rust, some things I've learned doing this were even completely new! It has also immensely satisfying, although seeing the ingenuity of real mathematicians I've come across in my background reading has also been incredibly humbling.)
 
  • #8
phyzguy
Science Advisor
4,502
1,446
Looks good! Just a comment - no need for a trig substitution of the third integral, it is simply powers of x, so you should be able to integrate it directly. Remember:
[tex]\int{x^n dx} = \frac{x^{n+1}}{n+1}[/tex]
 
  • #9
765
15
Oh Yeh :redface:

Thanks by the way phyzguy, you give sound advice :smile:
 

Related Threads on Evaluating Volume of a Sphere in Cartesian Framework

  • Last Post
Replies
7
Views
5K
  • Last Post
Replies
15
Views
6K
  • Last Post
Replies
5
Views
15K
Replies
7
Views
3K
  • Last Post
Replies
7
Views
1K
  • Last Post
Replies
24
Views
1K
Replies
4
Views
592
  • Last Post
Replies
7
Views
5K
Replies
9
Views
2K
Replies
4
Views
708
Top