MapleVolume.mws

Volume

of a region in space

This worksheet investigates the volume of the region of space under the graph of   f(x,y) = 9-x^2-y^2

and above the graph of z = -4 with x between -2.5 and 2.5 and y between -0.5 and 2.5.

Plotting the top and bottom of the region

>    with(plots):surface:=plot3d(9-y^2-x^2,x=-2.5..2.5,y=-0.5..2.5,view=-4..10,axes=boxed,orientation=[100,60]):

Warning, the name changecoords has been redefined

>    plane:=plot3d(-4,x=-2.5..2.5,y=-0.5..2.5,view=-4..10,axes=boxed,orientation=[100,60]):

>    display(surface,plane);

[Maple Plot]

A different orientation

>    surface:=plot3d(9-y^2-x^2,x=-2.5..2.5,y=-0.5..2.5,view=-4..10,axes=boxed,orientation=[-100,70]):

>    plane:=plot3d(-4,x=-2.5..2.5,y=-0.5..2.5,view=-4..10,axes=boxed,orientation=[-100,70]):

>    display(surface,plane);

[Maple Plot]

Below we are using fifteen rectangular boxes to approximate the volume, showing the partition in the plane z = -4 which gives the bottom of each box in blue, and showing one of the boxes in red.  The volume will be approximated by multiplying the area of each blue rectangle by the height of the corresponding box and then summing these products.  The height of each box will be the value of the function f(x,y) at the midpoint of the blue rectangle.  

>   

>    B1:=spacecurve([2.5,-0.5+t,-4,t=0..3],color=blue,thickness=3):

>    B2:=spacecurve([1.5,-0.5+t,-4,t=0..3],color=blue,thickness=3):

>    B3:=spacecurve([0.5,-0.5+t,-4,t=0..3],color=blue,thickness=3):

>    B4:=spacecurve([-0.5,-0.5+t,-4,t=0..3],color=blue,thickness=3):

>    B5:=spacecurve([-1.5,-0.5+t,-4,t=0..3],color=blue,thickness=3):

>    B6:=spacecurve([-2.5,-0.5+t,-4,t=0..3],color=blue,thickness=3):

>    B7:=spacecurve([-2.5+t,-0.5,-4,t=0..5],color=blue,thickness=3):

>    B8:=spacecurve([-2.5+t,0.5,-4,t=0..5],color=blue,thickness=3):

>    B9:=spacecurve([-2.5+t,1.5,-4,t=0..5],color=blue,thickness=3):

>    B10:=spacecurve([-2.5+t,2.5,-4,t=0..5],color=blue,thickness=3):

>    H1:=spacecurve([-1.5+t,0.5,-4,t=0..1],color=red,thickness=4):

>    H2:=spacecurve([-1.5+t,1.5,-4,t=0..1],color=red,thickness=4):

>    H3:=spacecurve([-1.5,0.5+t,-4,t=0..1],color=red,thickness=4):

>    H4:=spacecurve([-0.5,0.5+t,-4,t=0..1],color=red,thickness=4):

>    H1a:=spacecurve([-1.5+t,0.5,7,t=0..1],color=red,thickness=4):

>    H2a:=spacecurve([-1.5+t,1.5,7,t=0..1],color=red,thickness=4):

>    H3a:=spacecurve([-1.5,0.5+t,7,t=0..1],color=red,thickness=4):

>    H4a:=spacecurve([-0.5,0.5+t,7,t=0..1],color=red,thickness=4):

>    H5:=spacecurve([-1.5,0.5,-4+t,t=0..11],color=red,thickness=4):

>    H6:=spacecurve([-1.5,1.5,-4+t,t=0..11],color=red,thickness=4):

>    H7:=spacecurve([-0.5,0.5,-4+t,t=0..11],color=red,thickness=4):

>    H8:=spacecurve([-0.5,1.5,-4+t,t=0..11],color=red,thickness=4):

>    H9:=spacecurve([-1,1,-4+t,t=0..11],color=red,thickness=3):

>    H10:=spacecurve([-2,1,-4+t,t=0..8],color=red,thickness=3):

>    H11:=spacecurve([2,0,-4+t,t=0..9],color=red,thickness=3):

>    H12:=spacecurve([1,0,-4+t,t=0..12],color=red,thickness=3):

>    H13:=spacecurve([0,0,-4+t,t=0..13],color=red,thickness=3):

>    H14:=spacecurve([-1,0,-4+t,t=0..12],color=red,thickness=3):

>    H15:=spacecurve([-2,0,-4+t,t=0..9],color=red,thickness=3):

>    display(B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,H1,H2,H3,H4,H1a,H2a,H3a,H4a,H5,H6,H7,H8,surface,plane);

[Maple Plot]

In this demonstration we are again using fifteen rectangular boxes to approximate the volume, showing the partition in the plane z = -4 which gives the bottom of each box in blue, and showing the height of each box in red.  The volume will be approximated by multiplying the area of each blue rectangle by the length of the corresponding red line segment (the height of the approximating box) and summing these products.

