( 862, #11) Find the mass and center of mass of the lamina that occupies the region
D = {(x,y) : 0 <= x <= Pi, 0 <= y <= sin(x)}, and has the density function rho(x,y) =y.

Solution: By the graph, for each fixed x, y varies from 0 to sin(x):

The mass of the lamina is Pi/4 , and its center of mass is (Pi/2, 16/(9 Pi)):

mass = Pi/4

rho := (x,y)->y:
c := x -> 0: d := x -> sin(x):
Integrate_dydx(rho, 0,Pi,c,d);

f(x,y) = y, c(x) = 0, d(x) = sin(x)

int(f(x,y), y) = 1/2*y^2

int(f(x,y), y = c(x) .. d(x)) = 1/2*sin(x)^2

int( int(f(x,y), y = c(x) ..d(x)), x) = -1/4*cos(x)*sin(x)+1/4*x

int(int(f(x,y), y = c(x) ..d(x)), x = a .. b) = 1/4*Pi

xbarcalculation:

xrho := (x,y) -> x*rho(x,y):
Integrate_dydx(xrho, 0,Pi,c,d);

f(x,y) = x*y, c(x) = 0, d(x) = sin(x)

int(f(x,y), y) = 1/2*x*y^2

int(f(x,y), y = c(x) .. d(x)) = 1/2*sin(x)^2*x

int( int(f(x,y), y = c(x) ..d(x)), x) = 1/2*x*(-1/2*cos(x)*sin(x)+1/2*x)+1/8*sin(x)^2-1/8*x^2

int(int(f(x,y), y = c(x) ..d(x)), x = a .. b) = 1/8*Pi^2

xbar =Pi/2

ybar calculation

yrho := (x,y) -> y*rho(x,y):

Integrate_dydx(yrho, 0,Pi,c,d);
f(x,y) = y^2, c(x) = 0, d(x) = sin(x)

int(f(x,y), y) = 1/3*y^3

int(f(x,y), y = c(x) .. d(x)) = 1/3*sin(x)^3

int( int(f(x,y), y = c(x) ..d(x)), x) = -1/9*sin(x)^2*cos(x)-2/9*cos(x)

int(int(f(x,y), y = c(x) ..d(x)), x = a .. b) = 4/9

ybar = (4/9)/(Pi/4) = 16/(9Pi)

by: nl