MapleCenterOfMass.mws

>    with(plots):

Warning, the name changecoords has been redefined

Find the center of mass of a planar lamina whose density is 3 units/sq unit and boundaries are formed by the graphs of   y = x^4-3*x^2-4  and   y = 50 .

>    f:=x^4-3*x^2-4;

f := x^4-3*x^2-4

>    solve(f=50,x);

-3, 3, 6^(1/2)*I, -I*6^(1/2)

>    top:=plot(50,x=-3.1..3.1,thickness=3):

>    bottom:=plot(f,x=-3.1..3.1,thickness=3):

>    display(top,bottom);

[Maple Plot]

>    mx:=(3/2)*int(50^2-f^2,x=-3..3);

mx := 721872/35

>    my:=3*int(x*(50-f),x=-3..3);

my := 0

>    m:=3*int(50-f,x=-3..3);

m := 4212/5

>    xc:=my/m;

xc := 0

>    yc:=mx/m;

yc := 2228/91

>    evalf(%);

24.48351648

>    CofMass:=pointplot([0,2228/91],symbol=circle,symbolsize=20,color=blue):

>    display(top,bottom,CofMass);

[Maple Plot]

Find the center of mass of a planar lamina whose density is 2 units/sq unit and boundaries are formed by the graphs of    y = x+2   and    y = x^2 .

>    f2:=x+2;

f2 := x+2

>    g2:=x^2;

g2 := x^2

>    top2:=plot(f2,x=-2..3,thickness=3):

>    bottom2:=plot(g2,x=-2..3,thickness=3):

>    display(top2,bottom2);

[Maple Plot]

>    solve(f2=g2,x);

-1, 2

>    mx:=(2/2)*int(f2^2-g2^2,x=-1..2);

mx := 72/5

>    my:=2*int(x*(f2-g2),x=-1..2);

my := 9/2

>    m:=2*int(f2-g2,x=-1..2);

m := 9

>    xc:=my/m;

xc := 1/2

>    yc:=mx/m;

yc := 8/5

>    CofMass2:=pointplot([1/2,8/5],symbol=circle,symbolsize=20,color=blue):

>    display(top2,bottom2,CofMass2);

[Maple Plot]

Below we have a picture relating to the extra credit mass problem.  In the picture the plate is colored in a way that relates to its density.

>    contourplot(1+x^2,x=-1..2,y=x^2..x+2,contours=12,filled=true);

[Maple Plot]

>