GROUP PROJECT #1--SOLUTION KEY

Here are the centers of mass, computed from the exact data for the pictures.

Problem 1

SOLUTION BY INTEGRATION

The five vertices of the pentagon are

a={0,0}; 
b={1.1,3.59};
c={3.5,.9};
d={7.34,4.2};
e={5,0};

The following routine computes a function whose graph is the straight line between two points {x1,y1} and {x2,y2}.

linear[{{x1_,y1_},{x2_,y2_},x_}]:=
y1+(y2-y1)(x-x1)/(x2-x1)

For the pentagon, the outline consists of a horizontal line and four lines given by these functions:

f1[x_]:=linear[{a,b,x}]
f2[x_]:=linear[{b,c,x}]
f3[x_]:=linear[{c,d,x}]
f4[x_]:=linear[{e,d,x}]

{f1[x],f2[x],f3[x],f4[x]}

Simplify[%]

Now perform the integrals required for the centroid.

m=Integrate[f1[x],{x,0,1.1}]+Integrate[f2[x],
{x,1.1,3.5}]+Integrate[f3[x],{x,3.5,7.34}]-
Integrate[f4[x],{x,5,7.34}]

MY=Integrate[x f1[x],{x,0,1.1}]+Integrate[x f2[x],
{x,1.1,3.5}]+Integrate[x f3[x],{x,3.5,7.34}]-
Integrate[x f4[x],{x,5,7.34}]

MX=(Integrate[f1[x]^2,{x,0,1.1}]+Integrate[f2[x]^2,
{x,1.1,3.5}]+Integrate[f3[x]^2,{x,3.5,7.34}]-
Integrate[f4[x]^2,{x,5,7.34}])/2

And the coordinates of the centroid are

xbart=MY/m
ybart=MX/m

SOLUTION BY DECOMPOSITION INTO TRIANGLES

The lines bc and cd meet the x-axis at f and g given by solving f2[x]==0 and f3[x]==0:

f={4.30297,0}
g={2.45273,0}

You can then compute the centroids of triangle abf, gde and fgc and get the moments, etc. from them. The centroids are obtained by averaging the vertices. (A proof of this, starting from the fact that the centroid of a triangle is the intersection of the lines joining the vertices to the opposite sides, can be done by Mathematica:

Solve[linear[{{p1,p2},{q1+r1,q2+r2}/2,x}]-
linear[{{q1,q2},{p1+r1,p2+r2}/2,x}]==0,x]

For our triangles, here are the centroids:

{{xx1,yy1},{xx2,yy2},{xx3,yy3}}={(a+b+f),(g+d+e),
(g+c+f)}/3

The area of the first triangle is

m1=4.30297*3.59*.5

So we get moments

{MY1,MX1}=%80*%81

Here are the others:

m2=(5-2.45273)*4.2*.5

{MY2,MX2}={xx2,yy2}*m2

m3=(4.30297-2.45273)*.9*.5

{MY3,MX3}={xx3,yy3}*m3

centr={MY1+MY2-MY3,MX1+MX2-MX3}/m

Problem 2

This figure is given by the polar equation r=1+Sin[3*t].

ParametricPlot[Evaluate[{Cos[t]*(1+Sin[3*t]),
Sin[t]*(1+Sin[3*t])}],{t,0,Pi/2},AspectRatio->
Automatic]

Here is the center of mass of a flat, uniform plate with the perimeter given by the figure:

MY=Integrate[Cos[t]*(1+Sin[3 t])^3,{t,0,Pi/2}]/3

MX=Integrate[Sin[t]*(1+Sin[3 t])^3,{t,0,Pi/2}]/3

m=Integrate[(1+Sin[3 t])^2,{t,0,Pi/2}]/2

N[%]

{xc,yc}={MY/m,MX/m}

N[%]

You can also interpret the loop as a uniform wire and get its center of mass:

Clear[x,y]

x[t_]:=Cos[t]*(1+Sin[3 t])

y[t_]:=Sin[t]*(1+Sin[3 t])

xp=x'[t]
yp=y'[t]

len=NIntegrate[Sqrt[x'[t]^2+y'[t]^2],{t,0,Pi/2}]

emmy=NIntegrate[x[t]*Sqrt[x'[t]^2+y'[t]^2],{t,0,Pi/2}]
emmx=NIntegrate[y[t]*Sqrt[x'[t]^2+y'[t]^2],{t,0,Pi/2}]

{cx,cy}={emmy/len,emmx/len}