Calculus IV with Maple
Copyright 2002, Dr. Jack Wagner
j.wagner@intelligentsearch.com
Lesson 11: 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.
Example 11.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(LinearAlgebra): with(VectorCalculus): |
| > | A := Int(Int(1, x), y); |
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]); |
| > | dA := simplify(Determinant(J)); |
| > | Area := Int(Int(dA, r=0..a), theta=0..2*Pi); |
| > | value(Area); |
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.
Example 11.2
For the sphere,
, a convenient coordinate change is:
This is expressed in vector form as: [
,
,
]
| > | restart: with(LinearAlgebra): with(VectorCalculus): |
| > | S := <r*cos(phi)*cos(theta), r*cos(phi)*sin(theta), r*sin(phi)>; |
| > | J := Jacobian(S, [r, theta, phi]); |
| > | v := simplify(sqrt(Determinant(Transpose(J).J)), symbolic); |
| > | V := Int(Int(Int(v, r=0..a), theta=0..2*Pi), phi=-Pi/2..Pi/2); |
| > | value(V); |
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 a factor equal to the determinant of the Jacobian matrix; that is, by a factor equal to the ratio of the volume of a transformed parallelepiped to an original parallelepiped. Volume, of course, is meant in the most general sense and is intended to include area and arc length as special cases.
Example 11.3
Consider an ellipse in the plane x=5 with its center at (5, 0, 0), semi-major axis of 4 in the z direction and semi-minor axis of 2 in the x direction. Rotate this about the z axis through an ellipse in the x-y plane with semi-major axis 10 in the y direction and semi-minor 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(LinearAlgebra):with(VectorCalculus): |
| > | 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=normal, 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(Determinant(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.
Example 11.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(LinearAlgebra): with(VectorCalculus): |
We will use the geographic parametrization of the sphere.
| > | S := <r*cos(phi)*cos(theta), r*cos(phi)*sin(theta), r*sin(phi)>; |
| > | rho := K/r^2: |
| > | J[v] := Jacobian(S, [r, phi, theta]); |
| > | dV := simplify(sqrt(Determinant(Transpose(J[v]).J[v])), symbolic); |
| > | Int(Int(Int(rho*dV, phi=-Pi/2..Pi/2), theta=0..2*Pi), r=0..a); |
| > | value(%); |
If a number of expressions are to be reparameterized it pays to define a simple function to do the job.
Example 11.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(plots):with(LinearAlgebra): with(VectorCalculus): |
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.
| > | F := r/(z+1); |
| > | cyl := <x, sqrt(r^2-x^2), z>; |
We have defined only one half of the cylinder. Now we reparameterize the half-cylinder. We need a couple of assume statements so that Maple doesn't print a bunch of messy csgn symbols.
| > | interface(showassumed=0): |
| > | assume(sin(theta)>0):assume(r>0): |
| > | C := f(cyl); |
The calculation proceeds as usual.
| > | J := Jacobian(C, [r, theta, z]); |
| > | dV := simplify(sqrt(Determinant(Transpose(J).J)), symbolic); |
| > | FdV := F*dV; |
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); |
| > | 4*value(%); |
It is always a good idea to test new methods against known results. We will find the volume of a solid of revolution.
Example 11.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(LinearAlgebra): with(VectorCalculus): |
Transformation to cylindrical coordinates about the x-axis
| > | V := <x(t), s*y(t)*cos(theta), s*y(t)*sin(theta)>; |
| > | J := Jacobian(V, [s, theta, t]); |
| > | dV := simplify(sqrt(Determinant(Transpose(J).J)), symbolic); |
| > | Volume := Int(Int(Int(dV, s=0..1), t=a..b), theta=0..2*Pi); |
| > | simplify(value(%)); |
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.