Tutorials › Calculus II › Variable-Density Rods

Mass, Moments, and Centroids · Tutorial 477 of 998

Variable-Density Rods

Use linear density to find a rod’s mass and balance point, including when density changes along a shifted interval.

Intermediate 9 min read

What You'll Learn

  • Define linear density and relate it to a rod’s mass and first moment
  • Calculate the center of mass from total mass and first moment
  • Apply formulas for constant and affine density
  • Integrate piecewise density across adjoining intervals
  • Keep track of the coordinate origin on shifted intervals

Modeling a Rod with Variable Density

A rod need not have the same mass in every unit of length. Its material may become denser along its length, or different sections may be made from different materials. To find where such a rod balances, account for both how much mass lies at each position and how far that mass is from the origin.

Place the rod along the \(x\)-axis from \(x=a\) to \(x=b\), where \(a<b\). Let \(\lambda(x)\) denote its linear density at position \(x\). Linear density is mass per unit length, so a short segment of length \(dx\) near \(x\) has mass approximately \(\lambda(x)\,dx\).

Definition: For a rod on \([a,b]\) with integrable, nonnegative linear density \(\lambda(x)\), its mass \(m\), first moment about the origin \(Q\), and center-of-mass coordinate \(\bar{x}\) are $$ m=\int_a^b \lambda(x)\,dx,\qquad Q=\int_a^b x\lambda(x)\,dx,\qquad \bar{x}=\frac{Q}{m}, $$ provided \(m>0\).

If \(x\) is measured in metres and \(\lambda\) in kilograms per metre, then \(m\) is in kilograms and \(Q\) is in kilogram-metres. The center-of-mass coordinate \(\bar{x}\) is in metres. The coordinate origin matters: a rod on \([2,6]\) is not described by the same coordinates as an identical rod on \([0,4]\).

Why the Center-of-Mass Formula Works

For a finite collection of point masses \(m_i\) located at coordinates \(x_i\), the balance coordinate is the mass-weighted average \(\sum_i x_i m_i/\sum_i m_i\). A rod can be treated as the limit of such collections: divide it into short segments, approximate each segment’s mass by its density times its length, and use a representative position in that segment.

1
Approximate each segment’s mass.
For a segment of length \(\Delta x_i\) near \(x_i\), its mass is approximately \(\lambda(x_i)\Delta x_i\).
2
Form the mass-weighted balance coordinate.
The approximate total mass is \(\sum_i\lambda(x_i)\Delta x_i\), and the approximate first moment is \(\sum_i x_i\lambda(x_i)\Delta x_i\).
3
Take the limit as the segments become small.
These sums approach the integrals for mass and first moment. Their ratio therefore gives \(\bar{x}=Q/m\), as long as the total mass is positive.

This reasoning also explains why the first moment weights each bit of mass by its position. Mass far from the origin contributes more to the moment than the same amount of mass nearby.

Constant Linear Density

If \(\lambda(x)=c\) throughout the rod, where \(c>0\), then the density can be taken outside each integral. This gives the mass, first moment, and center of mass directly.

$$ m=c(b-a),\qquad Q=c\frac{b^2-a^2}{2},\qquad \bar{x}=\frac{a+b}{2}. $$

The center is the midpoint of the interval because constant density distributes equal mass along equal lengths. This remains true when the interval is shifted away from the origin.

Worked Example: Constant Density on a Shifted Interval

A rod occupies \(2\le x\le 8\) metres and has constant linear density \(3\) kilograms per metre. Find its mass, first moment about the origin, and center-of-mass coordinate.

The mass is

$$ m=\int_2^8 3\,dx =3[x]_2^8 =3(8-2) =18\text{ kg}. $$

The first moment is

$$ Q=\int_2^8 3x\,dx =3\left[\frac{x^2}{2}\right]_2^8 =\frac{3}{2}(64-4) =90\text{ kg}\cdot\text{m}. $$

Therefore,

$$ \bar{x}=\frac{Q}{m} =\frac{90}{18} =5\text{ m}. $$

Check: the midpoint of the interval is \((2+8)/2=5\) metres, agreeing with the calculated center. Also, \(5(18)=90\) kilogram-metres, which recovers the first moment.

Affine Linear Density

An affine density has the form \(\lambda(x)=\alpha+\beta x\), or, on an interval starting at \(a\), \(\lambda(x)=\lambda_0+k(x-a)\). The second form makes the shift explicit: \(\lambda_0\) is the density at the left endpoint, and \(k\) is the rate at which density changes per unit length. The density must be nonnegative along the rod for the usual physical interpretation.

Writing the interval length as \(L=b-a\), substitute \(t=x-a\). Then \(0\le t\le L\), \(x=a+t\), and the density is \(\lambda_0+kt\). Integrating gives

$$ m=\lambda_0L+\frac{kL^2}{2}, \qquad Q=am+\frac{\lambda_0L^2}{2}+\frac{kL^3}{3}. $$

