# Finding an equivalent shape for a given mass and 3 mass moments of inertia

So I apologize if this is just impossible, but I was wondering if there was a way to find say, the dimensions of a box of a given density that would have the same mass and moments of inertia of another arbitary shape with a different density?

I found a solution to finding the mass moments of inertia from this question (Can any physical rigid body be represented by an ellipsoid with the same angular dynamics?), but it uses a single mass term which means by the end of the calculation you do have the correct mass moments of inertia, but the density is completely arbitrary. I have an idea of what material this box would be made of, so I need to have a very specific density.

Then I started thinking maybe it's possible with a more complex shape or combination of shapes. The equations very quickly become non-linear though and I cannot solve them with Cramer's rule.

I was wondering if this problem could be solved with linear algebra or if it required numerical methods or if it is just impossible...

Any input is appreciated! Thank you!