next up previous
Next: About this document Up: Background Previous: Triple integrals

Centroids and Centers of Mass

Maple can also be used to take some of the tedium out of calculations of centroids and centers of mass. Suppose that a mass with density function occupies the unit cube. Then the following example shows how to compute the mass and the coordinates of the center of mass of the body.

  > mass := int(int(int(1-z/2,x=0..1),y=0..1),z=0..1);

  > x_bar := int(int(int(x*(1-z/2),x=0..1),y=0..1),z=0..1)/mass;

  > y_bar := int(int(int(y*(1-z/2),x=0..1),y=0..1),z=0..1)/mass;

  > z_bar := int(int(int(z*(1-z/2),x=0..1),y=0..1),z=0..1)/mass;



William W. Farr
Thu Apr 25 17:53:00 EDT 1996