Skip to content
Tutorials Center
My learning

Topics

Lesson 29 of 47 · Centroids and Distributed Loads

Centroids by Integration

Derive the centroid of triangles, parabolic spandrels and semicircles with thin strips, then memorize the standard results. Runnable sympy checks included.

Rectangles are easy: the centroid is in the middle. Curves are not. To find the centroid of a region bounded by a curve, you slice the region into thin strips, treat each strip as a tiny rectangle whose centroid you know, and add up the moments. In the limit, the sum becomes an integral.

This is not just an exercise. A triangular load, a parabolic arch and a semicircular window all rest on these results, and you will use the standard values for the rest of your engineering career.

A parabolic spandrel with a thin vertical strip, its area dA = y dx, the strip's centroid and the final centroid at 3a/4 and 3b/10.
A vertical strip of width dx and height y has area y dx; its own centroid is at x and y/2. Summing the strips gives the centroid of the whole shape.

What you will learn

  • Write the centroid as a ratio of two integrals.
  • Choose a strip direction that makes the integral easy.
  • Derive the centroid of a triangle and a parabolic spandrel.
  • Recall the standard centroid table.

Key terms

Centroid (x̄, ȳ): the average position of all points in a region.

First moment of area: ∫ x dA or ∫ y dA, the area-weighted sum of position.

Strip (element): a thin slice dA whose centroid is known.

Axis of symmetry: a line through the shape that mirrors it; the centroid lies on it.

The formulas

For a plane region of area A:

Text
A = ∫ dA
x̄ = (∫ x_c dA) / A
ȳ = (∫ y_c dA) / A

Here x_c and y_c are the coordinates of the centroid of the element dA, not of its corner. This detail trips up many students. For a vertical strip of height y and width dx, x_c = x and y_c = y/2. For a horizontal strip of length x and thickness dy, x_c = x/2 and y_c = y.

Shortcut: symmetry. If a shape has an axis of symmetry, the centroid lies on it. Two axes give the centroid at their crossing, with no calculation at all.

Worked example 1: a triangle

A triangle has base b and height h. Place the base on the x-axis. At height y the width of a horizontal strip is w(y) = b (h - y)/h, so dA = b (h − y)/h dy.

Text
A = ∫₀ʰ b (h - y)/h dy = b h / 2
ȳ = (1/A) ∫₀ʰ y · b (h - y)/h dy = (2/(b h)) · (b h² / 6) = h / 3

The centroid of a triangle is one third of the height from the base, regardless of the shape of the triangle. This is the single most useful result in the chapter: it tells you that a triangular load acts at one third of its length from the big end.

Worked example 2: a parabolic spandrel

A spandrel is the area between a curve and the axes. Take y = b (x/a)² for 0 ≤ x ≤ a, so the curve passes through (a, b). Use vertical strips: dA = y dx, x_c = x, y_c = y/2.

Text
A  = ∫₀ᵃ b x²/a² dx             = a b / 3
x̄ = (1/A) ∫₀ᵃ x · b x²/a² dx    = (3/(a b)) · (a² b / 4) = 3a / 4
ȳ = (1/A) ∫₀ᵃ (y/2) · y dx      = (3/(a b)) · (a b² / 10) = 3b / 10

Compare with a triangle with the same base and height: the centroid of the triangle below the diagonal sits closer to the origin in x (2a/3), because the curve bulges out toward the far end. The parabola puts more area at large x, which pulls the centroid out to 3a/4.

Standard centroids

Shape Area Centroid location
Rectangle, b × h b h Center: b/2, h/2
Triangle, base b, height h b h / 2 h/3 above the base
Semicircle, radius r π r² / 2 4r / (3π) ≈ 0.424 r from the diameter
Quarter circle, radius r π r² / 4 4r / (3π) from each straight edge
Parabolic spandrel y = k x², width a, height b a b / 3 x̄ = 3a/4, ȳ = 3b/10
Half of a parabolic cap, y = b(1 − x²/a²), 0 ≤ x ≤ a 2 a b / 3 x̄ = 3a/8, ȳ = 2b/5
Circular sector, half-angle α α r² 2 r sinα / (3α) from the vertex

Common misconceptions

"The centroid of a triangle is at the middle of the height." It is at one third, not one half. The wide part of the triangle is at the bottom.

"For a strip, use the corner coordinates." No: use the strip's own centroid. For a vertical strip the vertical coordinate is y/2.

"The centroid must lie inside the shape." Not always: a ring, a hook or an L-shaped bracket can have its centroid in empty space.

Try it

Let sympy do the integrals. Change the curve to y = b (x/a)**3 and see how the answers change.

Python Centroid by symbolic integration

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Python See the centroid

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check · 5 questions

of 5 answered You scored / 5 · perfect!

  1. 1. A triangle with base 6 m and height 9 m rests on its base. Its centroid is how high above the base?

    ȳ = h/3 = 9/3 = 3 m.
  2. 2. For a vertical strip of height y, the strip's own centroid is at height:

    The strip is a thin rectangle standing on the x-axis, so its centroid is halfway up.
  3. 3. A semicircle of radius 100 mm has its centroid how far from the flat edge?

    4r/(3π) = 400/(3π) ≈ 42.4 mm.
  4. 4. A shape has two axes of symmetry. Where is its centroid?

    The centroid lies on every axis of symmetry, so it must be where they cross.
  5. 5. For the spandrel y = b(x/a)², the x-coordinate of the centroid is:

    From the integral, x̄ = 3a/4.

Summary

  • x̄ = ∫ x_c dA / A, ȳ = ∫ y_c dA / A, with x_c, y_c the element's own centroid.
  • Choose strips so the element's centroid and width are simple.
  • Triangle: h/3. Semicircle: 4r/(3π). Spandrel: 3a/4, 3b/10.
  • Symmetry gives the centroid for free.

Next: Composite areas