In this video we will focus on how to determine the centroid of an area, which is the geometric center of an area.
From the previous video, we learned how to theoretically determine the location of the center
of gravity for a rigid body, with respect to a given coordinate system,
x-bar, y-bar and z-bar.
And we also know that weight equals to mass times g, which is the gravitational acceleration, and for the general near earth situations 
it can be considered as a constant, about 9.81 meter per second squared. 
Therefore, the constant g can be cancelled out from the numerator and denominator of this equation, 
and this new set of formulas 
now represent the coordinates of the center of mass for the rigid body.
In this case the center of gravity is the same as the center of mass. 
And we also know that mass equals to density rou times the volume. 
And if the rigid body has uniform density, then density rou can also be cancelled out from the numerator and denominator of the equation, 
and now this new set of formulas represent the coordinates of the centroid of volume for this rigid body. 
Note that centroid means a geometric center. 
And in this case the center of gravity, the center of mass 
and the centroid of the volume are all the same point. 
And if the volume has uniform thickness,
then we can further reduce the situation from 3D to 2 dimensional, and cancel out the thickness from this equation. 
And now we have coordinates
for the centroid of an area.
And sometimes we can even further reduce the situation by cancelling out the constant width of the area, and get the coordinates 
for the centroid of a line. The line could be either straight or curved. 
Since centroid is the geometric center of a volume or shape, if the volume or shape has any axis of symmetry, then centroid 
must be on this axis of symmetry. Therefore, we can easily determine the centroid location 
of several common symmetrical shapes such as a cube,
a circle, a rectangle,
or a straight line.
This can be used to help find the centroid for other unsymmetrical volume or shape.
So let’s look at this example: 
finding the centroid location for a right triangle with base of b and height of h.
I will demonstrate this problem using two different approaches. First of all we need to put this triangle into an x-y coordinate system 
so that we can apply these two equations to find the centroid location. 
Since in these two equations x and y represent the coordinates of an arbitrary point, 
(x, y) in this triangle, let’s define a differential element at this location
with sides of dx and dy. Therefore, the area of the differential element, dA, equals to dx times dy. 
Also, it is helpful to know the equation for this line, which is y equals to h over b times x,  
as we learned from linear functions probably in pre-calculus class. 
This is helpful because we will use this as the upper limit when we integrate along the y direction. 
Therefore, first we calculate for x-bar.
The numerator is an integration of x times dA, integrated along the y axis from zero
to the line h over b x, and along the x axis from 0 to b, and we get 
1/3 h b squared,
And we do the same thing with the denominator, 
which is one half h times b.
You might notice this is simply the area of the triangle, one half height times the base. That’s correct. 
The denominator in this formula is simply the total area.
Therefore, x bar is calculated to be two third time b. 
And then we do the same thing for the y-bar.
The denominator is of course still the total area, 1/2 h time b, but we need to integrate y dA, and eventually we get 
y-bar equals to one third h. 
This is the first approach. 
However, integration with two variables can sometimes be difficult. 
Therefore let's look at a second approach in which we only need to integrate with one variable.
So we have the same right triangle put in the x-y coordinate system. But this time we choose
a vertical strip of width dx, instead of a little square to be our differential element. 
The height of this strip is determined by the y coordinate of this point which is h over b times x as we determined earlier from the equation 
of this line. Now in these equations as you can see x and y are replaced by x tilde and y tilde. 
This is because now my differential element can no longer represent a particle. 
Therefore in these two equations x tilde and y tilde represent the coordinates of the centroid location of the differential element, 
which in this case is a rectangle, and we know that its centroid is right here at the center. And we can tell that x tilde equals to x,
and dA equals to the area of the rectangle, which is the height h over b times x, times
the width, which is dx. We plug these into the first equation,
Therefore x-bar equals to two third b, just like what we got using the first approach.
But here as you can see we only need to integrate over one variable x. 
To find y-bar we do the same thing, but use a horizontal strip instead. 
And again we get the same result y-bar is one third h. 
So it is up to you to decide what is the best method to use. As you can see, choosing the 
differential element cleverly can greatly simplify your calculation.
Now we mark the centroid position on the triangle. 
And as you can see, it is located at 1/3 location to either side. Actually, if you recall, we used this conclusion before when replacing 
a linearly distributed loading, the one that shapes like a triangle, with a concentrated load. 
The centroid locations for common shapes have long been summarized and can be easily found online or in engineering textbook or handbooks.  
For example, here is a screen shot of a Wikipedia page on centroids. You might find these information very useful.
