Friday, May 16, 2008

Uncertain centers

Today the topic goes a bit more technical...

Consider a region R in some Euclidean space of arbitrary dimensions. Assume a Cartesian co-ordinate system is given, then position vector C of the center of mass of the region R is given by:
C = R r dm / R dm
where r is the position vector, dm is the infinitesimal mass element, and the integrals are integrated over the region R. [Definition 1]

Now I found a different way of defining center of mass from the xkcd blag: the centroid can be defined as the point such that the sum of the squares of the distances to each point is minimized.

Is this really true? I think so, as long as I make a few minor changes, so I decided to prove this myself (not so rigorously, but good enough to convince me).

First of all, the new "definition" is based of sum of squares of distances, which involves discrete sums. This is not what I want to work with right now, so let's turn this into a continuous definition. So how do I sum up all the squares of distances? Well, I can integrate all the squares of distances rather than summing them up. Another problem with the definition is that it applies to centroids (i.e. geometric center of a region), not center of masses. This can be fixed by indicating that the squares of distances are also weighted by mass.

Look at the diagram. The center of mass is located at C. Consider a tiny mass element Δm whose position vector is r. The distance between the center of mass and the mass element is given by |r - C|, so the square of the distance is given by |r - C|2. Since the squared distance must be weighted by mass, it becomes Δm |r - C|2. This must be summed together for every possible value of r, so we use the summation notation: Σ Δm |r - C|2 = Σ |r - C|2 Δm. Now as the mass element Δm becomes the differential dm, the equation becomes an integral over the region R:
S = R |r - C|2 dm
The value of this integral is given the symbol S for convenience.

So here's our new definition:
C is the center of mass if
S = R |r - C|2 dm
is minimized. [Definition 2]
Minimizing a value can be defined more strictly. Since a minimum point is an extremum, then a necessary condition for S to be minimized is that:
S/∂ri = 0 for all values of i.
Here, by ri I am referring to a specific coordinate of the arbitrary Cartesian coordinate system. For example, in an xyz-coordinate system, I can label x as r1, y as r2, and z as r3. By ensuring the partial derivative of S with respect to every coordinate is 0, I am specifying a necessary, though insufficient, condition for S to be minimized.

Now it's time to manipulate this equation:
S/∂ri = 0
∂/∂ri
[∫R |r - C|2 dm] = 0
R ∂/∂ri |r - C|2 dm = 0 (move the differentiation inside and the integration outside*)
R 2 (r - C) dm = 0 (|r - C|2 = (r - C) · (r - C), then differentiate by product rule or chain rule*)
2 R (r - C) dm = 0
2 R r dm - 2 R C dm = 0
2 R r dm - 2 C R dm = 0 (C is a constant)
2 R r dm = 2 C R dm
2 R r dm / (2 R dm) = C
R r dm / R dm = C
C = R r dm / R dm
*I think these operations are allowed, but I can't prove that.
Does this equation look familiar? (Q.E.D.)

Unfortunately this does not prove that definition 1 is absolutely equivalent to definition 2, since I have only shown that if definition 2 says a point is a minimum, then definition 1 will agree, but not the other way around. Still I find it very surprising that I was even able to deduce definition 1 form definition 2, especially since I'm working with unfamiliar integrals.
  • Give a example in which ∂S/∂ri = 0 does not imply a minimum point.

1 comments:

Freiddie said...

Answer
For example, a maximum point, or a saddle point, or even a completely flat surface would cause the partial derivative to be zero.

Post a Comment