The \(am\) term is essential: it accounts for the fact that the original coordinate is \(x=a+t\), not merely the local coordinate \(t\). Thus, when \(m>0\),

$$ \bar{x} =a+\frac{\frac{\lambda_0L^2}{2}+\frac{kL^3}{3}}{m}. $$

Worked Example: Affine Density on a Shifted Interval

A rod occupies \(2\le x\le 6\) metres and has density \(\lambda(x)=1+\tfrac12(x-2)\) kilograms per metre. Find its mass, first moment, and center of mass.

Here \(a=2\), \(L=6-2=4\), \(\lambda_0=1\), and \(k=\tfrac12\). The mass is

$$ m=\lambda_0L+\frac{kL^2}{2} =(1)(4)+\frac{(\frac12)(16)}{2} =4+4 =8\text{ kg}. $$

The first moment is

$$ \begin{aligned} Q &=am+\frac{\lambda_0L^2}{2}+\frac{kL^3}{3}\\ &=(2)(8)+\frac{(1)(16)}{2}+\frac{(\frac12)(64)}{3}\\ &=16+8+\frac{32}{3} =\frac{104}{3}\text{ kg}\cdot\text{m}. \end{aligned} $$

Consequently,

$$ \bar{x}=\frac{Q}{m} =\frac{104/3}{8} =\frac{13}{3}\text{ m}. $$

Check by integrating in the original coordinate: \(\lambda(x)=x/2\), so \(Q=\int_2^6 x(x/2)\,dx=\left[x^3/6\right]_2^6=(216-8)/6=104/3\) kilogram-metres. This agrees with the formula, and \(8(13/3)=104/3\).

Piecewise Linear Density

A rod may have different density rules on adjoining sections. If the rod is divided at \(c\), with density \(\lambda_1\) on \([a,c]\) and \(\lambda_2\) on \([c,b]\), calculate the mass and first moment of each section and add them:

$$ m=\int_a^c\lambda_1(x)\,dx+\int_c^b\lambda_2(x)\,dx, \qquad Q=\int_a^c x\lambda_1(x)\,dx+\int_c^b x\lambda_2(x)\,dx. $$

The same procedure applies to any finite number of sections. A jump in density at a joining point does not require a separate mass term: a single point has zero length and contributes no mass to these integrals. At the end, divide the total first moment by the total mass, not the other way around.

Worked Example: Two Constant-Density Sections

A rod runs from \(x=1\) to \(x=5\) metres. Its density is \(1\) kilogram per metre on \([1,3]\) and \(3\) kilograms per metre on \([3,5]\). Find the total mass, first moment, and center of mass.

Calculate the mass of each section:

$$ m_1=\int_1^3 1\,dx=3-1=2\text{ kg}, \qquad m_2=\int_3^5 3\,dx=3(5-3)=6\text{ kg}. $$

The total mass is \(m=2+6=8\) kilograms. The first moments of the two sections are

$$ Q_1=\int_1^3 x\,dx =\left[\frac{x^2}{2}\right]_1^3 =\frac{9-1}{2} =4\text{ kg}\cdot\text{m}, $$
$$ Q_2=\int_3^5 3x\,dx =3\left[\frac{x^2}{2}\right]_3^5 =\frac{3}{2}(25-9) =24\text{ kg}\cdot\text{m}. $$

Thus \(Q=4+24=28\) kilogram-metres, and

$$ \bar{x}=\frac{28}{8}=\frac{7}{2}=3.5\text{ m}. $$

Check: \(8(3.5)=28\) kilogram-metres. The center lies to the right of the interval midpoint \(3\) metres, as expected because the right-hand section is denser.

A Common Coordinate Mistake

When using a local coordinate \(t=x-a\), it is easy to calculate a moment about the left endpoint and mistake it for a moment about the origin. For the affine example above, the local first moment is \(8+32/3=56/3\) kilogram-metres. Dividing by the mass gives \(7/3\) metres, but this is the center’s distance from \(x=2\), not its coordinate measured from the origin.

The correction is to restore the shift: \(\bar{x}=2+7/3=13/3\) metres. Equivalently, the first moment about the origin must include \(am=(2)(8)=16\) kilogram-metres, giving \(Q=16+56/3=104/3\) kilogram-metres. A useful check is whether the answer is expressed in the coordinate system specified for the rod.

Check Your Understanding

For each question, identify the mass and moment integrals before evaluating them.

  1. A rod occupies \([3,7]\) and has constant density \(2\) kilograms per metre. What are its mass, first moment about the origin, and center coordinate?
  2. For an affine density \(\lambda(x)=\lambda_0+k(x-a)\) on \([a,a+L]\), which term in the first-moment formula accounts for the shifted coordinate?
  3. A piecewise rod has two sections with masses \(m_1,m_2\) and first moments \(Q_1,Q_2\). How do you obtain its total mass and center coordinate?
  4. Why does a jump in density at a single joining point contribute no separate mass?
  5. A local-coordinate calculation gives a center distance of \(2\) metres from the left endpoint \(x=4\). What is the center coordinate measured from the origin?