How do I find the center of mass of an homogeneous solid cube of side $L$ analytically?

I guess that by side $L$ means that the length of the sides is $L$ and the area is $L^2$, but I'm not sure. I know that since it is homogeneous, if I center it at the origin its center of mass would be at the origin $(0,0,0)$, but how do I find this analytically?

  • $\begingroup$ Do you know the general equation for the center of mass of a system? $\endgroup$ Mar 17, 2019 at 2:05
  • $\begingroup$ Only for two dimensions $ X_{cM}=\frac{\int\sigma x dA}{\int\sigma dA}$ and $Y_{cM}=\frac{\int\sigma y dA}{\int\sigma dA}$. $\endgroup$ Mar 17, 2019 at 2:32
  • $\begingroup$ Ok. So then just generalize to 3 dimensions. If you can do double integrals then you can do triple integrals. $\endgroup$ Mar 17, 2019 at 2:44
  • $\begingroup$ I don't know how to do triple integrals, where did I do double integrals? $\endgroup$ Mar 17, 2019 at 2:48
  • $\begingroup$ $\int dA=\int\int dx dy$ right? $\endgroup$ Mar 17, 2019 at 2:57

1 Answer 1


Hint: The centre of mass is at $$\vec{c_m} = \int_{-L/2}^{L/2} \int_{-L/2}^{L/2} \int_{-L/2}^{L/2} (x,y,z)\ \rho(x,y,z)\ dx\ dy\ dz / m .$$ Note: I've used $(x,y,z)$ as the position vector and $\rho(x,y,z)$ as the density function.

Since the cube is homogeneous, $\rho$ is constant.

Can you compute the rest?

Edit: I've corrected the limits of the integral so that the centre of the cube is at $(0,0,0)$. I'm sorry for missing that part.

Regarding the computation of the integrals, we can begin by simplifying the expression. Since $\rho$ is constant, instead of $\rho(x,y,z)$ I'll simply write $\rho$. $$\vec{c_m} = \int_{-L/2}^{L/2} \int_{-L/2}^{L/2} \int_{-L/2}^{L/2} (x,y,z) \rho\ dx\ dy\ dz / m .$$

Hence, $$\vec{c_m} = \frac{\rho}{m} \int_{-L/2}^{L/2} \int_{-L/2}^{L/2} \int_{-L/2}^{L/2} (x,y,z)\ dx\ dy\ dz .$$

And since $m=\rho V$, where the volume of the cube $V = L^3$, we get $$\vec{c_m} = \frac{\rho}{\rho L^3} \int_{-L/2}^{L/2} \int_{-L/2}^{L/2} \int_{-L/2}^{L/2} \int_{-L/2}^{L/2} (x,y,z)\ dx\ dy\ dz .$$ $$\vec{c_m} = \frac{1}{L^3} \int_{-L/2}^{L/2} \int_{-L/2}^{L/2} \int_{-L/2}^{L/2} \int_{-L/2}^{L/2} (x,y,z)\ dx\ dy\ dz .$$

To solve this triple integral, we just need to solve it step by step, one integral at a time.

Let's focus for a moment on the $x$ coordinate and compute the anti-derivatives. The anti-derivative of $x$ is $\int x dx = x^2/2 + c_1$; the anti-derivative of $y$ is $\int y dx = xy + c_2$ and the anti-derivative of $z$ is $\int z dx = xz + c_3$ ($c_1$, $c_2$ and $c_3$ are constants). When computing the integrals, the constants will cancel out in the computation of each coordinate, so I will drop them for simplicity of notation.

Hence, the first integration step gives: $$\vec{c_m} = \frac{1}{L^3} \int_{-L/2}^{L/2} \int_{-L/2}^{L/2} \left[ (x^2/2,xy,xz) \right]_{x=-L/2}^{L/2}\ dy\ dz .$$

$$\vec{c_m} = \frac{1}{L^3} \int_{-L/2}^{L/2} \int_{-L/2}^{L/2} \left( (L^2/8, Ly/2, Lz/2) - (L^2/8, - Ly/2, - Lz/2) \right)\ dy\ dz .$$

$$\vec{c_m} = \frac{1}{L^3} \int_{-L/2}^{L/2} \int_{-L/2}^{L/2} (0, Ly, Lz)\ dy\ dz .$$

The second step is to compute the integral along the $y$ coordinate: $$\vec{c_m} = \frac{1}{L^3} \int_{-L/2}^{L/2} \left[(0, Ly^2/2, Lyz) \right]_{y=-L/2}^{L/2}\ dz .$$

$$\vec{c_m} = \frac{1}{L^3} \int_{-L/2}^{L/2} \left[(0, L^3/8, zL^2/2) - (0, L^3/8, - zL^2/2)\right]\ dz .$$

$$\vec{c_m} = \frac{1}{L^3} \int_{-L/2}^{L/2} (0, 0, L^2z)\ dz .$$

And, finally, we can compute the integral for $z$: $$\vec{c_m} = \frac{1}{L^3} \left[ (0, 0, L^2 z^2/2) \right]_{z=-L/2}^{L/2} .$$ $$\vec{c_m} = \frac{1}{L^3} \left[ (0, 0, L^4/8) - (0, 0, L^4/8) \right].$$ $$\vec{c_m} = \frac{1}{L^3} (0, 0, 0).$$

Hence, the centre of mass is at the origin $(0,0,0)$.

We could also get this result by a symmetry argument. Since the cube is symmetric with respect to the origin along the plane $yz$, perpendicular to the $x$ axis, then the centre of mass is found for $x=0$, The same reasoning gives $y=0$ and $z=0$.

While I'm at it, if one of the vertexes of the cube was at $(0,0,0)$ as I initially wrote mistakenly, the integral would give, as expected: $$\vec{c_m} = \frac{1}{L^3} (L^4/2, L^4/2, L^4/2) = (L/2, L/2, L/2).$$

  • $\begingroup$ I haven't seen triple integrals on my calculus class yet, but I think that this is how my teacher said we must solved it. I guess that take $\rho$ out of the integrals, but so I woudl have $\vec{c_m} =\rho \int_0^L \int_0^L \int_0^L (x,y,z) (x,y,z) dx dy dz / m$, right? $\endgroup$ Mar 17, 2019 at 2:34
  • $\begingroup$ Note that this is not a cube centered at the origin $\endgroup$ Mar 17, 2019 at 2:45
  • $\begingroup$ So what happens? Sorry I'm really confused with this topic. $\endgroup$ Mar 17, 2019 at 3:59
  • $\begingroup$ $\vec{c_m}=\frac{\rho}{m}\int_0^L\int_0^L\int_0^L(x,y,z)\,dx\,dy\,dz$. The second $(x,y,z)$ that you had shouldn’t be there; it was just the argument list of the mass density function, which is in fact just a constant. Now do the three triple integrals, and simplify $\rho/m$. By the way, a nice symmetry argument (“the center of mass is obviously at the center of the cube”) is always preferable to a rote calculation. $\endgroup$
    – G. Smith
    Mar 17, 2019 at 4:58
  • $\begingroup$ How do I solve a triplw integral? I have not seen that in class yet. $\endgroup$ Mar 17, 2019 at 5:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.