Parametric Representations of Surfaces 
over Arbitrary Domains

By
A.N. (Tom) Tavouktsoglou
and
Bill Freed

Concordia College
7128 Ada Boulevard
Edmonton, Alberta
CANADA  T5B 4E4

Mathematica in Education
Volume 3 Number 1
Winter 1994
(c) TELOS/Springer-Verlag

Introduction

In the teaching of double integrals, it is useful to graph a function of two variables over a given domain in the    X-Y plane. Mathematica can calculate the double integral over a general 2-D region: 					Integrate[f[x,y], {x,a,b}, {y,g1[x],g2[x]}]. 
However, it usually cannot graph the surface z = f[x,y] just over that region; 						Plot3D[f[x,y], {x,a,b}, {y,g1[x],g2[x]}]
is not allowed (Version 3.0?) unless g1 and g2 are constant functions.

A natural looking parametric representation of a surface can usually be found which allows its graph to be     displayed only over the region of integration. As a further benefit, such a representation allows for a simple,   unified approach to the evaluation of multiple integrals.

Parametric Equations for Rectangular Coordinate Regions

Parametric equations for the region bounded by y = f(x) below, y = g(x) above, over the interval a £ x £ b are
		x = s					a £ s £ b
		y = t g[s] + (1 - t) f[s]	0 £ t £ 1.

Example  Find the volume of the region under the surface z = sin x over the region bounded by y = sin2x,               y = -x/3, and x = p.

x := s
y := t Sin[s]^2 + (1 - t)(-s/3)
domain = ParametricPlot3D[{x,y,0}, {s,0,Pi}, {t,0,1},
	ViewPoint->{0,0,1000}, Axes->{True,True,False}, 
	DisplayFunction->Identity,
	AxesLabel->{FontForm[X,{"Times-Italic",8}], 
	FontForm[Y,{"Times-Italic",8}],""}];
surface = ParametricPlot3D[{{x,y,0},{x,y,Sin[x]}}, {s,0,Pi}, {t,0,1}, 
	ViewPoint->{1,-4,1.2}, 
	AxesLabel->{FontForm[X,{"Times-Italic",8}], 
	            FontForm[Y,{"Times-Italic",8}],""}, 
	DisplayFunction->Identity];
(* j = Det[Outer[D,{x,y},{s,t}]];
volume = NIntegrate[Sin[x] Abs[j], {s,0,Pi}, {t,0,1}];
Print["Volume = ", volume] *)
Show[GraphicsArray[{domain,surface},
	GraphicsSpacing -> 0.25,
	DisplayFunction->$DisplayFunction
]];

Mathematica cannot show the parametrization of the 2D domain directly.  ViewPoint->{0,0,1000},            the view of the domain in the plane z = 0 from above, shows this parametrization. The large z-value 1000        avoids showing the vertical sides of the surrounding box due to perspective.  j, the Jacobian, gives the connection between the area element  dx dy  and the transformed element  ds dt:  dx dy = Abs[j] ds dt  (see, for example, Thomas and Finney, Calculus and Analytic Geometry, Addison-Wesley).

Parametric Equations for Polar Coordinate Regions

Parametric equations for the region bounded by r = f(q) for q1 £ q £ q2 are
		x = s f[t] Cos[t]		t1 £ t £ t2
		y = s f[t] Sin[t]		0 £ s £  1.

Example  Find the volume of the region under of the surface z = q + sin(6q2)/5  inside the cylinder bounded by       r = eq, q = 0, and q = p/3.

Clear[x,y,j,volume]
x := s Exp[t] Cos[t]
y := s Exp[t] Sin[t]
domain = ParametricPlot3D[{x,y,0}, {s,0,1}, {t,0,Pi/3},
	ViewPoint->{0,0,1000}, Axes->{True,True,False},
	AxesLabel->{FontForm[X,{"Times-Italic",8}],
	FontForm[Y,{"Times-Italic",8}],""}, DisplayFunction->Identity];
surface = ParametricPlot3D[{{x,y,0},{x,y,t+Sin[6t^2]/5}}, {s,0,1}, 
	{t,0,Pi/3}, 
	AxesLabel->{FontForm[X,{"Times-Italic",8}],
	            FontForm[Y,{"Times-Italic",8}],""},
	ViewPoint->{2,-1,1.5},
	BoxRatios->{1,1,1}, DisplayFunction->Identity];
(* j = Det[Outer[D,{x,y},{s,t}]];
volume = NIntegrate[t+Sin[6t^2]/5 Abs[j], {s,0,1}, {t,0,Pi/3}];
Print[volume "= volume"] *)
Show[GraphicsArray[{domain,surface}, 
	DisplayFunction->$DisplayFunction,
	GraphicsSpacing -> .2
]];

Parametric Equations for General Parametric Regions

Parametric equations for a radially simple region bounded by x = f(t), y = g(t) for t1 £ t £ t2 are
		x = s f[t]		0 £ s £ 1
		y = s g[t] 		t1 £ t £ t2.

Example  Find the volume of the solid under the sphere z = sqrt(1 - x2 - y2) over the region enclosed by the hypocycloid x = cos3t, y = sin3t.

Clear[x,y,j,volume]
x := s Cos[t]^3
y := s Sin[t]^3

domain = ParametricPlot3D[{x,y,0}, {s,0,1}, {t,0,2Pi},
	ViewPoint -> {0,0,1000}, Axes->{True,True,False}, 
	PlotPoints -> {8,33}, 
	AxesLabel -> {FontForm[X,{"Times-Italic",8}], 
	            FontForm[Y,{"Times-Italic",8}],""}, 
	DisplayFunction -> Identity];

