Variables; Graphing Surfaces
2.2 Limits 2.3 The Derivative
2.4 Properties; Higher-order Partial Derivatives
2.5 The Chain Rule
2.6 Directional Derivatives and the Gradient
2.7 Newton’s Method (optional) True/False Exercises for Chapter 2
Miscellaneous Exercises for Chapter 2
2.1
Functions of Several Variables;
Graphing Surfaces
The volume and surface area of a sphere depend on its radius, the formulas describing their relationships being V = 43πr3 and S=4πr2. (Here V and S are, respectively, the volume and surface area of the sphere andr its radius.) These equations define the volume and surface area asfunctionsof the radius.
The essential characteristic of a function is that the so-called independent variable (in this case the radius) determines auniquevalue of the dependent variable (V orS). No doubt you can think of many quantities that are determined uniquely not by one variable (as the volume of a sphere is determined by its radius) but by several: the area of a rectangle, the volume of a cylinder or cone, the average annual rainfall in Cleveland, or the national debt. Realistic modeling of the world requires that we understand the concept of a function of more than one variable and how to find meaningful ways to visualize such functions.
Definitions, Notation, and Examples
A function,anyfunction, has three features: (1) adomainset X, (2) acodomain set Y, and (3) a rule of assignment that associates to each element x in the domain Xa unique element, usually denoted f(x), in the codomainY. We will frequently use the notation f:X →Yfor a function. Such notation indicates all the ingredients of a particular function, although it does not make the nature of the rule of assignment explicit. This notation also suggests the “mapping” nature of a function, indicated by Figure 2.1.
f
x f(x)
X Y
Figure 2.1 The mapping nature of a function.
EXAMPLE 1 Abstract definitions are necessary, but it is just as important that you understand functions as they actually occur. Consider the act of assigning to each U.S. citizen his or her social security number. This pairing defines a function:
Each citizen is assigned one social security number. The domain is the set of U.S.
citizens and the codomain is the set of all nine-digit strings of numbers.
On the other hand, when a university assigns students to dormitory rooms, it is unlikely that it is creating a function from the set of available rooms to the set of students. This is because some rooms may have more than one student assigned to them, so that a particular room does not necessarily determine a unique student
occupant. ◆
DEFINITION 1.1 The rangeof a function f:X→Y is the set of those elements ofYthat are actual values of f. That is, the range of f consists of thoseyinY such thaty= f(x) for somexinX.
Using set notation, we find that
Range f = {y∈Y | y= f(x) for somex ∈ X}.
In the social security function of Example 1, the range consists of those nine- digit numbers actually used as social security numbers. For example, the number 000-00-0000 isnotin the range, since no one is actually assigned this number.
DEFINITION 1.2 A function f:X→Y is said to beonto(orsurjective) if every element ofY is the image of some element of X, that is, if range
f =Y.
X Y
f
Figure 2.2 Everyy∈Y is “hit”
by at least onex ∈X.
X Y
f
b
Figure 2.3 The elementb∈Y is not the image of anyx ∈X.
The social security function isnotonto, since 000-00-0000 is in the codomain but not in the range. Pictorially, an onto function is suggested by Figure 2.2. A function that isnotonto looks instead like Figure 2.3. You may find it helpful to think of the codomain of a function f as the set ofpossible(or allowable) values of f, and the range of f as the set ofactualvalues attained. Then an onto function is one whose possible and actual values are the same.
DEFINITION 1.3 A function f:X →Yis calledone-one(orinjective) if no two distinct elements of the domain have the same image under f. That is, f is one-one if wheneverx1,x2 ∈X andx1 =x2, then f(x1)= f(x2).
(See Figure 2.4.)
one-one not one-one
Figure 2.4 The figure on the left depicts a one-one mapping; the one on the right shows a function that is not one-one.
One would expect the social security function to be one-one, but we have heard of cases of two people being assigned the same number so that, alas, apparently it is not.
When you studied single-variable calculus, the functions of interest were those whose domains and codomains were subsets ofR (the real numbers). It was probably the case that only the rule of assignment was made explicit; it is generally assumed that the domain is the largest possible subset ofRfor which the function makes sense. The codomain is generally taken to be all ofR.
EXAMPLE 2 Suppose f:R→Ris given by f(x)=x2. Then the domain and codomain are, explicitly, all ofR, but the range of f is the interval [0,∞). Thus f is not onto, since the codomain is strictly larger than the range. Note that f is not one-one, since f(2)= f(−2)=4, but 2= −2. ◆ EXAMPLE 3 Suppose g is a function such that g(x)=√
x−1. Then if we take the codomain to be all ofR, the domain cannot be any larger than [1,∞).
If the domain included any values less than one, the radicand would be negative
and, hence,gwould not be real-valued. ◆
Now we’re ready to think about functions of more than one real variable. In the most general terms, these are the functions whose domains are subsetsX of Rn and whose codomains are subsets ofRm, for some positive integersnandm.
(For simplicity of notation, we’ll take the codomains to be all ofRm, except when specified otherwise.) That is, such a function is a mappingf:X ⊆Rn →Rmthat associates to a vector (or point)xinXa unique vector (point)f(x) inRm. EXAMPLE 4 Let T:R3→R be defined by T(x,y,z)=x y+x z+yz. We can think ofT as a sort of “temperature function.” Given a pointx=(x,y,z) in R3,T(x) calculates the temperature at that point. ◆ EXAMPLE 5 LetL:Rn →Rbe given byL(x)= x. This is a “length func- tion” in that it computes the length of any vectorxin Rn. Note that L is not one-one, sinceL(ei)=L(ej)=1, whereei andej are any two of the standard basis vectors forRn.Lalso fails to be onto, since the length of a vector is always
nonnegative. ◆
EXAMPLE 6 Consider the function given byN(x)=x/xwherexis a vector inR3. Note thatNis not defined ifx=0, so the largest possible domain forNis R3− {0}. The range ofNconsists of all unit vectors inR3. The functionNis the
“normalization function,” that is, the function that takes a nonzero vector inR3 and returns the unit vector that points in the same direction. ◆ EXAMPLE 7 Sometimes a function may be given numerically by a table.
One such example is the notion of windchill—the apparent temperature one feels when taking into account both the actual air temperature and the speed of the wind. A standard table of windchill values is shown in Figure 2.5.1 From it we see that if the air temperature is 20◦F and the windspeed is 25 mph, the wind- chill temperature (“how cold it feels”) is 3◦F. Similarly, if the air temperature is 35◦F and the windspeed is 10 mph, then the windchill is 27◦F. In other words, ifs denotes windspeed and t air temperature, then the windchill is a function
W(s,t). ◆
The functions described in Examples 4, 5, and 7 arescalar-valuedfunctions, that is, functions whose codomains areRor subsets ofR. Scalar-valued functions are our main concern for this chapter. Nonetheless, let’s look at a few examples of functions whose codomains areRmwherem >1.
1 NOAA, National Weather Service, Office of Climate, Water, and Weather Services, “NWS Wind Chill Temperature Index.” February 26, 2004.<http://www.nws.noaa.gov/om/windchill>(July 31, 2010).
Windspeed (mph) Air Temp
(deg F) 5 10 15 20 25 30 35 40 45 50 55 60
40 35 30 25 20 15 10 5 0
−5
−10−15
−20−25
−30−35
−40
−45
36 31 25 19 13 7 1
−11−5
−16
−22−28
−34−40
−46−52
−57
−63 34 27 21 15 9
−43
−10−16
−22
−28−35
−41−47
−53−59
−66
−72 32 25 19 13 6
−70
−13−19
−26
−32−39
−45−51
−58−64
−71
−77 30 24 17 11 4
−2−9
−15−22
−29
−35−42
−48−55
−61−68
−74
−81 29 23 16 9 3
−11−4
−17−24
−31
−37−44
−51−58
−64−71
−78
−84 28 22 15 8 1
−12−5
−19−26
−33
−39−46
−53−60
−67−73
−80
−87 28 21 14 7 0
−14−7
−21−27
−34
−41−48
−55−62
−69−76
−82
−89 27 20 13 6
−1
−15−8
−22−29
−36
−43−50
−57−64
−71−78
−84
−91 26 19 12 5
−2
−16−9
−23−30
−37
−44−51
−58−65
−72−79
−86
−93 26 19 12 4
−3
−10−17
−24−31
−38
−45−52
−60−67
−74−81
−88
−95 25 18 11 4
−3
−11−18
−25−32
−39
−46−54
−61−68
−75−82
−89
−97 25 17 10 3
−4
−11−19
−26−33
−40
−48−55
−62−69
−76−84
−91
−98 Figure 2.5 Table of windchill values in English units.
EXAMPLE 8 Definef:R→R3byf(t)=(cost,sint,t). The range of f is the curve inR3with parametric equationsx =cost,y =sint,z=t. If we think of t as a time parameter, then this function traces out the corkscrew curve (called a
helix) shown in Figure 2.6. ◆
y
x
z
Figure 2.6 The helix of Example 8. The arrow shows the direction of increasingt.
v
Figure 2.7 A water pitcher. The velocityvof the water is a function from a subset ofR4toR3.
EXAMPLE 9 We can think of the velocity of a fluid as a vector inR3. This vector depends on (at least) the point at which one measures the velocity and also the time at which one makes the measurement. In other words, velocity may be considered to be a functionv:X⊆R4 →R3. The domain X is a subset ofR4 because three variablesx,y,zare required to describe a point in the fluid and a fourth variablet is needed to keep track of time. (See Figure 2.7.) For instance, such a functionvmight be given by the expression
v(x,y,z,t)=x yzti+(x2−y2)j+(3z+t)k. ◆ You may have noted that the expression forvin Example 9 is considerably more complicated than those for the functions given in Examples 4–8. This is because all the variables and vector components have been written out explicitly.
In general, if we have a functionf:X ⊆Rn →Rm, thenx∈Xcan be written as x=(x1,x2, . . . ,xn) andfcan be written in terms of itscomponent functions f1, f2, . . . , fm. The component functions arescalar-valuedfunctions ofx∈ X that define the components of the vectorf(x)∈Rm. What results is a morass of symbols:
f(x)=f(x1,x2, . . . ,xn) (emphasizing the variables)
=(f1(x), f2(x), . . . ,fm(x)) (emphasizing the component functions)
=(f1(x1,x2, . . . ,xn), f2(x1,x2, . . . ,xn), . . . , fm(x1,x2, . . . ,xn)) (writing out all components).
For example, the functionLof Example 5, when expanded, becomes L(x)=L(x1,x2, . . . ,xn)=
x12+x22+ · · · +xn2. The functionNof Example 6 becomes
N(x)= x
x = (x1,x2,x3)
x21+x22+x32
=
⎛
⎝ x1
x12+x22+x23
, x2
x12+x22+x32
, x3
x12+x22+x32
⎞
⎠,
and, hence, the three component functions ofNare N1(x1,x2,x3) = x1
x12+x22+x23
, N2(x1,x2,x3)= x2
x12+x22+x32 ,
N3(x1,x2,x3)= x3
x12+x22+x32 .
Although writing a function in terms of all its variables and components has the advantage of being explicit, quite a lot of paper and ink are used in the process.
The use of vector notation not only saves space and trees but also helps to make the meaning of a function clear by emphasizing that a function maps points in Rn to points inRm. Vector notation makes a function of 300 variables look “just like” a function of one variable. Try to avoid writing out components as much as you can (except when you want to impress your friends).
Visualizing Functions
No doubt you have been graphing scalar-valued functions of one variable for so long that you give the matter little thought. Let’s scrutinize what you’ve been do- ing, however. A function f:X⊆R→Rtakes a real number and returns another real number as suggested by Figure 2.8. Thegraphof f is something that “lives”
inR2. (See Figure 2.9.) It consists of points (x,y) such that y= f(x). That is, Graph f = {(x, f(x))|x ∈ X} = {(x,y)|x ∈X,y = f(x)}.
The important fact is that, in general, the graph of a scalar-valued function of a single variable is a curve—a one-dimensional object—sitting inside two- dimensional space.
f(x) x
R R
X
f
Figure 2.8 A function f:X⊆R→R.
y
f(x) (x, f(x))
x x
Figure 2.9 The graph of f.
Now suppose we have a function f:X ⊆R2→R, that is, a function of two variables. We make essentially the same definition for the graph:
Graph f = {(x, f(x))|x∈ X}. (1)
Of course,x=(x,y) is a point ofR2. Thus,{(x, f(x))}may also be written as {(x,y, f(x,y))}, or as {(x,y,z)|(x,y)∈ X,z= f(x,y)}. Hence, the graph of a scalar-valued function of two variables is something that sits inR3. Generally speaking, the graph will be a surface.
EXAMPLE 10 The graph of the function f:R2 →R, f(x,y)= 1
12y3−y−1 4x2+7
2
is shown in Figure 2.10. For each pointx=(x,y) inR2, the point inR3 with coordinates
x,y,121 y3−y−14x2+ 72
is graphed. ◆
x
z
(x, y)
(x, y, f(x, y))
y R2 (the xy-plane) Figure 2.10 The graph of f(x,y)= 121y3−y−14x2+72.
Graphing functions of two variables is a much more difficult task than graph- ing functions of one variable. Of course, one method is to let a computer do the work. Nonetheless, if you want to get a feeling for functions of more than one variable, being able to sketch a rough graph by hand is still a valuable skill.
The trick to putting together a reasonable graph is to find a way to cut down on the dimensions involved. One way this can be achieved is by drawing certain special curves that lie on the surface z= f(x,y). These special curves, called contour curves,are the ones obtained by intersecting the surface with horizontal planes z=c for various values of the constantc. Some contour curves drawn on the surface of Example 10 are shown in Figure 2.11. If we compress all the contour curves onto the x y-plane (in essence, if we look down along the posi- tivez-axis), then we create a “topographic map” of the surface that is shown in Figure 2.12. These curves in thex y-plane are called thelevel curvesof the original function f.
The point of the preceding discussion is that we can reverse the process in order to sketch systematically the graph of a function f of two variables: We
y
x
z
Figure 2.11 Some contour curves of the function in Example 10.
y
x
Figure 2.12 Some level curves of the function in Example 10.
first construct a topographic map inR2 by finding the level curves of f, then situate these curves inR3as contour curves at the appropriate heights, and finally complete the graph of the function. Before we give an example, let’s restate our terminology with greater precision.
DEFINITION 1.4 Let f:X⊆R2 →Rbe a scalar-valued function of two variables. Thelevel curve at heightcof f is the curve inR2defined by the equation f(x,y)=c, wherecis a constant. In mathematical notation,
Level curve at heightc= (x,y)∈R2 | f(x,y)=c .
Thecontour curve at heightcof f is the curve inR3 defined by the two equationsz = f(x,y) andz=c. Symbolized,
Contour curve at heightc= (x,y,z)∈R3| z= f(x,y)=c .
In addition to level and contour curves, consideration of thesections of a surface by the planes wherexoryis held constant is also helpful. Asectionof a surface by a plane is just the intersection of the surface with that plane. Formally, we have the following definition:
DEFINITION 1.5 Let f:X⊆R2 →Rbe a scalar-valued function of two variables. The section of the graph of f by the plane x=c (where c is a constant) is the set of points (x,y,z), where z= f(x,y) and x =c.
Symbolized,
Section byx =cis (x,y,z)∈R3 |z= f(x,y),x =c .
Similarly, thesection of the graph of f by the plane y =c is the set of points described as follows:
Section byy=cis (x,y,z)∈R3 |z= f(x,y),y=c .
EXAMPLE 11 We’ll use level and contour curves to construct the graph of the function
f:R2 →R, f(x,y)=4−x2−y2. By Definition 1.4, the level curve at heightcis
(x,y)∈R2|4−x2−y2 =c
= (x,y)|x2+y2 =4−c .
Thus, we see that the level curves forc<4 are circles centered at the origin of radius√
4−c. The level “curve” at heightc=4 is not a curve at all but just a single point (the origin). Finally, there are no level curves at heights larger than 4 since the equationx2+y2 =4−chas no real solutions inxandy. (Why not?) These remarks are summarized in the following table:
c Level curvex2+y2=4−c
−5 x2+y2=9
−1 x2+y2=5
0 x2+y2=4
1 x2+y2=3
3 x2+y2=1
4 x2+y2=0 ⇐⇒ x =y=0
c, wherec>4 empty
Thus, the family of level curves, the “topographic map” of the surface z = 4−x2−y2, is shown in Figure 2.13. Some contour curves, which sit in R3, are shown in Figure 2.14, where we can get a feeling for the complete graph of z=4−x2−y2. It is a surface that looks like an inverted dish and is called a paraboloid. (See Figure 2.15.) To make the picture clearer, we have also sketched in the sections of the surface by the planesx =0 andy=0. The section byx=0 is given analytically by the set
(x,y,z)∈R3|z =4−x2−y2,x=0
= (0,y,z)|z=4−y2 . Similarly, the section byy=0 is
(x,y,z)∈R3|z =4−x2−y2,y=0
= (x,0,z)|z=4−x2 .
c = − 1 c = −
5 c = 3
c = 1
c = 4 x
y
c = 0
Figure 2.13 The topographic map ofz=4−x2−y2(i.e., several of its level curves).
c =− 5 c = − 1 c = 0 c = 1 c = 3 c = 4
x
y z
Figure 2.14 Some contour curves ofz=4−x2−y2.
y
x
z
Figure 2.15 The graph of f(x,y)=4−x2−y2.
Since these sections are parabolas, it is easy to see how this surface obtained its
name. ◆
EXAMPLE 12 We’ll graph the functiong:R2 →R,g(x,y)=y2−x2. The level curves are all hyperbolas, with the exception of the level curve at height 0, which is a pair of intersecting lines.
c Level curvey2−x2=c
−4 x2−y2=4
−1 x2−y2=1
0 y2−x2=0 ⇐⇒ (y−x)(y+x)=0 ⇐⇒ y= ±x
1 y2−x2=1
4 y2−x2=4
c = 0
x y
c = −4 c = −1 c = 1 c = 4
Figure 2.16 Some level curves ofg(x,y)=y2−x2.
y x
z
Figure 2.17 The contour curves and graph ofg(x,y)=y2−x2.
The collection of level curves is graphed in Figure 2.16. The sections byx =c are
{(x,y,z)|z =y2−x2,x=c} = {(c,y,z)|z=y2−c2}.
These are clearly parabolas in the planesx =c. The sections byy=care {(x,y,z)|z= y2−x2,y=c} = {(c,y,z)|z=c2−x2},
which are again parabolas. The level curves and sections generate the contour curves and surface depicted in Figure 2.17. Perhaps understandably, this surface
is called ahyperbolic paraboloid. ◆
EXAMPLE 13 We compare the graphs of the function f(x,y)=4−x2−y2 of Example 11 with that of
h:R2− {(0,0)} →R, h(x,y)=ln (x2+y2). The level curve ofhat heightcis
(x,y)∈R2 |ln (x2+y2)=c
= (x,y)| x2+y2 =ec .
Sinceec>0 for allc∈R, we see that the level curve exists for anycand is a circle of radius√
ec =ec/2.
c Level curvex2+y2=ec
−5 x2+y2=e−5
−1 x2+y2=e−1 0 x2+y2=1 1 x2+y2=e 3 x2+y2=e3 4 x2+y2=e4
The collection of level curves is shown in Figure 2.18 and the graph in Figure 2.19.
Note that the section of the graph byx =0 is (x,y,z)∈R3 |z=ln (x2+y2),x=0
= (0,y,z)|z=ln (y2)=2 ln|y| .
–2 2 4 x 2
4 y
c = 3
c = 1 c = 0 c = –1
–2
– 4 – 4
c =–5
Figure 2.18 The collection of level curves ofz=ln (x2+y2).
z
y x
Figure 2.19 The graph of z=ln (x2+y2), shown with sections byx=0 andy=0.
The section byy=0 is entirely similar:
(x,y,z)∈R3 |z=ln (x2+y2),y=0
= (x,0,z)|z=ln (x2)=2 ln|x| .
◆ In fact, if we switch from Cartesian to cylindrical coordinates, it is quite easy to understand the surfaces in both Examples 11 and 13. In view of the Cartesian/cylindrical relation x2+y2=r2, we see that for the function f of Example 11,
z=4−x2−y2 =4−(x2+y2)=4−r2. For the functionhof Example 13, we have
z =ln (x2+y2)=ln (r2)=2 lnr,
where we assume the usual convention that the cylindrical coordinater is non- negative. Thus both of the graphs in Figures 2.15 and 2.19 are of surfaces of revolution obtained by revolving different curves about thez-axis. As a result, the level curves are, in general, circular.
The preceding discussion has been devoted entirely to graphing scalar-valued functions of just two variables. However, all the ideas can be extended to more variables and higher dimensions. If f:X ⊆Rn →Ris a (scalar-valued) function ofnvariables, then thegraphof f is the subset ofRn+1 given by
Graph f = {(x, f(x))|x∈ X}
= {(x1, . . . ,xn,xn+1)|(x1, . . . ,xn)∈ X, (2) xn+1 = f(x1, . . . ,xn)}.
(The compactness of vector notation makes the definition of the graph of a function ofnvariablesexactlythe same as in (1).) Thelevel set at heightcof such a function is defined by
Level set at heightc= {x∈Rn | f(x)=c}
= {(x1,x2, . . . ,xn)| f(x1,x2, . . . ,xn)=c}.
While the graph of f is a subset ofRn+1, a level set of f is a subset ofRn. This makes it possible to get some geometric insight into graphs of functions ofthree variables, even though we cannot actually visualize them.
y
x
z
c = 0 c > 0
c < 0
Figure 2.20 The level sets of the functionF(x,y,z)=x+y+z are planes inR3.
EXAMPLE 14 LetF:R3 →Rbe given by F(x,y,z)=x+y+z. Then the graph of F is the set {(x,y,z, w)|w=x+y+z} and is a subset (called a hypersurface) ofR4, which we cannot depict adequately. Nonetheless, we can look at the level sets ofF, which are surfaces inR3. (See Figure 2.20.) We have
Level set at heightc= {(x,y,z)|x+y+z=c}.
Thus, the level sets form a family of parallel planes with normal vectori+j+k.
◆
Surfaces in General
Not all curves inR2 can be described as the graph of a single function of one variable. Perhaps the most familiar example is the unit circle shown in Figure 2.21.
Its graphcannotbe determined by a single equation of the formy= f(x) (or, for that matter, by one of the formx=g(y)). As we know, the graph of the circle may be described analytically by the equationx2+y2 =1. In general, a curve inR2 is determined by an arbitrary equation inxandy, not necessarily one that isolates yalone on one side. In other words, this means that a general curve is given by an equation of the formF(x,y)=c(i.e., a level set of a function oftwovariables).
The analogous situation occurs with surfaces inR3. Frequently a surface is determined by an equation of the form F(x,y,z)=c (i.e., as a level set of a function of three variables),notnecessarily one of the formz= f(x,y).
(1, 0) x y
Figure 2.21 The unit circle x2+y2=1.
EXAMPLE 15 Asphereis a surface inR3whose points are all equidistant from a fixed point. If this fixed point is the origin, then the equation for the sphere is
x−0 = x =a, (3) wherea is a positive constant andx=(x,y,z) is a point on the sphere. If we square both sides of equation (3) and expand the (implicit) dot product, then we obtain perhaps the familiar equation of a sphere of radiusacentered at the origin:
x2+y2+z2=a2. (4)
If the center of the sphere is at the pointx0=(x0,y0,z0), rather than the origin, then equation (3) should be modified to
x−x0 =a. (5) (See Figure 2.22.)
x y z
x − x0
Figure 2.22 The sphere of radius a, centered at (x0,y0,z0).
When equation (5) is expanded, the following general equation for a sphere is obtained:
(x−x0)2+(y−y0)2+(z−z0)2=a2 (6)