Volumes_and_Integral.mws
Calculus with Maple
by Dr. Jack Wagner, Lehman College, City University of New York
<j.wagner@intelligentsearch.com>
copyright 2001
Volumes, Volume Integrals and Change of Variables
Somewhere around the middle of the first year Calculus course we learn how to evaluate integrals by a "change of variables" technique. An integral such as
is transformed by the substitution,
to the integral
, from which we easily find that
. The same idea may be applied to integrals in higher dimensions. We may regard this procedure as a change of coordinates or as a reparametrization, whichever viewpoint is more convenient. Look at the problem of finding the area of a circle from the perspective of surface integrals.
Ex. 1
We seek to evaluate the function
:
, over the plane area of the circle, considered as a surface, with radius a, i.e.
.
> 
restart:with(plots): with(linalg):

Warning, the name changecoords has been redefined
Warning, the protected names norm and trace have been redefined and unprotected
We reparameterize the area in polar coordinates.
> 
S:=[r*cos(theta),r*sin(theta)];

Now we know exactly how to proceed.
> 
J:=jacobian(S,[r,theta]);

> 
Area:=Int(Int(dA,r=0..a),theta=0..2*Pi);

Now we extend this to higher dimensions. Actually, what we were doing in the case of areas was specializing the more general technique to the two dimensional case. By taking the parallelogram as the element of area, we were regarding area as the volume of a flat parallelopiped; or, if you will, the volume of a parallelopiped whose a height is one and whose base is the area of the given parallelogram. Just as the element of area was taken as
dA =
= 
, where
is the Jacobian of the parameterization of the surface, so
dV=

=
where
is the Jacobian of the volume parameterization.
Ex. 2
For the sphere,
, a convenient coordinate change is:
This is expressed in vector form as: [
,
,
]
Warning, the protected names norm and trace have been redefined and unprotected
> 
S:=[r*cos(phi)*cos(theta),r*cos(phi)*sin(theta),r*sin(phi)];

> 
J:=jacobian(S,[r,theta,phi]);

> 
v:=simplify(sqrt(det(innerprod(transpose(J),J))),symbolic);

> 
V:=Int(Int(Int(v,r=0..a),theta=0..2*Pi),phi=Pi/2..Pi/2);

Fortunately, in practice, most of the volumes and surfaces we have to deal with have convenient and symmetrical, parameterizations. In general, the volume of a solid is:
=
, where
f
:
is the reparametrization map.
Looked at in this way, the computation of volume is nothing more than the computation of the reparameterization of the Cartesian coordinate volume element, transformed into new coordinates representing the solid in question, between appropriate limits. Looked at from the opposite perspective, reparameterization distorts volume by an amount equal to the determinant of the Jacobian matrix; that is, by an amount equal to the ratio of the volume of a transformed parallelopiped to an original parallelopiped. Volume, of course, is meant in the most general sense and is intended to include area and arc length as special cases.
Ex. 3
Consider an ellipse in the plane x=5 with its center at (5,0,0), semimajor axis of 4 in the z direction and semiminor axis of 2 in the x direction. Rotate this about the z axis through an ellipse in the xy plane with semimajor axis 10 in the y direction and semiminor axis 5 in the x direction. What is the volume of the resulting solid?
This figure may be parameterized by
, s = 0..1,
= 0..
,
= 0..
It is an elliptical doughnut with an elliptical cross section. Note that we are plotting only the surface, so we leave out the s parameter which provides the volume.
> 
restart: with(plots): with(linalg):

Warning, the name changecoords has been redefined
Warning, the protected names norm and trace have been redefined and unprotected
> 
t:=[(5+2*cos(theta))*cos(phi),(10+2*cos(theta))*sin(phi),4*sin(theta)]:

> 
plot3d(t,theta=0..2*Pi,phi=0..2*Pi,axes=boxed,scaling=constrained,color=blue,style=
wireframe);

Now we calculate. We must include the s parameter since we are now concerned with volume.
> 
T:=[(5+2*s*cos(theta))*cos(phi),(10+2*s*cos(theta))*sin(phi),4*s*sin(theta)];

> 
J:=jacobian(T,[theta,phi,s]);

> 
dV:=sqrt(simplify(det(innerprod(transpose(J),J))),symbolic);

> 
Volume:=int(int(int(dV,theta=0..2*Pi), phi=0..2*Pi), s=0..1);

The functions commonly integrated over volumes are densities or changes in density that vary from point to point in the volume. The result is then the entire quantity or the net change in density of the physical parameter being studied.
Ex. 4
Suppose that a sphere of radius a contains a material whose density obeys an inverse square law relative to the center of the sphere: i.e.
where r is the distance from the center. What is the total quantity of material in the sphere. With the methodology in hand we compute
.
> 
restart: with(plots): with(linalg):

Warning, the name changecoords has been redefined
Warning, the protected names norm and trace have been redefined and unprotected
We will use the geographic parametrization of the sphere.
> 
S:=[r*cos(phi)*cos(theta),r*cos(phi)*sin(theta),r*sin(phi)];

> 
J[v]:=jacobian(S,[r,phi,theta]);

> 
dV:=simplify(sqrt(det(innerprod(transpose(J[v]),J[v]))),symbolic);

> 
Int(Int(Int(rho*dV,phi=Pi/2..Pi/2),theta=0..2*Pi),r=0..a);

If a number of expressions are to be reparameterized it pays to define a simple function to do the job.
Ex. 5
We suppose that we have a measurement of some physical quantity, F, in a cylindrical container of radius a, and height h, that depends on the radial distance from the center of the cylinder and the height above the cylinder's base.
We want to integrate this quantity over the entire cylinder. We take advantage of the symmetries present and locate the base of the cylinder on the z=0 plane and the center of the base at the origin. Then, to avoid the problems of negative trigonometric functions, we work in the first quadrant of the plane.
> 
restart: with(linalg): with(plots):

Warning, the protected names norm and trace have been redefined and unprotected
Warning, the name changecoords has been redefined
We start by defining a function to do the work of reparameterizing into cylindrical coordinates.
> 
f:=g>simplify(subs({x=r*cos(theta),y=r*sin(theta),z=z},g));

Define the elements of the problem.
> 
cyl:=[x,sqrt(r^2x^2),z]:

We have defined only one half of the cylinder. Now we reparameterize the halfcylinder. We need a couple of assume statements so that we don't end up with a bunch of messy csgn symbols.
> 
assume(sin(theta)>0):assume(r>0):

The calculation proceeds as usual.
> 
J:=jacobian(C,[r,theta,z]);

> 
dV:=simplify(sqrt(det(innerprod(transpose(J),J))),symbolic);

The integration is taken over the part of the cylinder lying over the first quadrant.
> 
Int(Int(Int(FdV,theta=0..Pi/2),z=0..h),r=0..a);

It is always a good idea to test new methods against known results. We will find the volume of a solid of revolution.
Ex. 5
Given a curve parameterized by
, find the volume of the solid formed by rotating the curve around the x axis from x=a to x=b.
> 
restart: with(plots): with(linalg):

Warning, the name changecoords has been redefined
Warning, the protected names norm and trace have been redefined and unprotected
> 
V:=[x(t),s*y(t)*cos(theta),s*y(t)*sin(theta)];

> 
J:=jacobian(V,[s,theta,t]);

> 
dV:=simplify(sqrt(det(innerprod(transpose(J),J))),symbolic);

> 
Volume:=Int(Int(Int(dV,s=0..1),t=a..b),theta=0..2*Pi);

A result familiar from the calculus of a single variable.
Practice
1. Find the volume of the solid whose surface is parameterized by:
,
=
,
2. Find the volume of the solid enclosed in the surface;
,
,
3. Find the volume of the elliptic cone:
whose height is 5 units.
4. A cylinder of elliptical cross section, 6x10 units wide and 100 units high contains a gas whose density is
where d is the distance from the base of the cylinder. Find the total mass of the gas in the cylinder.
5. Given a cylinder of radius 2 units and height h, and a material whose concentration is proportional to the square of the distance from the center of the base of the cylinder, find the total amount of the material contained in the cylinder.