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

Calculating volume & moment of inertia

  1. Jul 20, 2013 #1
    Hi there,

    I am trying to calculate both volume and moment of inertia of shapes which surface coordinates are depicted by following equation:

    |xn| + |yn| + |zn| = Rn

    When n is 1 it is simple octahedron, when it is 2, it is sphere and then choosing any n, it becomes something else.

    I will try to depict how I am trying to find volume.

    Firstly, I am considering a 1/8 of the shape (because it's really symmetrical). To find out an area of little sheet of the shape: Area = ∫ x dy = ∫ (R^n - |y^n|)^(1/n) dy;

    Which is alright. Now, what I am thinking, in order to find out volume I could do following integral:

    ∫ Area dR = ∫ ∫ (R^n - |y^n|)^(1/n) dy dR where boundaries, both of them, are 0 to R.

    When I try to solve this equation, it only works for the sphere. For any other n, it gives false answer. Please, comment on it.

    Speaking about moment of inertia, I was thinking once I understand and find how to depict all those sheets of the shape, I could try to find each ones moment of inertia and then add them all somehow.

    Any help is appreciated, thank you.
  2. jcsd
  3. Jul 20, 2013 #2


    User Avatar
    2017 Award

    Staff: Mentor

    How can you integrate over R, if R is a constant parameter? This integral should run over y or z. In addition, the area is not the same for all y (or z), so your formula for the area needs a modified limit.

  4. Jul 20, 2013 #3
    Hmm, what do you think such for such expression then:

    Volume = ∫∫( R^n - |y^n| - |z^n|)^(1/n) dy dz (from 0 to R, from 0 to R) ?

    I know it does not work but I can't understand why it doesn't.
    Last edited: Jul 20, 2013
  5. Jul 20, 2013 #4


    User Avatar
    2017 Award

    Staff: Mentor

    You'll have to adapt one integration limit a bit, otherwise you run into regions where the integrand is not well-defined. If you do that, it should work.
  6. Jul 20, 2013 #5
    If I change first boundaries to: from 0 to (R-z) and change equation to:

    ∫∫|(R-z)^n - y^n|^(1/n) dy dz

    It gives good results. Is that valid for every n?
  7. Jul 20, 2013 #6


    User Avatar
    2017 Award

    Staff: Mentor

    That is not the right boundary (apart from n=1). How did you get that formula?
  8. Jul 20, 2013 #7
    Hmm, yep, I can see that it does not work every n. What I was trying to do in the first place is to make a program which simply sums up my area integrals * increment (e.g. 0.001). If you start with 1/4 of the area, than every increment the equation shrinks and changes R value by 1 increment's value and also boundaries change accordingly. So if increment is small enough it gives a good approximation of Volume but it only uses one integral.

    Area = Int ((R-z)^n - y^n)^(1/n) dy;
    dV = Area * increment;
    Change Z from 0 to R;

    So I was trying to adapt that somehow to make it double integral.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook