Calculus 3 • Multiple Integrals

Mass, Density & Center of Mass — Mass, Density, and Center of Mass (Intro)

Using multiple integrals to compute the total mass and balance point of objects with variable density.

Three-dimensional axes with spatial movement and a multivariable function.
Inside this lesson 10 sections 5 questions 9 figures

SECTION 1

Historical Context & Motivation

The concepts of mass, density, and center of mass lie at the intersection of physics, engineering, and mathematics. Ancient Greek mathematicians were among the first to formalize the notion of a balance point for rigid bodies, and the development of calculus in the seventeenth century unlocked the ability to handle objects whose density varies continuously from point to point. The transition from discrete sums to continuous integrals was not merely a technical upgrade—it fundamentally changed how scientists model real-world objects, from the mass distribution of planets to the structural analysis of bridges.

~250 BCE • Archimedes and the Lever

Archimedes established the law of the lever and computed centers of gravity for simple geometric shapes—triangles, parabolic segments, and hemispheres—using the method of exhaustion, a precursor to integral calculus.

1687 • Newton's Principia

Isaac Newton formalized the concept of mass as a measure of inertia and showed that gravitational attraction acts as though all mass is concentrated at the center of mass, enabling the treatment of planets as point particles.

1740s • Euler & Continuum Mechanics

Leonhard Euler extended Newtonian mechanics to continuous bodies, defining density as a function of position and expressing total mass and moments through integral formulas that remain the foundation of modern engineering.

1850s • Riemann's Integration Theory

Bernhard Riemann provided a rigorous foundation for the definite integral, enabling mathematicians to precisely define double and triple integrals over irregular regions with variable density functions.

In a first course on calculus, you likely computed the mass of a one-dimensional rod with variable linear density using a single integral. In Calculus 3 we extend this idea to two- and three-dimensional regions using double and triple integrals. The central question this lesson addresses is: given a planar lamina or a solid whose density varies from point to point, how do we compute its total mass and locate the unique point—the center of mass—at which the object would balance perfectly under uniform gravity?

SECTION 2

Core Principles & Definitions

Before diving into integrals, it is essential to pin down several foundational ideas. The notion of density bridges geometry and physics: it encodes how much matter occupies each infinitesimal piece of a region. Once density is given as a function, every quantity of interest—mass, moments, center of mass—is expressed as an integral of density over the region.

1

Density Function ρ(x, y)

For a planar lamina, area density ρ(x, y) gives the mass per unit area at each point. For a solid, volume density ρ(x, y, z) gives mass per unit volume. Units are typically kg/m² or kg/m³.
2

Total Mass via Integration

Total mass M is the integral of the density function over the entire region D. In two dimensions: M = ∬D ρ(x, y) dA. The integral sums infinitesimal mass elements ρ dA across the domain.
3

Moment About an Axis

The first moment measures how mass is distributed relative to an axis. My = ∬ x ρ dA weights each element by its x-coordinate. Mx = ∬ y ρ dA weights by the y-coordinate.
4

Center of Mass (x̄, ȳ)

The center of mass is the balance point. Its coordinates are x̄ = My / M and ȳ = Mx / M. If density is uniform, the center of mass coincides with the geometric centroid.
5

Centroid vs. Center of Mass

The centroid is a purely geometric concept—the average position of all points in a region. It equals the center of mass only when ρ is constant. For variable density, the center of mass shifts toward regions of higher density.
✦

KEY TAKEAWAY

Think of center of mass like finding the balance point of a loaded seesaw. If a child twice as heavy sits on one side, you must move the fulcrum toward that child. Similarly, when a lamina has higher density in one region, the center of mass shifts toward that heavier region—and the integral formulas quantify exactly how far it shifts by weighting each position by its local density.

SECTION 3

Visual Explanation — Density Distribution on a Lamina

Lamina with Variable Density ρ(x, y) = 1 + 2xxy01212Low densityHigh densityρ dA (light)ρ dA (heavy)Center of MassKey IdeaDensity increases with x,so the center of mass shiftsto the right of the centroid.
A rectangular lamina over [0, 2] × [0, 2] with density ρ(x, y) = 1 + 2x. The color gradient shows increasing density from left (cyan, light) to right (pink, heavy). The yellow dot marks the center of mass, which lies to the right of the geometric center (1, 1) because of the higher density on the right side.

