# Center of Mass via the First Moment Integral

The **center of mass** of an an object is the point at
which we can assume all mass is concentrated for mechanics calculations.
Mass in any extended body is actually distributed over some volume, and
if the body is subjected to gravity then each bit of mass experiences
some gravitational force. The center of mass is the point at which all
the gravitational forces create **zero net moment** on the
body.

Knowing the center of mass is critical for any mechanics problem that deals with extended bodies, as this is where we will assume gravity forces act and it is a critical point in dynamics calculations.

Just as we had with centroids, two methods exist for finding the center of mass:

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

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 Center of Mass for Uniform Density Parts

We will start by examining the center of mass for a uniform density 3D volume. The center of mass differs from from the centroid in that we will be examining mass rather than areas or volumes. Taking the centroid equations for a volume and substituting in the mass terms we have the following initial equations for the center of mass.

The mass terms can then be re written as a density times a volume. This gives us a density term on both the top and bottom as shown below. For the case where we have a uniform density throughout the whole part, we can move the term in the integral outside the integral. It will then cancel out with the density term on the bottom, leaving us with the equation for the centroid of a volume.

This means that for a uniform density part, as we would have with any
part made of a single material, **the center of mass and the
centroid are the same point**.

For objects made from multiple discrete parts, where each piece of the body has a uniform density, we can use this method to find the center of mass for each section, but we will need to use the method of composite parts to find the overall center of mass.

## Finding the Center of Mass for Non-Uniform Density Parts

In some rare cases, we may have an object in which the density of the material is continuously changes with position. In these rare cases, we will need to revisit the equations from earlier. We will leave the density term in the integral (since it is not a constant), and we will leave the bottom term as the mass (again since there is no constant density term).

In these calculations, the density term will be an equation that defines the density at any given x, y, and z position, the dV term will be the cross sectional area equation just as we had for centroids, and m is the total mass of the body.