>    B1:=spacecurve([2.5,-0.5+t,-4,t=0..3],color=blue,thickness=3):

>    B2:=spacecurve([1.5,-0.5+t,-4,t=0..3],color=blue,thickness=3):

>    B3:=spacecurve([0.5,-0.5+t,-4,t=0..3],color=blue,thickness=3):

>    B4:=spacecurve([-0.5,-0.5+t,-4,t=0..3],color=blue,thickness=3):

>    B5:=spacecurve([-1.5,-0.5+t,-4,t=0..3],color=blue,thickness=3):

>    B6:=spacecurve([-2.5,-0.5+t,-4,t=0..3],color=blue,thickness=3):

>    B7:=spacecurve([-2.5+t,-0.5,-4,t=0..5],color=blue,thickness=3):

>    B8:=spacecurve([-2.5+t,0.5,-4,t=0..5],color=blue,thickness=3):

>    B9:=spacecurve([-2.5+t,1.5,-4,t=0..5],color=blue,thickness=3):

>    B10:=spacecurve([-2.5+t,2.5,-4,t=0..5],color=blue,thickness=3):

>    H1:=spacecurve([2,2,-4+t,t=0..5],color=red,thickness=3):

>    H2:=spacecurve([1,2,-4+t,t=0..8],color=red,thickness=3):

>    H3:=spacecurve([0,2,-4+t,t=0..9],color=red,thickness=3):

>    H4:=spacecurve([-1,2,-4+t,t=0..8],color=red,thickness=3):

>    H5:=spacecurve([-2,2,-4+t,t=0..5],color=red,thickness=3):

>    H6:=spacecurve([2,1,-4+t,t=0..8],color=red,thickness=3):

>    H7:=spacecurve([1,1,-4+t,t=0..11],color=red,thickness=3):

>    H8:=spacecurve([0,1,-4+t,t=0..12],color=red,thickness=3):

>    H9:=spacecurve([-1,1,-4+t,t=0..11],color=red,thickness=3):

>    H10:=spacecurve([-2,1,-4+t,t=0..8],color=red,thickness=3):

>    H11:=spacecurve([2,0,-4+t,t=0..9],color=red,thickness=3):

>    H12:=spacecurve([1,0,-4+t,t=0..12],color=red,thickness=3):

>    H13:=spacecurve([0,0,-4+t,t=0..13],color=red,thickness=3):

>    H14:=spacecurve([-1,0,-4+t,t=0..12],color=red,thickness=3):

>    H15:=spacecurve([-2,0,-4+t,t=0..9],color=red,thickness=3):

>    display(B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,H1,H2,H3,H4,H5,H6,H7,H8,H9,H10,H11,H12,H13,H14,H15,surface,plane);

[Maple Plot]

Computing the volume of the region using an iterated double integral

>    int(int(13-x^2-y^2,y=-0.5..2.5),x=-2.5..2.5);

137.5000000

Approximating the volume of the surface from 15 approximating rectangular boxes (see picture above)

In this case the area of the base of each approximating box is one.

>    Yvals:=-1:

>    Volume:=0:

>    for i from 1 to 3 do
  Yvals:=Yvals+1;
  Xvals:=-3;
  for j from 1 to 5 do
    Xvals:=Xvals+1;
    Volume:=Volume+13-Xvals^2-Yvals^2;
  end do:
end do:

>    Volume;

140

Approximating the volume of the surface from 60 approximating rectangular boxes

In this case the area of the base of each approximating box is 1/4.

>    Yvals:=-0.75:

>    Volume:=0:

>    for i from 1 to 6 do
  Yvals:=Yvals+0.5;
  Xvals:=-2.75;
  for j from 1 to 10 do
    Xvals:=Xvals+0.5;
    Volume:=Volume+(13-Xvals^2-Yvals^2)/4;
  end do:
end do:

>    Volume;

138.1250000

Approximating the volume of the surface from 240 approximating rectangular boxes

In this case the area of the base of each approximating box is 1/16.

>    Yvals:=-0.625:

>    Volume:=0:

>    for i from 1 to 12 do
  Yvals:=Yvals+0.25;
  Xvals:=-2.625;
  for j from 1 to 20 do
    Xvals:=Xvals+0.25;
    Volume:=Volume+(13-Xvals^2-Yvals^2)/16;
  end do:
end do:

>    Volume;

137.6562442

Approximating the volume of the surface from 960 approximating rectangular boxes

In this case the area of the base of each approximating box is 1/64.

>    Yvals:=-0.5625:

>    Volume:=0:

>    for i from 1 to 24 do
  Yvals:=Yvals+0.125;
  Xvals:=-2.5625;
  for j from 1 to 40 do
    Xvals:=Xvals+0.125;
    Volume:=Volume+(13-Xvals^2-Yvals^2)/64;
  end do:
end do:

>    Volume;

137.5390574