Calculate the inertia tensor for a cuboid with non-uniform mass distribution

integrationphysicsrotationstensors

I've posted a similar question here yesterday that I though would solve my problem but I don't think it fully encompasses the problem I'm having so I'm posting a new question (I do think it's a significantly different question)
I need to find the principal moment of inertia of a cuboid with non uniform mass distribution which means the CoM will not be on its geometrical center. To do so , I want to calculate its inertia tensor at the CoM with non-principal axes (parallel to its geometry axes), then calculate the eigenvalues of that tensor that will give me the principal moments of inertia. I know how to calculate it for a centered CoM, with a triple integral yielding:
\begin{equation}
\begin{bmatrix}
\frac{m}{12}(c^2+b^2) & 0& 0 \\
0 & \frac{m}{12}(a^2+c^2)& 0 \\
0 & 0& \frac{m}{12}(a^2+b^2) \\
\end{bmatrix}
\end{equation}

I also know how to get the products of inertia for this case, they just happen to be zero! I suspect what I have to do is related with changing the limits of integration to something else rather than (a,0) (b,0) and (c,0) but how do I input the coordinates of the center of mass so that this yields the non-diagonal tensor I want? If there's another way of doing this I'm all ears anyway! Thanks!

Best Answer

Hint:

It seems that all what you need is the principle of inertia wrt to a translation of the axes:
The moment of inertia of a body wrt to a given line is equal to the moment wrt that line of the mass of the whole body concentrated on the barycenter, plus the moment of inertia of the body around the line when parallel translated into the barycenter.

I found the reference (official naming in english) you requested, that's called Parallel axis theorem.

-- addendum --

If $J$ indicates the moments in the base reference system (origin in the geometric center) and $I$ those with the reference translated at the barycebter $(x_b, y_b, z_b)$ then for instance $$ \eqalign{ & J_{\,x\,y} = \mathop{\int\!\!\!\int\!\!\!\int}\limits_{\kern-5.5pt V} {xy\rho (x,y,z)dV} = \mathop{\int\!\!\!\int\!\!\!\int}\limits_{\kern-5.5pt V} {\left( {x_b + \Delta x} \right)\left( {y_b + \Delta y} \right)\rho (x,y,z)dV} = \cr & = \mathop{\int\!\!\!\int\!\!\!\int}\limits_{\kern-5.5pt V} {\left( {x_b y_b + x_b \Delta y + y_b \Delta x + \Delta x\Delta y} \right)\rho (x,y,z)dV} = \cr & = x_b y_b \mathop{\int\!\!\!\int\!\!\!\int}\limits_{\kern-5.5pt V} {\rho (x,y,z)dV} + 0 + 0 + \mathop{\int\!\!\!\int\!\!\!\int}\limits_{\kern-5.5pt V} {\Delta x\Delta y\rho (x,y,z)dV} = \cr & = x_b y_b M + I_{\,x\,y} \cr} $$

So, once you have the matrix, i.e. the integrals, in the base reference, and the position of the barycenter in that reference, it's quite easy to get the matrix in the reference having the barycenter as origin.