Tensor of inertia of a cuboid
The mass moment of inertia describes how an object resists changes to its rotation. For a rigid body, this property is represented by a tensor, which, in my case of a cuboid, becomes a diagonal matrix when computed with respect to the center of mass C.
Let’s consider a cuboid with dimensions h, w, and d along the x, y, and z axes, respectively, and with a uniform mass density \rho.
The moments of inertia, I_{xx}, I_{yy}, and I_{zz}, describe the resistance to rotation about the x, y, and z axes, respectively. I compute each of these using integration.
For I_{xx}:
I_{xx} = \rho \int_{-h/2}^{h/2} \int_{-d/2}^{d/2} \int_{-w/2}^{w/2} (y^2 + z^2) \, \mathrm dx \, \mathrm dy \, \mathrm dz
After evaluating the integral I obtain:
I_{xx} = m \frac{w^2 + d^2}{12}
For I_{yy}:
I_{yy} = \rho \int_{-h/2}^{h/2} \int_{-w/2}^{w/2} \int_{-d/2}^{d/2} (x^2 + z^2) \, \mathrm dx \, \mathrm dy \, \mathrm dz
After evaluating the integral I obtain:
I_{yy} = m \frac{h^2 + d^2}{12}
For I_{zz}:
I_{zz} = \rho \int_{-h/2}^{h/2} \int_{-w/2}^{w/2} \int_{-d/2}^{d/2} (x^2 + y^2) \, \mathrm dx \, \mathrm dy \, \mathrm dz
After evaluating the integral I obtain:
I_{zz} = m \frac{h^2 + w^2}{12}
I compute the products of inertia, I_{xy}, I_{xz}, and I_{yz}, describe the inertial coupling between different axes of rotation. For symmetry, when computed with respect to the center of mass of the cuboid, all of them are zero.
Combining the moments and products of inertia, I form the mass moment of inertia matrix:
\begin{aligned} \mathbf{I} &= \begin{bmatrix} I_{xx} & I_{xy} & I_{xz} \\ I_{xy} & I_{yy} & I_{yz} \\ I_{xz} & I_{yz} & I_{zz} \end{bmatrix} \\ &= \frac{mh^2}{36} \begin{bmatrix} 2 & -1 & 0 \\ -1 & 2 & 0 \\ 0 & 0 & 4 \end{bmatrix} \end{aligned}
This matrix shows the diagonal structure, as expected for a cuboid with the axes aligned with its edges and with respect to its center of mass.
For more insights into this topic, you can find the details here.