From a Density Field to a Wire’s Mass
A wire may be made from several connected pieces, and its density may vary with position. To find the total mass, calculate the mass contributed by each piece and add those contributions. To find the mean density, divide the total mass by the wire’s total length.
The calculations are straightforward once each piece has the right parameterization and bounds. The main things to keep track of are the density evaluated along the curve, the length represented by a parameter interval, and the units of the result.
Here, \(ds\) denotes an element of arc length. If a piece of the wire is parameterized by \(\mathbf{r}(t)\), for \(a\le t\le b\), then \(ds=\|\mathbf{r}'(t)\|\,dt\). The corresponding mass contribution is therefore the integral of the density evaluated at \(\mathbf{r}(t)\), multiplied by the speed \(\|\mathbf{r}'(t)\|\).
For the examples below, coordinates are given by their numerical values in meters, and density formulas give numerical values in kilograms per meter. Thus, for example, \(\delta(x,y)=2+x\) means that the density is \(2+x\) kg/m when \(x\) is entered as its numerical coordinate in meters. Parameter values and bounds are chosen to trace each physical piece once.
Why Mass Adds Across Joined Pieces
Suppose a wire consists of finitely many smooth pieces \(C_1,\ldots,C_n\), joined at endpoints. The endpoints contribute no length, so they contribute no mass to a line integral. The mass of the whole wire is the sum of the masses of its pieces. Its length is likewise the sum of the piece lengths.
This additivity explains why each piece can be parameterized and integrated separately, even when the pieces have different shapes or require different parameters. It also explains why the average density is not usually the ordinary average of the separate piece averages: each piece’s average must be weighted by its length.
Worked Example: An L-Shaped Wire with Varying Density
Worked Example: An L-Shaped Wire with Varying Density
An L-shaped wire consists of the segment from \((0,0)\) to \((2,0)\), followed by the segment from \((2,0)\) to \((2,1)\). Its density is \(\delta(x,y)=2+x\). Find its total mass and average density.
Parameterize the horizontal segment by \(\mathbf{r}_1(t)=(t,0)\), with \(0\le t\le2\). Its speed is \(\|\mathbf{r}'_1(t)\|=1\), and its density along the segment is \(2+t\). Therefore,
The horizontal segment has length
Parameterize the vertical segment by \(\mathbf{r}_2(t)=(2,t)\), with \(0\le t\le1\). Its speed is also \(1\). Since \(x=2\) throughout this piece, its density is constant at \(2+2=4\) kg/m. Thus,
Add the two masses and the two lengths:
The average density is
Check: Multiplying the average density by the total length recovers the mass: \((10/3\text{ kg/m})(3\text{ m})=10\text{ kg}\). The mass units and average-density units are therefore consistent.
Worked Example: A Coordinate-Dependent Density on a Circular Arc
Worked Example: A Coordinate-Dependent Density on a Circular Arc
A wire is the upper semicircle of radius \(2\) m centered at the origin. Its density is \(\delta(x,y)=3+y\). Find its mass and average density.
Use \(\mathbf{r}(\theta)=(2\cos\theta,2\sin\theta)\), with \(0\le\theta\le\pi\). This interval traces the upper semicircle once. The speed is
Along the arc, \(y=2\sin\theta\), so the density becomes \(3+2\sin\theta\). The mass is
The arc length is
Consequently,
Check: Multiplying the average density by the length gives \(\left(3+\frac{4}{\pi}\right)(2\pi)=6\pi+8\), so \(\overline{\delta}L=M\). The density on the arc ranges from \(3\) kg/m at the endpoints to \(5\) kg/m at the top. The calculated average \(3+4/\pi\) kg/m is between those values, as expected.
Worked Example: A Joined Segment and Circular Arc
Worked Example: A Joined Segment and Circular Arc
A wire consists of a straight segment from \((0,0)\) to \((1,0)\), followed by a quarter-circle arc from \((1,0)\) to \((2,1)\). The arc has radius \(1\) m and center \((1,1)\). The density on both pieces is \(\delta(x,y)=2+x\). Find the total mass and mean density.
For the straight segment, take \(\mathbf{r}_1(t)=(t,0)\), \(0\le t\le1\). The speed is \(1\), and the density along it is \(2+t\). Hence
For the arc, use \(\mathbf{r}_2(\theta)=(1+\cos\theta,1+\sin\theta)\), with \(-\pi/2\le\theta\le0\). At \(\theta=-\pi/2\), the point is \((1,0)\); at \(\theta=0\), it is \((2,1)\). The parameter therefore follows the required quarter-circle. Its speed is
Along the arc, \(x=1+\cos\theta\), so the density is \(2+x=3+\cos\theta\). Its mass and length are
Combining the piece contributions gives
Therefore, the mean density is
Check: Multiplying the result by the total length gives \(\frac{7+3\pi}{2+\pi}(1+\frac{\pi}{2})=(7+3\pi)/2=\frac72+\frac{3\pi}{2}\) kg, exactly the calculated mass. The segment contributes kilograms through \((5/2\text{ kg/m})(1\text{ m})\), and the arc contributes kilograms through its density integral; all mass terms have matching units.
Why the Mean Must Be Length-Weighted
Each piece can have a different average density. A longer piece contributes more length over which that density is present, so the overall mean is a length-weighted average of the piece means. If piece \(j\) has length \(L_j\) and mean density \(\overline{\delta}_j\), then its mass is \(M_j=L_j\overline{\delta}_j\). Hence
For instance, if a \(2\)-m piece has mean density \(3\) kg/m and a \(1\)-m piece has mean density \(6\) kg/m, their combined mean is \((2\cdot3+1\cdot6)/(2+1)=4\) kg/m, not \((3+6)/2\) kg/m.
A Common Mistake: Averaging the Piece Means Directly
In the L-shaped example, the horizontal segment’s mean density is \(6/2=3\) kg/m and the vertical segment’s mean density is \(4/1=4\) kg/m. A tempting but incorrect calculation is to average those two numbers equally:
This gives the two segments equal influence despite their different lengths. The horizontal piece is twice as long as the vertical one. The correction is to divide total mass by total length:
This correction works because mass accumulates over length. More generally, use the piece lengths as weights, or first add the masses and lengths and then form their ratio.
A Reliable Calculation Checklist
List each segment or arc and identify its endpoints and shape.
Check that the parameter interval traces exactly the required piece, in the intended direction and exactly once.
Substitute the parameterization into the density, then multiply by \(\|\mathbf{r}'(t)\|\) in the mass integral.
Keep separate totals for mass and length, with their units.
Compute \(\overline{\delta}=M/L\), check that its units are mass per length, and confirm that \(\overline{\delta}L=M\).
For a physical wire, density should be nonnegative along the wire. A finite-length piecewise smooth wire with an integrable density has a well-defined mass integral. If the wire has positive total length, its average density is defined by dividing that mass by the total length.
Check Your Understanding
For each question, identify the mass and length contributions needed before calculating the final average.
- A segment is parameterized by \(\mathbf{r}(t)=(t,0)\), \(0\le t\le3\), with density \(\delta(x,y)=1+x\). What integrand gives its mass?
- Why must the speed factor \(\|\mathbf{r}'(t)\|\) appear in a parameterized mass integral?
- A wire has two pieces with masses \(5\) kg and \(9\) kg and lengths \(2\) m and \(6\) m. What is its total mass and average density?
- For a circle of radius \(r\) parameterized by \((r\cos\theta,r\sin\theta)\), what is the speed with respect to \(\theta\)?
- Two joined pieces have different mean densities. Why is their combined mean generally not the unweighted average of those two means?