# Trouble understanding the center of mass equation

I'm learning about center of mass, but I have trouble understanding the definition. How is $$x_{com}=\frac{1}{M}\sum_{i=1}^{n}m_ix_i$$ equal to $$x_{com}=\frac{1}{M}\int xdm$$?

At first I thought it should be $$x_{com}=\frac{1}{M}\int mdx$$ since the function of mass in terms of position sounded better to me. But then I found this question, so I understood that $$\frac{1}{M}\int mdx$$ equals one because mass as a function of $$x$$ is the density function, and the integral of the density function is always equal to $$M$$. But that doesn't mean that I understood why $$x_{com}=\frac{1}{M}\int xdm$$. Since two or more positions can have same mass, the function of position in terms of mass does not exist according to the the definition of a function, does it?

What is generally know is the mass density distribution $$\rho(\vec{x})$$, and you can write that mass differential in terms of $$\rho$$ and a volume differential $$dm=\rho(\vec{x})dV$$, so the center of mass is $$\vec{x}_{com}=\frac{1}{M}\int_V\vec{x}\rho(\vec{x})dV,$$ where $$M$$ is the total mass, i.e. $$M=\int_V\rho(\vec{x})dV$$

• I believe that you need to divide the right side by the volume integral of the density. Mar 27, 2021 at 2:14
• Oh I forgot that! Thanks.
– AFG
Mar 27, 2021 at 7:26

The concept of a small particle of mass $${\rm d}m$$ existing at some location $$x$$ contributes to the mass torque by $$x \, {\rm d}m$$

$$x_{\rm CM} \int {\rm d}m = \int x \,{\rm d}m$$

But how do we integrate over mass?

Consider mass as a result of a density field $$\rho(x)$$ such that $$m = \int \rho(x) A {\rm d}x$$ and consider only a small portion to see that

$${\rm d}m = \rho(x) A {\rm d}x$$

The above allows us the change the variable in $$\int {\rm dm}$$ and make it

$$x_{\rm CM} \int \rho A \,{\rm d}x = \int x\,\rho A \,{\rm d}x$$

or

$$x_{\rm CM} = \frac{ \int x\,\rho A \,{\rm d}x }{\int \rho A \,{\rm d}x }$$

The integral doesn't mean that $$x = f(m)$$. On the contrary, $$dm = f(x)dx$$ and only after knowing that function it is possible to solve the integral, with the differential as function of $$x$$.

A good example for a unidimensional situation is any turned part, as for example a roll for a rolling mill, as shown below. The roll diameter is a function of $$x$$. So, the mass $$dm$$ of a small slice of the roll is also a function of $$x$$.