# Finding the center of area (centroid) of a right triangle

• I
annamal
TL;DR Summary
Finding the centroid of a right triangle
To find the y value of the centroid of a right triangle we do
$$\frac{\int_{0}^{h} ydA}{\int dA} = \frac{\int_{0}^{h} yxdy}{\int dA}$$
What is wrong with using
$$\int_{0}^{h} ydA = \int_{0}^{b} y*ydx$$ as the numerator value instead especially since ydx and xdy are equal and where h is height of triangle, b is base of triangle

Homework Helper
TL;DR Summary: Finding the centroid of a right triangle

To find the y value of the centroid of a right triangle we do
$$\frac{\int_{0}^{h} ydA}{\int dA} = \frac{\int_{0}^{h} yxdy}{\int dA}$$
So here the "##x##" is the width of the triangle at height ##y##. I would prefer to see it made more clear that ##x## is a function of ##y## rather than a simple constant.$$\frac{\int_{0}^{h} ydA}{\int dA} = \frac{\int_{0}^{h} yx(y)dy}{\int dA}$$
Beyond this, we actually know that ##x(y) = y\frac{b}{h}##. So we can proceed in the obvious fashion to get an integral of ##y^2## times a constant. [and possibly with a constant offset based on the Oops that I just editted in]

Edit: Oops. This formula for ##x## holds if the right triangle is sitting on its tip. If it is sitting on its flat base then ##x(y) = b - y\frac{b}{h}##

What is wrong with using
$$\int_{0}^{h} ydA = \int_{0}^{b} y*ydx$$ as the numerator value instead especially since ydx and xdy are equal and where h is height of triangle, b is base of triangle
Here again, one should present ##y## as an explicit function of ##x## and note that ##y(x) = x\frac{h}{b}##. [or ##y(x) = h - x\frac{h}{b}##]. When all is said and done, one will get an integral of ##x^2## times a [different] constant and possibly with a constant offset depending on the orientation of the triangle.

Yes, it looks to me as if both integrals will yield the same value when correctly evaluated.

Last edited:
• topsquark
annamal
So here the "##x##" is the width of the triangle at height ##y##. I would prefer to see it made more clear that ##x## is a function of ##y## rather than a simple constant.$$\frac{\int_{0}^{h} ydA}{\int dA} = \frac{\int_{0}^{h} yx(y)dy}{\int dA}$$
Beyond this, we actually know that ##x(y) = y\frac{b}{h}##. So we can proceed in the obvious fashion to get an integral of ##y^2## times a constant. [and possibly with a constant offset based on the Oops that I just editted in]

Edit: Oops. This formula for ##x## holds if the right triangle is sitting on its tip. If it is sitting on a flat side then ##x(y) = b - y\frac{b}{h}##

Here again, one should present ##y## as an explicit function of ##x## and note that ##y(x) = x\frac{h}{b}##. [or ##y(x) = h - x\frac{h}{b}##]. When all is said and done, one will get an integral of ##x^2## times a [different] constant and possibly with a constant offset depending on the orientation of the triangle.

Yes, it looks to me as if both integrals will yield the same value when correctly evaluated.
$$x(y) = b - y\frac{b}{h}$$
$$y(x) = \frac{-h}{b}x +h$$
No they would be different because $$\int_{0}^{h} y*x(y)dy = \int_{0}^{h} y*(b - y\frac{b}{h})dy$$
this does not equal $$\int_{0}^{b} y(x)*y(x)dx = \int_{0}^{b} (\frac{-h}{b}x +h)^2 dx$$

Homework Helper
$$x(y) = b - y\frac{b}{h}$$
$$y(x) = \frac{-h}{b}x +h$$
No they would be different because $$\int_{0}^{h} y*x(y)dy = \int_{0}^{h} y*(b - y\frac{b}{h})dy$$
this does not equal $$\int_{0}^{b} y(x)*y(x)dx = \int_{0}^{b} (\frac{-h}{b}x +h)^2 dx$$
Out by a factor of two? Because the latter imputes the height of a vertical strip as the height of the top of that strip instead of the height of the strip's centroid halfway up.

• topsquark
annamal
Out by a factor of two? Because the latter imputes the height of a vertical strip as the height of the top of that strip instead of the height of the strip's centroid halfway up.
Yes off by a factor of two. Can you explain that more clearly? What do you mean by "instead of the height of the strip's centroid halfway up?"

Homework Helper
Yes off by a factor of two. Can you explain that more clearly? What do you mean by "instead of the height of the strip's centroid halfway up?"
A centroid is the average position of the area in a shape.

If you are averaging vertical position over a bunch of horizontal strips, there is no ambiguity about the vertical position of each strip. The vertical position of every point on a horizontal strip is the same. So that is the vertical position of the strip.

It is a weighted average, of course. So you weight each strip by the incremental area of that strip.

If you are averaging the vertical position over a bunch of vertical strips there is room for ambiguity. What is the vertical position of a vertical strip? Is it at the top of the strip? Or at the bottom of the strip. The correct choice is to use the middle of the strip (the centroid of the strip) as its vertical position. So you are effectively averaging a set of average positions. Which is fine as long as you are weighting both the average and the average of the averages by the same measure (area in this case).

• topsquark, annamal and Lnewqban
Gold Member
2022 Award
I guess you want to calculate the centroid of the triangle given by
$$0<x<b, \quad 0<y<h(1-x/b).$$
Then you get
$$\vec{X}=\int_0^ b \mathrm{d} x \int_0^{h(1-x/b)} \mathrm{d} y \begin{pmatrix} x\\y \end{pmatrix} = \frac{h b}{6} \begin{pmatrix}b \\ h \end{pmatrix}.$$
The centroid thus is
$$\vec{x}_c=\frac{1}{A} \vec{X}=\frac{2}{bh} \vec{X} = \frac{1}{3} \begin{pmatrix}b \\ h \end{pmatrix}.$$

• dextercioby
Curiosity_0
You could use the simpler pappus' theorem which goes like this : when you rotate a 2d shape to generate a solid figure, distance travelled by centroid multiplied by area of the 2d shape is equal to volume of 3d shape generated, in case of triangle :
Let us say centroid is x distance in x-axis from orgin( at the vertex opposite of hyp), we rotate this triangle to generate a right circular cone, then the distance travelled by centroid is 2 pi x, area of triangle = 1/2ab and volume of cone = 1/3 pi a^2 b. Equating we get : 2 pi x ×1/2 ab = 1/3 pi a^2b; simplifying we get : x = 1/3 a, similarly we can get y = 1/3b