222 - Topic 18 - Cylindrical and Spherical Coordinates

1685 days ago by Professor222

John Travis

Mississippi College

Determine $\int_{-3}^0 \int_0^{\sqrt{9-x^2}} \int_3^{3+\sqrt{9-x^2-y^2}} x dz dy dx  $

# Just trying to graph the domain for the integration var('x,y,z,r,t') f = 3+sqrt(9-x^2-y^2) # this is the "top" # f = sqrt(16 - x^2 - y^2) # another option to play around with # Here is Cylindrical Coordinates # Notice, to get z we just take the function above and replace x with r*cost(t) and y with r*sin(t) # This is a horizontal plane of height 0. Adjust if you want to move this around G = parametric_plot3d([r*cos(t),r*sin(t),0], (r,0,3), (t,pi/2,pi),color="pink", opacity=0.3) # This is a horizontal plane of height 3. Adjust if you want to move this around. G += parametric_plot3d([r*cos(t), r*sin(t), 3], (r, 0, 3), (t, pi/2, pi), color='green') # This uses the function f above to general a z-value. G += parametric_plot3d([r*cos(t), r*sin(t), f(x=r*cos(t),y=r*sin(t))], (r, 0, 3), (t, pi/2, pi)) G.show(aspect_ratio=True) 
       
integrate(x^2*sqrt(9-x^2),x,0,3).show()