Center of Mass
Text The center of mass of a twodimensional region is a weighted average of the positions of the particles that the region comprises. The amount each particle counts in this weighted average is proportional to its mass.
If we wanted to find the average position of a series of particles, we could find each coordinate of the point representing average position by adding up the values of that coordinate from each point and dividing by the number of points. For example, to find the x coordinate X in the average position of n particles, we would calculate
(Σ_{n}x_{n})/n
Where x_{n} is the x coordinate of the position of the nth particle.
Suppose instead we wanted to find the center of mass of a region as described in the first paragraph. Our expression for the x coordinate of the center of mass, given the mass m_{n} of each particle is:
(Σ_{n}x_{n}m_{n})/(Σ_{n}m_{n})
(Note that the denominator is equal to the total mass of the set of particles.)
Given an area density function ρ(x, y), we can express this summation as
(Σ_{n}x_{n}*ρ(x_{n}, y_{n})*A_{n})/(Σ_{n}ρ(x_{n}, y_{n})*A_{n})
Where A_{n} is the area of the nth particle.
For a region with domain D composed of a very large number of particles, we can change this summation to a double integral, replacing A_{n} with dA:
X = (∫∫_{D}x*ρ(x, y)dA)/(∫∫_{D}ρ(x, y)dA).
Similarly, to find the y coordinate of center of mass, use:
Y = (∫∫_{D}y*ρ(x, y)dA)/(∫∫_{D}ρ(x, y)dA).
This gives us the center of mass (X, Y) of D.
Demos
Center of Mass: Rectangular Plate
 
This demo graphs a density function ρ(x, y) for a rectangular region and then finds the center of mass of that region.
Changing "rhoMin" (estimated minimum value of ρ(x, y) and "rhoMax" estimated maximum value of ρ(x, y)) is optional. Doing so will improve the coloring of the graph (cyan at "rhoMin", red at "rhoMax").

Center of Mass: Region Between Function Graphs
 
This is a variation of the previous demo. This time, you can use any region such that f(x) ≤ y ≤ g(x) and x is between two constants. The default example finds the center of mass of a kite.

"A Kite on a String"
 
If you hang an object from a string, its center of mass will be under the string at rest position. In this demo, you can see this principle in action. As before, choose a density function ρ(x, y), two constants for the bounds of x, and two functions f(x) and g(x) for the bounds of y. You can then change x_{0} to see what happens when you attach the string at different points on the upper boundary g(x) of the object.

Exercises 1. Does the center of mass change if the density function is multipied by some constant k? Why or why not?
2. Find a region and some density function ρ(x, y) such that the center of mass lies outside the region. In general, what geometric property must a region have for its center of mass to be able to lie outside of the region?
