# Centroids in 2D via the First Moment Integral

The **centroid** of an area can be thought of as the
geometric center of that area. It is the average position (x and y
coordinate) of all the points in in
the area. If an area was represented as a thin, uniform plate,
then the centroid would be the same as the center of mass for this thin
plate.

Centroids of areas are useful for a number of situations in the mechanics course sequence, including the analysis of distributed forces, the analysis of bending in beams, the analysis of torsion in shafts, and as an intermediate step in determining moments of inertia which are used to determining an object's resisting to rotational accelerations or an objects resistance to bending or torsion. Two methods exist for finding the centroids of shapes:

- Using calculus and the first moment integral.
- Using the method of composite parts and tables of centroids for common shapes.

The tables used in the method of composite parts however are derived from the first method, so both methods ultimately use the moment integrals.

## Finding the Centroid via the First Moment Integral

When we find the centroid of a two dimensional shape, we will be looking for both an x and a y coordinate, represented as x bar and y bar respectively. This will be the x and y coordinate of the point that is the centroid of the shape.

To find the average x coordinate of a shape (x bar) we will, break
the shape into a large number of small very areas, for each area we will
multiply the area of that shape by it's x coordinate, sum all those
values up, and finally divide by the total area. To sum an infinite
number of infinitely small areas, we use integration. Specifically, this
sum is the **first, rectangular, area moment integral**,
where the x coordinate is the distance value in our moment integral. We
can do something similar with the y coordinates to find our y bar value
and arrive at the equations below.

Next let's discuss what the variable dA represents and how we integrate it over the area. The variable dA is the rate of change in area as we move along an axis. For the x position of the centroid we will be moving along the x axis, and for the y position of the centroid we will be moving along the y axis.

First let's look at the x axis, as we move along the x axis on a shape from it's left most point to its right most point, the rate of change of the area at any instant in time be equal to the height of the shape at that point times the rate at which we are moving along the axis (dx). Because the height of the shape will change with position, we do not use any one value, but instead must come up with an equation that describes the height at any given value of x. We will then multiply this equation by the variable x, and integrate that equation from the leftmost x position of the shape (x min) the right most x position of the shape (x max).

To find the y coordinate of the of the centroid, we have a similar process, but since we are moving along the y axis, the value dA is the equation describing the width of the shape at any given value of y. We will also integrate this equation from the y position of the bottommost point on the shape (y min) to the y position of the topmost point on the shape (y max).

Using the first moment integral and the equations shown above we can theoretically find the centroid of any shape as long as we can write an equation to describe the height and width at any x or y value respectively. For more complex shapes however, determining these equations and then integrating these equations may become very time consuming. For these complex shapes, the method of composite parts or computer tools will most likely be much faster.

## Using Symmetry as a Shortcut

Shape symmetry can provide a shortcut in many centroid calculations. Remember that the centroid coordinate is the average x and y coordinate for all the points in the shape. If the shape has a line of symmetry, that means each point on one side of the line must have an equivalent point on the other side of the line. This means that the average value (aka the centroid) must lie along the line of symmetry. If the shape has more than one line of symmetry, then the centroid must exist at the intersection of the two lines of symmetry.