> with(plots):
> r:=2+cos(theta);
Let us plot the surface of the cylinder under consideration:
>
plot3d([r,theta,z],theta=0..2*Pi,z=0..(2+cos(theta)),
coords='cylindrical',scaling='CONSTRAINED',
axes='FRAMED',labels=['x','y','z'],orientation=[-80,60]);
This is the surface which is integrated over, and is therefore the only surface which we really need to plot. However, just for the sake of curiosity, let's see what the inner cone looks like:
>
plot3d([z,theta,z],theta=0..2*Pi,z=0..(2+cos(theta)),
coords='cylindrical',scaling='CONSTRAINED',
axes='FRAMED',labels=['x','y','z'],orientation=[-80,60]);
Now, let's see what the two surfaces look like when plotted together:
>
plot1:=plot3d([r,theta,z],theta=0..2*Pi,z=0..(2+cos(theta)),
coords='cylindrical',scaling='CONSTRAINED',
axes='FRAMED',labels=['x','y','z'],orientation=[-80,60]):
>
plot2:=plot3d([z,theta,z],theta=0..2*Pi,z=0..(2+cos(theta)),
coords='cylindrical',scaling='CONSTRAINED',
axes='FRAMED',labels=['x','y','z'],orientation=[-80,60]):
> display({plot1,plot2});