| > | 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  
 and  
.
| > | f:=x^4-3*x^2-4; | 
| > | solve(f=50,x); | 
| > | top:=plot(50,x=-3.1..3.1,thickness=3): | 
| > | bottom:=plot(f,x=-3.1..3.1,thickness=3): | 
| > | display(top,bottom); | 
| > | mx:=(3/2)*int(50^2-f^2,x=-3..3); | 
| > | my:=3*int(x*(50-f),x=-3..3); | 
| > | m:=3*int(50-f,x=-3..3); | 
| > | xc:=my/m; | 
| > | yc:=mx/m; | 
| > | evalf(%); | 
| > | CofMass:=pointplot([0,2228/91],symbol=circle,symbolsize=20,color=blue): | 
| > | display(top,bottom,CofMass); | 
Find the center of mass of a planar lamina whose density is 2 units/sq unit and boundaries are formed by the graphs of   
  and   
.
| > | f2:=x+2; | 
| > | g2:=x^2; | 
| > | top2:=plot(f2,x=-2..3,thickness=3): | 
| > | bottom2:=plot(g2,x=-2..3,thickness=3): | 
| > | display(top2,bottom2); | 
| > | solve(f2=g2,x); | 
| > | mx:=(2/2)*int(f2^2-g2^2,x=-1..2); | 
| > | my:=2*int(x*(f2-g2),x=-1..2); | 
| > | m:=2*int(f2-g2,x=-1..2); | 
| > | xc:=my/m; | 
| > | yc:=mx/m; | 
| > | CofMass2:=pointplot([1/2,8/5],symbol=circle,symbolsize=20,color=blue): | 
| > | display(top2,bottom2,CofMass2); | 
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); | 
| > |