Examples, Section 15.7
MAT329, Fall, 2015
Andy Long

#24, p. 1049

f[x_,y_,z_]:=Sqrt[x^2+y^2+z^2]
MidpointEstimate=8.0*(f[1,1,1]+f[1,1,3]+f[1,3,1]+f[3,1,1]+f[1,3,3]+f[3,1,3]+f[3,3,1]+f[3,3,3])
MathematicaEstimate=NIntegrate[f[x,y,z],{x,0,4},{y,0,4},{z,0,4},AccuracyGoal->3]
PercentError=100(MathematicaEstimate-MidpointEstimate)/MathematicaEstimate

#33, p. 1050

RegionPlot3D[z<1-y&&y>Sqrt[x],{x,0,1},{y,0,1},{z,0,1},PlotPoints->50]

x=.5
RegionPlot[z<1-y&&y>Sqrt[x],{y,0,1},{z,0,1},PlotPoints->50]
y=.5
RegionPlot[z<1-y&&x<y^2,{x,0,1},{z,0,1},PlotPoints->50]
z=.5
RegionPlot[x<1-z^2&&Sqrt[x]<y<1-z,{x,0,1},{y,0,1},PlotPoints->50]
Clear[x,y,z]

Int=Integrate[x y^2z^3,{x,0,1},{y,Sqrt[x],1},{z,0,1-y}]
Int=Integrate[x y^2z^3,{x,0,1},{z,0,1-Sqrt[x]},{y,Sqrt[x],1-z}]
Int=Integrate[x y^2z^3,{y,0,1},{x,0,y^2},{z,0,1-y}]
Int=Integrate[x y^2z^3,{y,0,1},{z,0,1-y},{x,0,y^2}]
Int=Integrate[x y^2z^3,{z,0,1},{y,0,1-z},{x,0,y^2}]
Int=Integrate[x y^2z^3,{z,0,1},{x,0,(1-z)^2},{y,Sqrt[x],1-z}]

#49, p. 1050

RegionPlot3D[z<y&&y<Sqrt[1-x^2],{x,0,1},{y,0,1},{z,0,1},PlotPoints->50,AxesLabel->{x,y,z}]

m=Integrate[1+x+y+z,{x,0,1},{y,0,Sqrt[1-x^2]},{z,0,y}]
centroid={
Integrate[x(1+x+y+z),{x,0,1},{y,0,Sqrt[1-x^2]},{z,0,y}],Integrate[y(1+x+y+z),{x,0,1},{y,0,Sqrt[1-x^2]},{z,0,y}],Integrate[z(1+x+y+z),{x,0,1},{y,0,Sqrt[1-x^2]},{z,0,y}]}/m
zMoment=Integrate[(x^2+y^2)(1+x+y+z),{x,0,1},{y,0,Sqrt[1-x^2]},{z,0,y}]

#52, p. 1051

(1-E^(-0.1))
(1-E^(-0.2))
(1-E^(-0.5))
(* a *) 
f[x_,y_,z_]:=Co E^(-0.5x-0.2y-0.1z)
Integrate[f[x,y,z],{x,0,Infinity},{y,0,Infinity},{z,0,Infinity}]
Co=1/100
(* b *) 
f[x_,y_,z_]:=Co E^(-0.5x-0.2y-0.1z)
Integrate[f[x,y,z],{x,0,1},{y,0,1},{z,0,Infinity}]
(* c *) 
f[x_,y_,z_]:=Co E^(-0.5x-0.2y-0.1z)
Integrate[f[x,y,z],{x,0,1},{y,0,1},{z,0,1}]