The diagram above illustrates the fundamental principle at work: when density is not uniform, the center of mass is pulled away from the geometric centroid and toward the region of greater density. Each infinitesimal rectangle of area dA = dx dy carries mass ρ(x, y) dx dy. The double integral sums all such contributions to yield the total mass M. The first moments Mx and My then compute the mass-weighted average of the y- and x-coordinates, respectively. This averaging process is the continuous analogue of computing a weighted mean in statistics.

SECTION 4

Mathematical Framework

We now formalize the definitions introduced in Section 2. Let D be a bounded region in ℝ² and let ρ(x, y) be a continuous, non-negative density function defined on D. All of the quantities below follow from the idea that mass = density × area, extended to infinitesimal elements and summed via integration.

TOTAL MASS

M=∬Dρ(x,y)dAM = ∬_D ρ(x, y) dA

M is the total mass of the lamina. The integral is taken over the entire region D. If ρ is constant, this reduces to M = ρ × Area(D).

FIRST MOMENT ABOUT THE x-AXIS

Mx=∬Dy⋅ρ(x,y)dAMₓ = ∬_D y · ρ(x, y) dA

Mx measures the tendency of the mass distribution to rotate about the x-axis. Each infinitesimal mass element ρ dA is weighted by its perpendicular distance y from the x-axis.

FIRST MOMENT ABOUT THE y-AXIS

My=∬Dx⋅ρ(x,y)dAM_y = ∬_D x · ρ(x, y) dA

My measures the tendency of the mass distribution to rotate about the y-axis. Each mass element is weighted by its perpendicular distance x from the y-axis.

CENTER OF MASS

xˉ=My/M,yˉ=Mx/Mx̄ = M_y / M , ȳ = Mₓ / M

The center of mass (x̄, ȳ) is the mass-weighted average position. Note the subscript conventions: My (moment about y-axis) gives the x̄ coordinate, and Mx (moment about x-axis) gives the ȳ coordinate. This cross-pairing is a common source of confusion.

⚠

Subscript Warning

The notation can trip up even experienced students. Remember: My is the moment about the y-axis, which integrates x · ρ dA, and it yields the x̄ coordinate. The subscript tells you the axis of rotation, not the coordinate it produces.

For three-dimensional solids, the framework extends naturally. If E is a region in ℝ³ and ρ(x, y, z) is the volume density, then M = ∭E ρ dV, and the center of mass has three coordinates: x̄ = (1/M) ∭ x ρ dV, ȳ = (1/M) ∭ y ρ dV, z̄ = (1/M) ∭ z ρ dV. The conceptual structure is identical—only the dimensionality of the integral changes.

SECTION 5

From Discrete Point Masses to Continuous Distributions

The continuous formulas above are direct generalizations of the familiar discrete case. Recall that for n point masses m₁, m₂, …, mₙ located at positions (x₁, y₁), …, (xₙ, yₙ), the center of mass is x̄ = Σ mᵢxᵢ / Σ mᵢ and ȳ = Σ mᵢyᵢ / Σ mᵢ. The transition to continuous distributions replaces each finite mass mᵢ with the infinitesimal mass element ρ(x, y) dA, and the finite sum becomes a double integral. Understanding this passage from summation to integration is essential because it reveals that every integral formula in this lesson is simply a continuous weighted average.

Discrete: Point MassesContinuous: Density ρ(x,y)xym₁=2m₂=5m₃=1C.M.x̄ = Σmᵢxᵢ / Σmᵢxyρ dAρ dAC.M.x̄ = ∬ x ρ dA / ∬ ρ dA→
Left: three discrete point masses with the center of mass (green dot) pulled toward the largest mass m₂. Right: a continuous lamina with variable density—the integral ∬ x ρ dA / M plays the same role as the finite weighted sum. The arrow emphasizes the conceptual transition from Σ to ∬.
QuantityDiscrete (n point masses)Continuous (2D lamina)
Total MassM = Σ mᵢM = ∬ ρ(x, y) dA
Moment about y-axisMy = Σ mᵢ xᵢMy = ∬ x ρ(x, y) dA
Moment about x-axisMx = Σ mᵢ yᵢMx = ∬ y ρ(x, y) dA
Center of Mass x̄x̄ = Σ mᵢ xᵢ / Σ mᵢx̄ = My / M
Center of Mass ȳȳ = Σ mᵢ yᵢ / Σ mᵢȳ = Mx / M

