If we wanted to find the average position of a series of particles, we could find each coordinate of the point representing average position by adding up the values of that coordinate from each point and dividing by the number of points. For example, to find the x coordinate X in the average position of n particles, we would calculate
(Σnxn)/n
Where xn is the x coordinate of the position of the nth particle.
Suppose instead we wanted to find the center of mass of a region as described in the first paragraph. Our expression for the x coordinate of the center of mass, given the mass mn of each particle is:
(Σnxnmn)/(Σnmn)
(Note that the denominator is equal to the total mass of the set of particles.)
Given a density function ρ(x, y, z), we can express this summation as
(Σnxn*ρ(xn, yn, zn)*An)/(Σnρ(xn, yn, zn)*Vn)
Where Vn is the volume of the nth particle.
For a region with domain D composed of a very large number of particles, we can change this summation to a double integral, replacing Vn with dV:
X = (∫∫∫Dx*ρ(x, y, z)dV)/(∫∫∫Dρ(x, y, z)dV).
Similarly, to find the y coordinate of center of mass, use:
Y = (∫∫∫Dy*ρ(x, y, z)dV)/(∫∫∫Dρ(x, y, z)dV)
and to find the z coordinate, use
Z = (∫∫∫Dz*ρ(x, y, z)dV)/(∫∫∫Dρ(x, y, z)dV).
This gives us the center of mass (X, Y, Z) of D.