Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Evaluating Volume of a Sphere in Cartesian Framework

  1. Mar 13, 2010 #1
    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:


    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.

  2. jcsd
  3. Mar 13, 2010 #2


    User Avatar
    Science Advisor
    Homework Helper

    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:
  4. Mar 13, 2010 #3
    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.

  5. Mar 13, 2010 #4


    User Avatar
    Science Advisor

    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:
    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.
  6. Mar 13, 2010 #5
    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?

  7. Mar 13, 2010 #6


    User Avatar
    Science Advisor

  8. Mar 16, 2010 #7
    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.


    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:


    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:

    So now our volume expression is:


    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.)
  9. Mar 16, 2010 #8


    User Avatar
    Science Advisor

    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]
  10. Mar 16, 2010 #9
    Oh Yeh :redface:

    Thanks by the way phyzguy, you give sound advice :smile:
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook