Calculating Volume and Average Value

General - Volume by "Slicing"

Calculating the volume of a box is easy: V = (length)(width)(height). A more useful (for us) way of expressing that relationship is V = (area of base)(height).

A box is an special example of a 3 dimensional object called a cylinder. The most familiar everyday cylinder is a tin can. The volume of a tin can of radius r and height h is [Maple Math] or V = (area of base)(height). Mathematically, a cylinder is any 3-dimensional object bounded by two parallel planes (either one of which can be called the base of the cylinder) and consisting of all the points lying on all the line segments perpendicular to and between the bases. Just like for the box or tin can, the volume of a general cylider is V = (area of base)(height).

To calculate the volume of irregularly shaped objects, the idea is to slice up the object into many small slices, each of which is approximately a cylinder. We calculate the appropximate volume of each slice by the formula V = (area of base)(height) and add them all up to approximate the whole volume. We make the approximation better and better by taking more and more slices (the more slices, the closer each slice is to a true cylinder -- see the "loaf of bread" illustration in the text, page 441). This process should sound familiar; it is essentially the same idea that was behind using rectangles to approximate irregularly shaped areas (i.e. areas between curves ).

So, imagine a 3-dimensional object S lying above the x-axis between x = a and x = b. Starting at x = a we cut up S into slices by slicing with planes perpendicular to the x-axis. Each slice has thickness (or "height") [Maple Math] and has Volume approximately [Maple Math] where A(x) is the cross-sectional area of S at x . The more slices we take, the smaller [Maple Math] is for each slice and the closer each slice is to a true cylinder. It seems natural (nod your heads "of course") to then define the volume to be [Maple Math] = [Maple Math] and that is precisely what we do!

e.g. Find the volume of a ball of i) radius 2 m ii) radius r

Put the ball with its centre at the origin, so the x-axis forms a diameter. At any x [Maple Math] [0,2], a cross section is a circle with radius [Maple Math] and area [Maple Math] = [Maple Math] (and the volume of a "slice" at x is approximately [Maple Math] ). Therefore, the volume is:

i)

> V:=Int(Pi*(4-x^2),x=-2..2);value(%)*`square meters`;evalf(%);

[Maple Math]

[Maple Math]

[Maple Math]

ii) Repeat i) except with r instead of 2 to get the formula for the volume of a sphere of radius r:

> V:=Int(Pi*(r^2-x^2),x=-r..r);value(%)*`square meters`;

>

[Maple Math]

[Maple Math]

Volume by the "disk" and/or "washer method"

Solid of Revolution : S is a solid of revolution if it can be obtained by rotating a plane region about a line. The easiest solids of revolution to visualize are those obtained by rotating the plane region formed by the area under y= f(x) above [a,b] around the x-axis.

For example, rotate the area under [Maple Math] between x = -1 and x = 1 to obtain a ball of radius1unit. So a sphere is really a solid of revolution. The volume of a solid of revolution is in principle easy to calculate since the base of a cross section perpendicular to the axis of revolution is always a circle. So, if the solid is lying with its axis of revolution along the x-axis then the volume of a representative slice at x is approximately V ~ [Maple Math] = [Maple Math] where [Maple Math] is the curve that was rotated about the x-axis to obtain the solid.

So, suppose a solid S is obtained by rotating [Maple Math] about the x-axis between x = a and x = b. The volume of the resulting solid of revolution is then [Maple Math] . There is an analogous result if S is obtained by revolving [Maple Math] about the y-axis between y = c and y = d: [Maple Math] .

If f and g are positive functions satisfying [Maple Math] on [a,b] and the region bounded by these curves is rotated about the x-axis then the resulting solid will have a hole in it and the volume of the hole must be subtracted from the volume obtained by rotating [Maple Math] about the x-axis: [Maple Math] = [Maple Math] = [Maple Math] . An analogous result holds for rotation about the y-axis.

e.g.

Let A be the region bounded by [Maple Math] and x = 1. Calculate the volume of the solid that results when A is revolved about i) the x-axis and ii) the y-axis

i)

> f:=sqrt(x):L:={[1,0],[1,1]}:with(plots):with(CalcP):

> plot1:=plot(f,x=0..1,y=-1..1,colour=black):plot2:=plot(L,colour=black):

> display([plot1,plot2],scaling=constrained);

[Maple Plot]

> revolve(f,x=0..1);LeftDisk(f,x=0..1,10);

[Maple Plot]

[Maple Plot]

You can see from the above that when A is rotated about the x-axis a rounded, solid bowl is obtained (and cross-sections perpendicular to the x-axis will be solid circles). When A is rotated about the y-axis a deeply indented bowl with a round base is obtained (and a cross-section perpendicular to the y-axis will be an annulus (or washer)).

> V1:=Int(Pi*sqrt(x)^2,x=0..1);V1:=value(%)*`cubic units`;

[Maple Math]

[Maple Math]

ii) For the second volume, you must realiz the the outside radius is x = f(y) = 1 and the inside radius is x = [Maple Math] . It follows that the new volume is:

> V2:=Int(Pi*(1-(y^2)^2),y=0..1);value(%)*`cubic units`;

[Maple Math]

[Maple Math]

e.g.

In the following example the plane region is revolved about a line other than an axis. This must be compensated for when specifying the radii.

# 13 p 448. Rotate the region bounded by [Maple Math] and y =1 about the line y = 2 and find the volume of the resulting solid.

> f:=x^4:

> p1:=plot(f,x=-1..1,colour=black):p2:=plot(1,x=-1..1,colour=black):p3:=plot(2,x=-2..2,y=0..4):

> display([p1,p2,p3],scaling=constrained);

[Maple Plot]

=> the solid resulting will be a napkin ring with the volume below: (Remember that the radii are calculated relevant to the line y = 2.)

> V:=Int(Pi*((2-f)^2-(2-1)^2),x=-1..1);value(%)*`cubic units`;

[Maple Math]

[Maple Math]

Volume by the "shell method"

This is impossible to explain in Maple! See blackboard .

e.g. (from text) Revolve the region bounded by [Maple Math] and the x-axis about the y-axis and caculate the volume of the resulting solid.

> f:=2*x^2-x^3;plot(f,x=0..2,y=-0..2,colour=black);

[Maple Math]

[Maple Plot]

Note: in order to use the "washer method" on the solid you would first have to solve [Maple Math] for x. Even if you could do that (it is possible in this example to do that but it would be very difficult and very cumbersome) you would still have to distinguish between the outer and inner radii.

volume using "shells":

> V:=Int(2*Pi*x*f,x=0..2);value(%)*`cubic units`;

[Maple Math]

[Maple Math]

Just in case you want to use the disk/washer method on this one first look at what Maple yields when you try to solve [Maple Math] for x:

> solve(y = 2*x^2-x^3,x);

[Maple Math]
[Maple Math]
[Maple Math]
[Maple Math]

Wow!!!!!!!!!!!!!!

e.g. (#5, pg 454) Find the volume generated by revolving the region bounded by [Maple Math] , y = 0, x = 0, x = 1 about the y-axis.

> C:=exp(1)^(-x^2);

[Maple Math]

> plot({C,[[1,0],[1,exp(1)^(-1)]]},x=0..1.5,y=0..1.1,colour=black,title=region);

[Maple Plot]

> V:=Int(2*Pi*x*exp(1)^(-x^2),x=0..1);

[Maple Math]

> value(V);evalf(%,3);

[Maple Math]

[Maple Math]

e.g.

Consider the region bounded by [Maple Math] and [Maple Math] for x > 0 and calculate the volume generated if the region is revolved about the line y = 2 two diffrent ways.

> plot({x,x^3,2},x=0..1.5,y=0..2.5,colour=black);

[Maple Plot]

> Volume_disks:=Int(Pi*((2-x^3)^2-(2-x)^2),x=0..1);value(%);

[Maple Math]

[Maple Math]

> Volume_shells:=Int(2*Pi*(2-y)*(y^(1/3)-y),y=0..1);value(%);

[Maple Math]

[Maple Math]

The Average Value of a function

The "Hard Way:"

Suppose that the temperature in a city (in degrees Celsius) t hours after 9 A.M. is modelled by [Maple Math] . Find the average temperature in the city for the 12 hour period from 9 A.M. to 9 P.M.

> T:=t->10+8*sin(Pi*t/12);

[Maple Math]

> plot(T(t),t=0..12,colour=black);

[Maple Plot]

We can start by estimating the average temp. by sampling temperatures at regular intervals and taking the aritmetic mean (i.e. the "usual" average) of those readings. We can try sampling more and more readings and see what happens.

Here's the average of the hourly predictions from the model:

> estimate1:=Sum(T(i),i=0..12)/12;evalf(%,5);

[Maple Math]

[Maple Math]

the average of the half-hourly predictions of the model:

> estimate2:=Sum(T(i/2),i=0..24)/24;evalf(%,4);

[Maple Math]

[Maple Math]

the average of the quarter-hourly predictions of the model:

> estimate3:=Sum(T(i/4),i=0..48)/48;evalf(%,4);

[Maple Math]

[Maple Math]

the average of the " minutely " predictions of the model:

> estimate4:=Sum(T(i/60),i=1..720)/720;evalf(%,4);

[Maple Math]

[Maple Math]

Let's see what happens if we take n sample predictions and average them:

> estimate_n:=Sum(T(12*i/n),i=0..n)/n;

[Maple Math]

> value(estimate_n);

[Maple Math]

It seems inevitable that we would define the average temperature to be the limit as n -> infinity:

> Limit(estimate_n,n=infinity);

[Maple Math]

> value(%);evalf(%);

[Maple Math]

[Maple Math]

The "Easy Way":

Definition : If f is a continuous function on [a,b] then average value of f on [a,b] is [Maple Math] [Maple Math] .

e.g. Find the average temperature from above

> 1/12*Int(T(t),t=0..12);value(%);evalf(%);

[Maple Math]

[Maple Math]

[Maple Math]

You are invited to compare the two answers!

>

> libname;

[Maple Math]

> with(CalcP);

[Maple Math]
[Maple Math]
[Maple Math]

>