Discrete vs. continuous formulas for mass and center of mass

SECTION 6

Worked Example — Triangular Lamina with Variable Density

Find the mass and center of mass of the triangular lamina with vertices (0, 0), (2, 0), and (0, 4) if the density function is ρ(x, y) = 1 + x + y.

Triangular Lamina: ρ(x, y) = 1 + x + y

  1. 1

    Step 1 — Describe the Region D

    The triangle with vertices (0, 0), (2, 0), (0, 4) has its hypotenuse along the line connecting (2, 0) and (0, 4). The equation of this line is y = 4 − 2x, or equivalently x = (4 − y)/2. Choosing to integrate with x as the inner variable, for each fixed y in [0, 4], x ranges from 0 to (4 − y)/2.
    D: 0 ≤ y ≤ 4, 0 ≤ x ≤ (4 − y)/2
  2. 2

    Step 2 — Set Up the Mass Integral

    M = ∫₀⁴ ∫₀^{(4−y)/2} (1 + x + y) dx dy. We evaluate the inner integral first with respect to x, treating y as a constant.
    M = ∫₀⁴ [ x + x²/2 + xy ] from x=0 to x=(4−y)/2 dy
  3. 3

    Step 3 — Evaluate the Inner Integral

    Let u = (4 − y)/2. Substituting: the inner integral evaluates to u + u²/2 + uy = (4 − y)/2 + (4 − y)²/8 + y(4 − y)/2. Expanding and simplifying: (4 − y)/2 + (16 − 8y + y²)/8 + (4y − y²)/2. Combining over a common denominator of 8: [4(4 − y) + (16 − 8y + y²) + 4(4y − y²)] / 8 = [16 − 4y + 16 − 8y + y² + 16y − 4y²] / 8 = [32 + 4y − 3y²] / 8.
    Inner integral = (32 + 4y − 3y²) / 8
  4. 4

    Step 4 — Evaluate the Outer Integral for M

    M = ∫₀⁴ (32 + 4y − 3y²)/8 dy = (1/8)[32y + 2y² − y³] from 0 to 4 = (1/8)[128 + 32 − 64] = (1/8)(96) = 12.
    M = 12
  5. 5

    Step 5 — Compute Mᵧ (Moment about y-axis)

    My = ∫₀⁴ ∫₀^{(4−y)/2} x(1 + x + y) dx dy. The inner integrand is x + x² + xy. Integrating with respect to x: [x²/2 + x³/3 + x²y/2] from 0 to u = (4−y)/2. After expansion and simplification (combining the polynomial in y), My = ∫₀⁴ [(4−y)²/8 + (4−y)³/24 + y(4−y)²/8] dy. Evaluating this integral yields My = 8.
    My = 8, so x̄ = 8/12 = 2/3
  6. 6

    Step 6 — Compute Mₓ (Moment about x-axis)

    Mx = ∫₀⁴ ∫₀^{(4−y)/2} y(1 + x + y) dx dy. The inner integrand is y + xy + y². Following the same procedure—integrating x first, then y—and simplifying yields Mx = 20.
    Mx = 20, so ȳ = 20/12 = 5/3
  7. 7

    Step 7 — State the Center of Mass

    The center of mass of the triangular lamina is (x̄, ȳ) = (2/3, 5/3). Compare this with the centroid of the triangle, which is the average of the vertices: ((0+2+0)/3, (0+0+4)/3) = (2/3, 4/3). The center of mass has a higher ȳ-coordinate than the centroid because the density 1 + x + y increases with y, pulling the balance point upward.
    Center of Mass = (2/3, 5/3)

SECTION 7

Uniform vs. Variable Density — When It Matters

A natural question is: when does variable density actually change the computation? If ρ is constant, it factors out of every integral, and the center of mass formulas simplify dramatically. In that case x̄ = (1/A)∬ x dA and ȳ = (1/A)∬ y dA, where A = Area(D), and we are computing the centroid of the region—a purely geometric quantity that depends only on shape, not material properties. The table below highlights the key contrasts.

