I want to find the moment of inertia for a cylindrical segment, show below:
On Wolfram MathWorld, I found a formula for the volume of a cylindrical segment. Let
$$h(r,\theta) = h_1 +\frac{1}{2}\left(1+\frac{r}{R}\cos(\theta) \right) (h_2-h_1)$$ Then $$V =\int_0^R \int_0^{2\pi}\int_{0}^{h(r,\theta)}rdzd\theta dr$$
Note, I'm using cylindrical coordinates. My source is here
(Note they have typo in the order of integration)
However, I've recently been calculating a lot of moments of inertia and I almost always need to integrate $z$ from $-\frac{h}{2}$ to $\frac{h}{2}$. So I'm concerned the limits of integration Mathworld suggests for the volume would not work for the moment of inertia.
I think I can show easily this integral is not correct. If this integral were correct, we could set $h_1 = h_2 = h$. When we do this, $h(r,\theta) = h$. Then the integral becomes
$$\mathbf{I} = \int_{0}^{R}\int_{0}^{2\pi}\int_{0}^{h}\begin{bmatrix} y^2 + z^2 & -xy & -xz\\ -yx & x^2 + z^2 & -yz\\ -zx & -zy & x^2 + y^2 \\ \end{bmatrix} r dzd\theta dr$$
If you do this, you get $$ \left( \begin{array}{ccc} \frac{1}{12} m \left(4 h^2+3 R^2\right) & 0 & 0 \\ 0 & \frac{1}{12} m \left(4 h^2+3 R^2\right) & 0 \\ 0 & 0 & \frac{m R^2}{2} \\ \end{array} \right) $$ which does not equal the moment of inertia tensor of a cylinder, which you can find here.
https://en.wikipedia.org/wiki/List_of_moments_of_inertia
However, if you do
$$\int_0^R \int_0^{2\pi}\int_{-\frac{h(r,\theta)}{2}}^{\frac{h(r,\theta)}{2}}\begin{bmatrix} y^2 + z^2 & -xy & -xz\\ -yx & x^2 + z^2 & -yz\\ -zx & -zy & x^2 + y^2 \\ \end{bmatrix}rdzd\theta dr$$
Then in the simple case of $h_1 = h_2 = h$, you get
$$\left( \begin{array}{ccc} \frac{1}{12} m \left(h^2+3 R^2\right) & 0 & 0 \\ 0 & \frac{1}{12} m \left(h^2+3 R^2\right) & 0 \\ 0 & 0 & \frac{m R^2}{2} \\ \end{array} \right)$$
which is the correct moment of inertia tensor for a regular cylinder.
However, I'm not sure if this special case is sufficient to show that it works in general for a cylindrical segment. I only showed it is true for a regular cylinder.
Can someone explain intuitively why these limits of integration would be appropriate for the case of the cylindrical segment? I don't really get intuitively how this integral works geometrically to represent the cylindrical segment, so if someone could explain intuitively why it makes sense (or doesn't) that would be great. Then I could be confident conceptually it is right. At the moment, all I'm relying on is this one check of reproducing a regular cylinder's inertia tensor and I have no physics intuition at all.