> # sfb modified from 7 Mar, 2002 > with(plots):with(plottools):with(linalg): > x=r*cos(theta);y=r*sin(theta); > coordplot(polar,color=[red,black],scaling=constrained); > a:=polarplot(1+cos(theta),theta=0..2*Pi,scaling=constrained,color=blue): > b:=plot({x,x/sqrt(3)},x=-0.5..2,color=green): > c:=polarplot({1, 1.2},theta=0..2*Pi,color=green): > display(a,b,c); > # dA = dx dy = r dr dtheta > > time(int(int(1,y=-sqrt(1-x^2)..sqrt(1-x^2)),x=-1..1)); > time(int(int(1*r,r=0..1),theta=0..2*Pi)); > time(int(int(sqrt(1-x^2-y^2),y=-sqrt(1-x^2)..sqrt(1-x^2)),x=-1..1)); > time(int(int(sqrt(1-r^2)*r,r=0..1),theta=0..2*Pi)); > # cylindrical coordinates (r, theta, z) [Polar with z] > x=r*cos(theta);y=r*sin(theta);z=z; > coordplot3d(cylindrical); > coordplot3d(spherical); > a:=sphereplot(2,theta=0..2*Pi,phi=0..Pi/4,scaling=constrained): > b:=cylinderplot(z,theta=0..2*Pi,z=0..sqrt(2)): > display(a,b); > #dV = rho^2 sin (phi) d pho d phi d theta > 'int(int(int(rho^2*sin(phi),rho=0..1),phi=0..Pi),theta=0..2*Pi)'=int(int(int(rho^2*sin(phi),rho=0..1),phi=0..Pi),theta=0..2*Pi); > 'int(int(int(1*r,z=-sqrt(1-r^2)..sqrt(1-r^2)),r=0..1),theta=0..2*Pi)'=int(int(int(1*r,z=-sqrt(1-r^2)..sqrt(1-r^2)),r=0..1),theta=0..2*Pi); > 'int(int(int(1,z=-sqrt(1-x^2-y^2)..sqrt(1-x^2-y^2)),y=-sqrt(1-x^2)..sqrt(1-x^2)),x=-1..1)'=int(int(int(1,z=-sqrt(1-x^2-y^2)..sqrt(1-x^2-y^2)),y=-sqrt(1-x^2)..sqrt(1-x^2)),x=-1..1); > x=rho*sin(phi)*cos(theta);y=rho*sin(phi)*sin(theta);z=rho*cos(phi);r=rho*sin(phi); > restart; >