FeatureUniform Density (ρ = const)Variable Density ρ(x, y)
Mass formulaM = ρ · Area(D)M = ∬ ρ(x, y) dA
Center of mass = centroid?Yes — density cancelsNo — shifts toward heavier region
Computation difficultyOnly need area and centroid integralsThree separate double integrals (M, Mx, My)
Symmetry shortcutsIf D is symmetric about an axis, the centroid lies on that axisSymmetry of D alone is not sufficient; ρ must also be symmetric about the axis
Typical applicationsThin metal plates, homogeneous fluidsTemperature-dependent materials, alloys, geological strata

Comparison of uniform and variable density scenarios

✦

KEY TAKEAWAY

In structural engineering, ignoring density variation is analogous to assuming every floor of a skyscraper weighs the same—the building's center of gravity would be mislocated, potentially leading to catastrophic design errors. Whenever the material composition or thickness of a physical object varies in space, the full integral formulation with ρ(x, y) is indispensable.

SECTION 8

Connections to Moments of Inertia and Higher Dimensions

The first moments Mx and My studied in this lesson represent only the beginning of a hierarchy of mass moments. The next level—second moments or moments of inertia—are obtained by integrating the square of the distance from an axis, weighted by density. These quantities govern rotational dynamics: how resistant an object is to angular acceleration. The table below contrasts the concepts introduced here with their advanced counterparts.

ConceptThis Lesson (First Moments)Advanced (Second Moments)
What it measuresBalance point (center of mass)Resistance to rotation (moment of inertia)
Integrandx · ρ or y · ρx² · ρ, y² · ρ, or (x² + y²) · ρ
NotationMx, MyIx, Iy, I₀
Physical applicationLocating supports, balancing objectsDesigning flywheels, analyzing vibrations
Dimensionality extensions2D → 3D via triple integralsFull inertia tensor (3 × 3 matrix) in 3D

First moments (this lesson) versus second moments (upcoming topics)

Beyond moments of inertia, these ideas extend to probability theory (where ρ becomes a probability density function and the center of mass becomes the expected value), fluid mechanics (where density-weighted integrals determine buoyancy and flow characteristics), and even general relativity (where the stress-energy tensor generalizes mass distribution). Mastering the integral setup for mass and center of mass provides a template for all of these advanced applications.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

A lamina has uniform density ρ = 5 and occupies a region D that is symmetric about the y-axis. Without performing any calculations, what can you conclude about the x-coordinate of its center of mass, x̄? Explain your reasoning.
Show answer
Because D is symmetric about the y-axis and ρ is constant, the integrand x · ρ is an odd function in x over a symmetric domain. By the properties of integrals of odd functions over symmetric intervals, My = ∬ x ρ dA = 0. Therefore x̄ = My / M = 0, meaning the center of mass lies on the y-axis. This is a powerful symmetry shortcut: whenever both the region and the density are symmetric about an axis, the center of mass must lie on that axis.

Question 2: BASIC CALCULATION

Find the total mass of a rectangular lamina occupying the region D = {(x, y) : 0 ≤ x ≤ 3, 0 ≤ y ≤ 2} with density ρ(x, y) = 2y.
Show answer
M = ∫₀³ ∫₀² 2y dy dx. Evaluating the inner integral: ∫₀² 2y dy = [y²]₀² = 4. Then M = ∫₀³ 4 dx = 12. The total mass is M = 12. Notice that because ρ depends only on y, the inner integral is the same for every x-value, and the outer integral simply multiplies by the x-extent of the rectangle. The units would be mass units if ρ were given in, say, kg/m².

Question 3: INTERMEDIATE

Find the center of mass of the lamina occupying the region bounded by y = x² and y = 4 with density ρ(x, y) = 1 (uniform).
Show answer
Since ρ = 1, center of mass equals the centroid. The region is bounded above by y = 4 and below by y = x², so x ranges from −2 to 2. By symmetry about the y-axis, x̄ = 0. For ȳ: Area = ∫₋₂² (4 − x²) dx = 2∫₀² (4 − x²) dx = 2[4x − x³/3]₀² = 2(8 − 8/3) = 32/3. Then Mx = ∫₋₂² ∫_{x²}⁴ y dy dx = ∫₋₂² [y²/2]_{x²}⁴ dx = ∫₋₂² (8 − x⁴/2) dx = 2∫₀² (8 − x⁴/2) dx = 2[8x − x⁵/10]₀² = 2(16 − 32/10) = 2(128/10) = 256/10 = 128/5. Therefore ȳ = (128/5)/(32/3) = (128/5)(3/32) = 384/160 = 12/5. The centroid is (0, 12/5).