surface = ParametricPlot3D[{{x,y,0},{x,y,Sqrt[1-x^2-y^2]}}, 
            {s,0,1}, {t,0,2Pi},
            PlotPoints -> {8,33}, Boxed->False, ViewPoint->{1,-2,1},
	       AxesLabel -> {FontForm[X,{"Times-Italic",8}], 
	                     FontForm[Y,{"Times-Italic",8}],""}, 
		  DisplayFunction->Identity];

Show[GraphicsArray[{domain,surface},
	DisplayFunction->$DisplayFunction
]];
j = Det[Outer[D,{x,y},{s,t}]]; 
volume = NIntegrate[Sqrt[1-x^2-y^2] Abs[j], {s,0,1}, {t,0,2Pi}];
Print[volume "= volume"]

For a simple variation, try the parameter range {s,1/4,1}.

It is possible to adapt the procedure used for rectangular coordinates to the case where there are both inner and    outer domain boundary curves.

Examples  Below are examples of parametrizations for a region which is barely radially simple, a region which     is not radially simple (choose a convenient point inside the curve as the center of parametrization), and a region enclosed by a curve described by a piecewise defined function.

Clear[x,y]
x := 2 + 3Cos[t]
y := 3 + 5Sin[t]
plot1 = ParametricPlot3D[{s x,s y,0}, {s,0,1}, {t,0,2Pi},
	      ViewPoint -> {0,0,1000}, 
	      Axes -> {True,True,False}, 
	      PlotPoints -> {10,30},
	      DisplayFunction -> Identity,
	      AxesLabel-> {FontForm[X,{"Times-Italic",8}],
	                   FontForm[Y,{"Times-Italic",8}],""}];

Clear[x,y]
x := 2 + (1 - Cos[t])Cos[t]
y := 1 + (1 - Cos[t])Sin[t]
plot2  =  ParametricPlot3D[{2+s((1-Cos[t])Cos[t]), 1+s((1-Cos[t])Sin[t]), 0}, 
	       {s,0,1}, {t,0,2Pi}, 
	       ViewPoint -> {0,0,1000},
	       PlotPoints -> {10,30},
	       Axes -> {True,True,False},
	       DisplayFunction -> Identity,
	       AxesLabel -> {FontForm[X,{"Times-Italic",8}],
	                     FontForm[Y,{"Times-Italic",8}]," "}];

Clear[x,y]
x[t_] := If[t <= 1, t, 2 - t];
y[t_] := If[t < 1, Sqrt[1 - t^2], 3Abs[t - 2] - 3];
plot3 = ParametricPlot3D[{s x[t],s y[t],0}, 
           {s,0,1}, {t,-1,3},
           ViewPoint -> {0,0,1000},
           Axes -> {True,True,False},
           PlotPoints -> {8,33},
           DisplayFunction -> Identity,
           AxesLabel -> {FontForm[X,{"Times-Italic",8}],
                         FontForm[Y,{"Times-Italic",8}],""}];

Show[GraphicsArray[{plot1,plot2,plot3}, 
	GraphicsSpacing -> 0.25,
	DisplayFunction->$DisplayFunction]];

Parametric Equations for Three-Dimensional Domains

Mathematica cannot show the parametrization of a 3D domain directly. Stacking parametrized surfaces is a reasonable substitute.

Example  Find the mass of the region bounded by the surface z = 4 + x + y + sin(2x), the cylinder y = x(x - 4),    and the planes y = 0 and z = 0 if the density is z + 1. Show the 3D region of integration.

Clear[x,y,z,r,t,s,j]
x := r
y := s x(x - 4)
z := t (4 + x + y + Sin[2x])
leaves = Table[ParametricPlot3D[{x, y, z}, 
                  {r, 0, 4.001}, {s, 0, 1}, 
	              DisplayFunction -> Identity,
	              PlotPoints -> {15, 15},
   	              AxesLabel -> {FontForm[X, {"Times-Italic",8}], 
	                            FontForm[Y, {"Times-Italic",8}],
	                            FontForm[Z, {"Times-Italic",8}]},
   	              ViewPoint->{2,-6,4}
   	              ],
   	     {t, 0, 1, .2}];

Show[Flatten[leaves], 
   DisplayFunction -> $DisplayFunction,
   AspectRatio -> 1/GoldenRatio];

density := z + 1
j = Det[Outer[D,{x,y,z},{r,s,t}]];
mass = NIntegrate[density Abs[j], {r,0,4}, {s,0,1}, {t,0,1}];
Print[mass "= mass"]

A change of variable traditionally was used to simplify either the integrand or the region of integration or  preferably both (a small class of problems). Since Integrate or NIntegrate can handle integrands well,      attention now can be focused on simplifying the description of the region of integration.

For the student, Mathematica does the hard parts of multiple integration: drawing the surfaces, finding the    Jacobian, and calculating the integral. The student's job, the thinking part, is to verify that the parametrization describes correctly the region of integration. A fringe benefit is that the region of integration now always has constant limits and so setting up the integral is quite routine; the order of integration is unimportant.

With Mathematica, parametric representation has become a feasible way of describing surfaces and perhaps   should become a part of basic calculus. The method described, along with coordinates appropriate to entire   surfaces such as the sphere or the exotic Klein bottle, provides good motivation to the student for the usefulness     of the parametric representation of surfaces.