sorry, density is not constant... it is given by x^2 + y^2 + z^2.
I know that moment of inertia is the integral of r^2 * dm, and I can do everything except that for r^2, I need the distance from any point (x,y,z) to the line through (0,0,0) and (1,1,1). This part has everyone here stumped!
I know this doesn't help in any way, but I'm just curious.
I would have thought that you would need to know mass distribution of the object. Isn't that the only way you can determine the location of the centre of mass and then from that you find the distance from the axis through the centre of mass to the actual axis of rotation.
I think this question must come from a statics class or CE class, but probably not a classical mechanics class.
Any physics class I took would ask for the momentS of inertia or the intertia tensor.
If the object has no bound, what are going to integrate from? 0 -> oo?
Anyway, this will answer your main question
The distance between a point and a line is:
d: (P x L) / |P|
where P: the vector from line point 1 (origin in this case) to the point in question (x,y,z) in this case.
L: the vector of the line
x: the cross product.
Another way to look at it is that the distance from (x,y,z) to the line would be the the magnitude of the line to (x,y,z) times the sine of the angle inbetween: |xyz|sin(theta)
and using the cross product identity you get the right answer.