Why Density Along an Axis Matters
A solid can be heavier in one region than another even when its shape is unchanged. If its density depends on position along one axis, slices perpendicular to that axis generally have different masses. The center of mass must account for both the size and location of each slice and its density.
For a solid extending along the \(x\)-axis, suppose the density is \(\rho(x)\). Every point in a cross-section at position \(x\) has that same density, although the cross-section’s area and shape may change with \(x\). The mass is found by accumulating the masses of the slices. First moments use the same slices, weighted also by their positions.
Definitions and Integral Formulas
Consider a solid between \(x=a\) and \(x=b\). Let \(S_x\) be its cross-section in the \(yz\)-plane at position \(x\), and let \(A(x)\) be the area of \(S_x\). Assume \(\rho(x)\) is nonnegative and integrable, and that the solid has finite, positive mass. A thin slice of thickness \(dx\) has volume approximately \(A(x)\,dx\), so its mass is \(dm=\rho(x)A(x)\,dx\).
The total mass \(m\) is the integral of the slice masses. The first moment about the \(yz\)-plane weights each slice by its \(x\)-coordinate. First moments about the \(xz\)- and \(xy\)-planes weight the slice mass by its average \(y\)- and \(z\)-coordinates, respectively.
The center-of-mass coordinates are obtained by dividing each first moment by the total mass:
These formulas also follow by integrating over the full solid: \(m=\iiint \rho(x)\,dV\), \(M_{yz}=\iiint x\rho(x)\,dV\), \(M_{xz}=\iiint y\rho(x)\,dV\), and \(M_{xy}=\iiint z\rho(x)\,dV\). The slice formulas evaluate the integrals one cross-section at a time. If a cross-section has zero area, its centroid coordinates need not be defined; the corresponding slice contributes zero, and the integrals can instead be written using its cross-sectional first moments directly.
Why the Slice Formulas Work
Partition the interval \([a,b]\) into short pieces of width \(\Delta x_i\), and choose a sample position \(x_i^*\) in each piece. The \(i\)-th thin slice has approximate volume \(A(x_i^*)\Delta x_i\), so its approximate mass is \(\rho(x_i^*)A(x_i^*)\Delta x_i\). Adding these masses and taking the limit as the slice widths approach zero gives the mass integral.
For the first moment about the \(yz\)-plane, each slice’s mass is multiplied by its \(x\)-coordinate. For a moment about the \(xz\)-plane, its mass is multiplied by the average \(y\)-coordinate in that slice. That average is \(\bar y_s(x)\), because the density is constant across the cross-section at fixed \(x\). The same reasoning uses \(\bar z_s(x)\) for the moment about the \(xy\)-plane.
Determine \(A(x)\) and the slice centroid coordinates \(\bar y_s(x)\) and \(\bar z_s(x)\).
Use \(dm=\rho(x)A(x)\,dx\), since the density is constant across each slice.
Weight \(dm\) by \(x\), \(\bar y_s(x)\), or \(\bar z_s(x)\), as appropriate.
Each center-of-mass coordinate is its corresponding first moment divided by \(m\).
Worked Examples
Worked Example: A Cylinder with Density Increasing Along Its Axis
A cylinder extends from \(x=0\) to \(x=2\,\mathrm m\), has radius \(1\,\mathrm m\), and has density \(\rho(x)=(1+u)\,\mathrm{kg/m^3}\), where \(u=x/(1\,\mathrm m)\). Find its mass and center of mass.
Each cross-section is a disk of area \(A=\pi\,\mathrm m^2\), centered at \(y=z=0\). Let \(u=x/(1\,\mathrm m)\), so \(dx=(1\,\mathrm m)\,du\) and \(u\) runs from 0 to 2. The mass is
The two transverse first moments are zero because each disk is centered at the origin in the \(yz\)-plane. For the \(x\)-moment, \(x=u\,\mathrm m\):
Therefore \(\bar x=M_{yz}/m=7/6\,\mathrm m\), while \(\bar y=\bar z=0\). To check, \(m\bar x=(4\pi\,\mathrm{kg})(7/6\,\mathrm m)=14\pi/3\,\mathrm{kg\,m}\), the calculated \(x\)-moment. The centered disk sections give zero \(y\)- and \(z\)-moments, consistent with the other coordinates.
Worked Example: A Wedge-Shaped Solid with Density Varying Along \(x\)
For \(0\leq u\leq1\), where \(u=x/(1\,\mathrm m)\), let a solid have \(0\leq y\leq u\,\mathrm m\) and \(0\leq z\leq1\,\mathrm m\). Its density is \(\rho(x)=(1+u)\,\mathrm{kg/m^3}\). Find its mass and center of mass.
The cross-section is a rectangle with area \(A(u)=u\,\mathrm m^2\), centroid coordinates \(\bar y_s(u)=u\,\mathrm m/2\) and \(\bar z_s(u)=\mathrm m/2\). Since \(dx=(1\,\mathrm m)\,du\), the slice mass is \(dm=u(1+u)\,\mathrm{kg}\,du\). Thus
For the \(x\)-moment, multiply the slice mass by \(u\,\mathrm m\):
For the \(y\)-moment, multiply by the slice centroid coordinate \(u\,\mathrm m/2\). For the \(z\)-moment, multiply by \(\mathrm m/2\):
Dividing by the mass gives \((\bar x,\bar y,\bar z)=(7/10\,\mathrm m,7/20\,\mathrm m,1/2\,\mathrm m)\). Check by multiplying back: \((5/6)(7/10)=7/12\), \((5/6)(7/20)=7/24\), and \((5/6)(1/2)=5/12\). With the appropriate units, these are exactly the three first moments above.
Worked Example: Cross-Sections That Shift as \(x\) Changes
For \(0\leq u\leq1\), let \(x=u\,\mathrm m\), with cross-sections \(u\,\mathrm m\leq y\leq(u+1)\,\mathrm m\) and \(0\leq z\leq2\,\mathrm m\). Let \(\rho(x)=(1+u)\,\mathrm{kg/m^3}\). Find the center of mass.
Each section is a rectangle of area \(2\,\mathrm m^2\), with centroid \(\bar y_s=(u+1/2)\,\mathrm m\) and \(\bar z_s=1\,\mathrm m\). The slice mass is \(dm=2(1+u)\,\mathrm{kg}\,du\), so
The moments are
Consequently, \((\bar x,\bar y,\bar z)=(5/9\,\mathrm m,19/18\,\mathrm m,1\,\mathrm m)\). The check is \(3(5/9)=5/3\), \(3(19/18)=19/6\), and \(3(1)=3\), each in \(\mathrm{kg\,m}\). The nonzero \(\bar y\) reflects the sections’ changing locations as well as their masses.
Why the Geometric Centroid May Be Wrong
A geometric centroid weights volume uniformly. A center of mass weights each part by its density as well as its volume. The two points agree when density is constant throughout the solid, but need not agree when \(\rho\) varies with \(x\).
For the wedge in the second example, ignoring the density would give the geometric \(x\)-coordinate \(\int_0^1u\cdot u\,du\,/\,\int_0^1u\,du=(1/3)/(1/2)=2/3\,\mathrm m\). That is not the center-of-mass coordinate, which is \(7/10\,\mathrm m\). The higher density at larger \(x\) changes the weighting. The correction is to include \(\rho(x)\) in both the mass integral and every first-moment integral.
Check Your Understanding
Use the slice-mass and first-moment formulas to answer these questions.
- For a solid sliced perpendicular to the \(x\)-axis, what expression gives the mass of a thin slice?
- Which first moment determines \(\bar x\), and what coordinate weights each slice in that integral?
- Why can the cross-sectional centroid coordinates be used in the \(y\)- and \(z\)-moment integrals?
- When does the center of mass coincide with the geometric centroid?
- For a solid with \(A(x)=2\), \(\rho(x)=1+x\), and \(0\leq x\leq1\), what are the integrals for \(m\) and \(M_{yz}\)?