Why is it for a cylinder, the integral goes from 0 to the outside r, but for a sphere, it goes from -r to r?
Do you have examples of where you’re seeing this? It’s hard to say without seeing the particular calculations – there’s not a single, correct way to do them.
But, taking a guess without seeing the actual integrals you’re questioning: The moment of inertia needs to be calculated around a particular axis. For a cylinder, assuming the axis is the obvious one, integrating from 0 to r would correspond to adding up the contributions of each cylindrical shell, from the axis outward. There’s presumably another integral inside that, integrating from one end of the cylinder to the other.
For a sphere, let’s assume that the axis goes through the north and south poles. An outer integral from -r to r likely is looking at the contribution of each horizontal disc, with the inner integral presumably going from 0 to the radius of that disc (\sqrt{r^2-x^2} if the outer variable is x) to calculate that. You could also do the integration in the opposite order, with the outer integral from 0 to r, if you want to look at the contribution of each vertical cylindrical shell, but that’s a little less natural, as the height of the cylinders will vary, and the inner integral would be from -\sqrt{r^2-x^2} to \sqrt{r^2-x^2}.
Moment of Inertia, Sphere for the sphere
Moment Of Inertia Of A Solid Cylinder - Formulas And Derivation for the cylinder
I think I figured it out now…the way I look at it is the cylinder, based on the method here, uses a variable inside the equation for height while for the sphere, the integral from -R to R is for the complete height.
The way the sphere is derived in that method is kind of dependent already on the knowledge of the moment of inertia of the cylinder in that it divides the sphere into a collection of cylinders with infinitesimal height, uses the already known moment of inertia formula for those cylinders, and then integrates.
If we didn’t already know how to compute the moment of inertia for a cylinder, the derivation would probably have to include another explicit integral from 0 to sqrt(R^2 - y^2) to get the moment of inertia of each slice.
Strictly speaking true, but it’s a trivial integral.