Homework 15.4: p. 1026, #17, 28; and 15.7: p. 1050, #41, 44
Mat329, Fall, 2015
Andy Long

#17, p. 1026:

RegionPlot[x^2+y^2>1&&(x-1)^2+y^2<1,{x,0,2},{y,-1,1}]
A=2*Integrate[r,{t,0,Pi/3},{r,1,2Cos[t]}] (* using symmetry... *)
N[%]

#28, p. 1026:

Clear[r,r2,r1,V,f]
f[r_,t_]:=(r2^2-r^2)^(1/2)
(* I couldn't figure out why this was giving the wrong answer -- 0!*)
V=2*Integrate[f[r,t]*r,{t,0,2Pi},{r,r1,r2},Assumptions->0<r1&&r1<r2]
(* and then I learned about "Assumptions".*)
(* since (h/2)^2=r2^2-r1^2, we can rewrite the answer as
*)
(1/6) π h^3

#41, p. 1050:

f[x_,y_,z_]:=x^2+y^2+z^2
M=Integrate[f[x,y,z],{x,0,a},{y,0,a},{z,0,a}]
Integrate[x f[x,y,z],{x,0,a},{y,0,a},{z,0,a}]/M
(* since the problem is entirely symmetric in x,y,z, the coordinates of the center of mass are equal: (((7 a)/12),((7 a)/12),((7 a)/12)). *)

#44, p. 1050:

(* again, there is beautiful symmetry here, so we're wasting time by doing three integrals: *)
Clear[a,b,c,k,M,x,y,z] 
(* k represents the constant density: *)
(* Note that kabc=M *)
M=k a b c
Ix=Integrate[k(y^2+z^2),{x,-a/2,a/2},{y,-b/2,b/2},{z,-c/2,c/2}]
Iy=Integrate[k(x^2+z^2),{x,-a/2,a/2},{y,-b/2,b/2},{z,-c/2,c/2}]
Iz=Integrate[k(x^2+y^2),{x,-a/2,a/2},{y,-b/2,b/2},{z,-c/2,c/2}]
(* so Ix=M/12(b^2+c^2) and so on. *)