Question 4: APPLIED

A thin metal plate occupies the region D bounded by x = 0, y = 0, and x + y = 1 (a right triangle). Due to a heat treatment process, the density varies as ρ(x, y) = 6x. Find the mass and the center of mass of the plate.
Show answer
Region: for 0 ≤ x ≤ 1, y ranges from 0 to 1 − x. Mass: M = ∫₀¹ ∫₀^{1−x} 6x dy dx = ∫₀¹ 6x(1 − x) dx = 6∫₀¹ (x − x²) dx = 6[x²/2 − x³/3]₀¹ = 6(1/2 − 1/3) = 6(1/6) = 1. For My: ∫₀¹ ∫₀^{1−x} 6x² dy dx = ∫₀¹ 6x²(1 − x) dx = 6[x³/3 − x⁴/4]₀¹ = 6(1/3 − 1/4) = 6(1/12) = 1/2. So x̄ = 1/2. For Mx: ∫₀¹ ∫₀^{1−x} 6xy dy dx = ∫₀¹ 6x · (1−x)²/2 dx = 3∫₀¹ x(1 − 2x + x²) dx = 3[x²/2 − 2x³/3 + x⁴/4]₀¹ = 3(1/2 − 2/3 + 1/4) = 3(1/12) = 1/4. So ȳ = 1/4. Center of mass: (1/2, 1/4). The center of mass is shifted rightward (toward higher x) relative to the centroid (1/3, 1/3) because ρ = 6x concentrates mass at larger x-values.

Question 5: CRITICAL THINKING

Let D be an arbitrary bounded region in ℝ² and let ρ(x, y) = c₁ f(x) + c₂ g(y) where c₁, c₂ > 0 and f, g are continuous non-negative functions. Prove that the center of mass (x̄, ȳ) of the lamina always lies strictly inside D (i.e., not on the boundary), assuming D has nonempty interior. Then discuss whether this conclusion can fail if ρ is allowed to be zero on part of D.
Show answer
Since ρ > 0 on all of D (because c₁, c₂ > 0 and f, g ≥ 0, with ρ = 0 only if both f and g vanish simultaneously, which would require a specific condition), every open subset of D contributes positive mass. The coordinates x̄ = ∬ x ρ dA / M and ȳ = ∬ y ρ dA / M are weighted averages, and a weighted average of values from an open connected set with strictly positive weights must lie in the interior of the convex hull of D. Since D contains its interior and the convex hull of D contains D, (x̄, ȳ) lies in the interior. However, if ρ is allowed to vanish on part of D, mass could concentrate entirely along a boundary curve. For example, if D is a disk and ρ is nonzero only along the boundary circle, the center of mass could lie on the boundary—or even outside D if D is not convex and ρ concentrates mass near a concavity. This highlights the importance of the positivity assumption on ρ.

SUMMARY

Summary & Key Formulas

Summary

This lesson introduced the integral formulation for computing mass, first moments, and center of mass of two-dimensional laminae with variable density function ρ(x, y). The total mass is M = ∬ ρ dA; the first moments are Mx = ∬ y ρ dA and My = ∬ x ρ dA; and the center of mass coordinates are x̄ = My / M and ȳ = Mx / M. When density is uniform, the center of mass reduces to the centroid, a purely geometric average of position.

These formulas are direct continuous analogues of the discrete weighted-average formulas for point masses. The key computational steps are: (1) describe the region D with appropriate integration bounds, (2) set up three double integrals for M, Mx, and My, and (3) divide moments by mass to obtain the center of mass. Symmetry arguments can often eliminate one or more integrals entirely. Looking ahead, these ideas extend to triple integrals in 3D, moments of inertia (second moments), and applications in probability, physics, and engineering.

Varsity Tutors • Calculus 3 • Mass, Density & Center of Mass — Mass, Density, and Center of Mass (Intro)