Why Different Densities Matter
A composite solid may be assembled from pieces that occupy different parts of space and are made of materials with different densities. Its center of mass depends on both the locations of the pieces and how much mass each piece contributes. A larger piece is not necessarily more influential if it is made from a much less dense material.
The calculation can be organized piece by piece. Find the mass and center of mass of each uniform component, then combine their coordinates using the component masses as weights. The method avoids setting up a new three-dimensional integral over the entire assembled solid, while remaining consistent with the definitions of mass and first moment.
Mass and Center of Mass of One Uniform Piece
Let a solid piece occupy a region \(E\) in three-dimensional space and have constant density \(\rho\). Its volume is \(V\), so its mass is \(m=\rho V\). For a uniform solid of positive volume, its center of mass is its volume centroid, with coordinates given by the average values of \(x\), \(y\), and \(z\) over the region.
Equivalently, if mass and first moments have already been calculated, the center-of-mass coordinates are the corresponding first moments divided by the total mass. For a composite solid, the important point is that mass and first moments add across its pieces.
Assume the solid is made from a finite number of positive-volume pieces with disjoint interiors. Pieces may share boundary surfaces, since those surfaces have zero volume and contribute no mass. Each piece has constant density, although different pieces may have different densities. The total mass must be positive.
Combining Component Masses and Centroids
Suppose the component pieces are indexed by \(i=1,\ldots,n\). Write \(V_i\) for the volume, \(\rho_i\) for the constant density, and \(m_i=\rho_iV_i\) for the mass of piece \(i\). Let its center of mass be \((\bar{x}_i,\bar{y}_i,\bar{z}_i)\). Then the composite center of mass is:
These are weighted averages. A component with greater mass has greater influence on the composite coordinate. The weights are not generally the volumes: volume weighting gives the correct result only when all pieces have the same density.
Why the Formula Works
For a solid with density function \(\rho\), its first moment in the \(x\)-direction is \(\iiint x\rho\,dV\). For each uniform piece \(i\), density is constant, and its centroid definition gives \(\iiint_{E_i}x\,dV=V_i\bar{x}_i\). Thus the piece’s first moment is \(\rho_iV_i\bar{x}_i=m_i\bar{x}_i\). Additivity of the integral over disjoint pieces gives the composite first moment. Dividing by total mass yields the \(x\)-coordinate formula; the same reasoning gives the other two coordinates.
For a uniform piece, calculate \(m_i=\rho_iV_i\).
Use the centroid coordinates for the individual solid pieces.
Calculate \(M=\sum m_i\) and the sums \(\sum m_i\bar{x}_i\), \(\sum m_i\bar{y}_i\), and \(\sum m_i\bar{z}_i\).
The three resulting coordinates give the composite center of mass.
Worked Examples
Worked Example: Two Adjacent Cubes with Different Densities
A cube occupies \(0\le x,y,z\le2\) metres and has density \(3\text{ kg/m}^3\). A second cube of the same dimensions occupies \(2\le x\le4\), \(0\le y,z\le2\) metres and has density \(1\text{ kg/m}^3\). Find the center of mass of the combined solid.
Each cube has volume \(2\cdot2\cdot2=8\text{ m}^3\). Their masses are \(m_1=3\cdot8=24\text{ kg}\) and \(m_2=1\cdot8=8\text{ kg}\). The first cube’s centroid is \((1,1,1)\) metres, and the second’s is \((3,1,1)\) metres.
The total mass is \(M=24+8=32\text{ kg}\). The total first moments in the three coordinate directions are \(24(1)+8(3)=48\text{ kg}\cdot\text{m}\), \(24(1)+8(1)=32\text{ kg}\cdot\text{m}\), and \(24(1)+8(1)=32\text{ kg}\cdot\text{m}\). Therefore:
Check: multiplying each coordinate by the total mass recovers its total first moment: \(32(1.5)=48\), \(32(1)=32\), and \(32(1)=32\), in \(\text{kg}\cdot\text{m}\). The result also lies between the two component centroids in the \(x\)-direction and has the same \(y\)- and \(z\)-coordinates.
Worked Example: Three Rectangular Pieces
Three rectangular pieces, with dimensions measured in metres, have the following descriptions:
- Piece 1 occupies \(0\le x\le2,\;0\le y\le1,\;0\le z\le1\), with density \(5\text{ kg/m}^3\).
- Piece 2 occupies \(2\le x\le3,\;0\le y\le2,\;0\le z\le1\), with density \(2\text{ kg/m}^3\).
- Piece 3 occupies \(3\le x\le4,\;0\le y\le1,\;0\le z\le2\), with density \(1\text{ kg/m}^3\).
Find the center of mass of the assembly.
Each volume is \(2\text{ m}^3\). The centroids are the midpoints of the coordinate intervals: \((1,\frac12,\frac12)\), \((\frac52,1,\frac12)\), and \((\frac72,\frac12,1)\) metres. The masses are \(m_1=5\cdot2=10\text{ kg}\), \(m_2=2\cdot2=4\text{ kg}\), and \(m_3=1\cdot2=2\text{ kg}\). Hence \(M=10+4+2=16\text{ kg}\).
The first moments are \(10(1)+4(\frac52)+2(\frac72)=27\text{ kg}\cdot\text{m}\) in the \(x\)-direction, \(10(\frac12)+4(1)+2(\frac12)=10\text{ kg}\cdot\text{m}\) in the \(y\)-direction, and \(10(\frac12)+4(\frac12)+2(1)=9\text{ kg}\cdot\text{m}\) in the \(z\)-direction. Thus:
Check: multiplying the coordinates by \(16\text{ kg}\) gives \(27\), \(10\), and \(9\text{ kg}\cdot\text{m}\), respectively, matching the component first moments. Each coordinate is also within the overall coordinate range of the pieces.
Worked Example: A Triangular Prism and a Rectangular Block
A triangular prism occupies the region \(x\ge0,\;y\ge0,\;x+y\le2,\;0\le z\le3\), with density \(2\text{ kg/m}^3\). A rectangular block occupies \(2\le x\le4,\;0\le y\le2,\;0\le z\le2\), with density \(\frac32\text{ kg/m}^3\). Find the center of mass of their assembly.
The triangular cross-section has area \(\int_0^2(2-x)\,dx=[2x-\frac{x^2}{2}]_0^2=2\text{ m}^2\). Its \(x\)-coordinate centroid is \(\frac{1}{2}\int_0^2x(2-x)\,dx\). The integral is \([x^2-\frac{x^3}{3}]_0^2=4-\frac83=\frac43\), so \(\bar{x}=\frac23\text{ m}\). For its \(y\)-coordinate, the cross-sectional first moment is \(\int_0^2\frac12(2-x)^2\,dx=\frac43\text{ m}^3\), giving \(\bar{y}=(\frac43)/2=\frac23\text{ m}\). The prism extends uniformly from \(z=0\) to \(z=3\), so its centroid has \(z\)-coordinate \(\frac32\text{ m}\). Its volume is \(2\cdot3=6\text{ m}^3\), and its mass is \(2\cdot6=12\text{ kg}\).
The block has volume \(2\cdot2\cdot2=8\text{ m}^3\), mass \(\frac32\cdot8=12\text{ kg}\), and centroid \((3,1,1)\text{ m}\). The total mass is \(24\text{ kg}\). The total first moments are \(12(\frac23)+12(3)=44\text{ kg}\cdot\text{m}\), \(12(\frac23)+12(1)=20\text{ kg}\cdot\text{m}\), and \(12(\frac32)+12(1)=30\text{ kg}\cdot\text{m}\). Therefore:
Check: \(24(\frac{11}{6})=44\), \(24(\frac56)=20\), and \(24(\frac54)=30\), so the coordinates reproduce the total first moments. The triangular prism and block have non-overlapping interiors, so their masses and moments can be added directly.
A Common Error: Weighting by Volume Instead of Mass
In the first example, the cubes have equal volume, so volume weighting would place the \(x\)-coordinate at the average of their centroid coordinates. That calculation gives \(\frac{8(1)+8(3)}{8+8}=2\text{ m}\). It is wrong because it treats the two cubes as if they had equal mass, despite their different densities.
The correction is to use each actual mass: \(\frac{24(1)+8(3)}{24+8}=\frac{48}{32}=1.5\text{ m}\). The denser first cube pulls the center of mass toward its centroid. Volume weighting is valid when the component densities are equal, because then each mass is the same common density times its volume; otherwise, use mass weights.
Practical Checks and Interpretation
Keep units consistent throughout the calculation. If density is measured in \(\text{kg/m}^3\) and volume in \(\text{m}^3\), component masses are in kilograms and first moments are in \(\text{kg}\cdot\text{m}\). Dividing a first moment by mass leaves a coordinate measured in metres.
For a physical assembly made only of positive-mass pieces, each coordinate of the combined center of mass is a weighted average of the component coordinates, with positive weights. It must therefore lie between the smallest and largest component coordinates in that direction. This is a useful check, but it does not replace calculating all three coordinates.
Finally, do not count the same material twice. The add-and-weight procedure assumes the pieces form a partition of the solid, apart from shared boundaries of zero volume. If proposed component descriptions overlap in a region of positive volume, first describe the actual solid without overlapping pieces; otherwise, the overlapping mass and its moments would be included more than once.
Check Your Understanding
Use the component masses and centroids to answer the following questions.
- What quantity should weight each component centroid when the component densities differ?
- A component has volume \(4\text{ m}^3\) and density \(3\text{ kg/m}^3\). What is its mass?
- Two components have masses \(2\text{ kg}\) and \(6\text{ kg}\), and \(x\)-coordinates of their centroids are \(1\text{ m}\) and \(5\text{ m}\). What is the composite \(x\)-coordinate?
- Why do the component first moments add to give the total first moment?
- What is the problem with applying the component formula directly to two descriptions that overlap in positive volume?