Calculus Volume 3

# 4.1Functions of Several Variables

Calculus Volume 34.1 Functions of Several Variables

### Learning Objectives

• 4.1.1. Recognize a function of two variables and identify its domain and range.
• 4.1.2. Sketch a graph of a function of two variables.
• 4.1.3. Sketch several traces or level curves of a function of two variables.
• 4.1.4. Recognize a function of three or more variables and identify its level surfaces.

Our first step is to explain what a function of more than one variable is, starting with functions of two independent variables. This step includes identifying the domain and range of such functions and learning how to graph them. We also examine ways to relate the graphs of functions in three dimensions to graphs of more familiar planar functions.

### Functions of Two Variables

The definition of a function of two variables is very similar to the definition for a function of one variable. The main difference is that, instead of mapping values of one variable to values of another variable, we map ordered pairs of variables to another variable.

### Definition

A function of two variables $z=f(x,y)z=f(x,y)$ maps each ordered pair $(x,y)(x,y)$ in a subset $DD$ of the real plane $ℝ2ℝ2$ to a unique real number $z.z.$ The set $DD$ is called the domain of the function. The range of $ff$ is the set of all real numbers $zz$ that has at least one ordered pair $(x,y)∈D(x,y)∈D$ such that $f(x,y)=zf(x,y)=z$ as shown in the following figure.

Figure 4.2 The domain of a function of two variables consists of ordered pairs $(x,y).(x,y).$

Determining the domain of a function of two variables involves taking into account any domain restrictions that may exist. Let’s take a look.

### Example 4.1

#### Domains and Ranges for Functions of Two Variables

Find the domain and range of each of the following functions:

1. $f(x,y)=3x+5y+2f(x,y)=3x+5y+2$
2. $g(x,y)=9−x2−y2g(x,y)=9−x2−y2$
Checkpoint 4.1

Find the domain and range of the function $f(x,y)=36−9x2−9y2.f(x,y)=36−9x2−9y2.$

### Graphing Functions of Two Variables

Suppose we wish to graph the function $z=(x,y).z=(x,y).$ This function has two independent variables $(xandy)(xandy)$ and one dependent variable $(z).(z).$ When graphing a function $y=f(x)y=f(x)$ of one variable, we use the Cartesian plane. We are able to graph any ordered pair $(x,y)(x,y)$ in the plane, and every point in the plane has an ordered pair $(x,y)(x,y)$ associated with it. With a function of two variables, each ordered pair $(x,y)(x,y)$ in the domain of the function is mapped to a real number $z.z.$ Therefore, the graph of the function $ff$ consists of ordered triples $(x,y,z).(x,y,z).$ The graph of a function $z=(x,y)z=(x,y)$ of two variables is called a surface.

To understand more completely the concept of plotting a set of ordered triples to obtain a surface in three-dimensional space, imagine the $(x,y)(x,y)$ coordinate system laying flat. Then, every point in the domain of the function $ff$ has a unique $z-valuez-value$ associated with it. If $zz$ is positive, then the graphed point is located above the $xy-plane,xy-plane,$ if $zz$ is negative, then the graphed point is located below the $xy-plane.xy-plane.$ The set of all the graphed points becomes the two-dimensional surface that is the graph of the function $f.f.$

### Example 4.2

#### Graphing Functions of Two Variables

Create a graph of each of the following functions:

1. $g(x,y)=9−x2−y2g(x,y)=9−x2−y2$
2. $f(x,y)=x2+y2f(x,y)=x2+y2$

### Example 4.3

#### Nuts and Bolts

A profit function for a hardware manufacturer is given by

$f(x,y)=16−(x−3)2−(y−2)2,f(x,y)=16−(x−3)2−(y−2)2,$

where $xx$ is the number of nuts sold per month (measured in thousands) and $yy$ represents the number of bolts sold per month (measured in thousands). Profit is measured in thousands of dollars. Sketch a graph of this function.

### Level Curves

If hikers walk along rugged trails, they might use a topographical map that shows how steeply the trails change. A topographical map contains curved lines called contour lines. Each contour line corresponds to the points on the map that have equal elevation (Figure 4.7). A level curve of a function of two variables $f(x,y)f(x,y)$ is completely analogous to a contour line on a topographical map.

Figure 4.7 (a) A topographical map of Devil’s Tower, Wyoming. Lines that are close together indicate very steep terrain. (b) A perspective photo of Devil’s Tower shows just how steep its sides are. Notice the top of the tower has the same shape as the center of the topographical map.

### Definition

Given a function $f(x,y)f(x,y)$ and a number $cc$ in the range of $f,af,a$ level curve of a function of two variables for the value $cc$ is defined to be the set of points satisfying the equation $f(x,y)=c.f(x,y)=c.$

Returning to the function $g(x,y)=9−x2−y2,g(x,y)=9−x2−y2,$ we can determine the level curves of this function. The range of $gg$ is the closed interval $[0,3].[0,3].$ First, we choose any number in this closed interval—say, $c=2.c=2.$ The level curve corresponding to $c=2c=2$ is described by the equation

$9−x2−y2=2.9−x2−y2=2.$

To simplify, square both sides of this equation:

$9−x2−y2=4.9−x2−y2=4.$

Now, multiply both sides of the equation by $−1−1$ and add $99$ to each side:

$x2+y2=5.x2+y2=5.$

This equation describes a circle centered at the origin with radius $5.5.$ Using values of $cc$ between $0and30and3$ yields other circles also centered at the origin. If $c=3,c=3,$ then the circle has radius $0,0,$ so it consists solely of the origin. Figure 4.8 is a graph of the level curves of this function corresponding to $c=0,1,2,and3.c=0,1,2,and3.$ Note that in the previous derivation it may be possible that we introduced extra solutions by squaring both sides. This is not the case here because the range of the square root function is nonnegative.

Figure 4.8 Level curves of the function $g(x,y)=9−x2−y2,g(x,y)=9−x2−y2,$ using $c=0,1,2,c=0,1,2,$ and $33$ $(c=3(c=3$ corresponds to the origin).

A graph of the various level curves of a function is called a contour map.

### Example 4.4

#### Making a Contour Map

Given the function $f(x,y)=8+8x−4y−4x2−y2,f(x,y)=8+8x−4y−4x2−y2,$ find the level curve corresponding to $c=0.c=0.$ Then create a contour map for this function. What are the domain and range of $f?f?$

Checkpoint 4.2

Find and graph the level curve of the function $g(x,y)=x2+y2−6x+2yg(x,y)=x2+y2−6x+2y$ corresponding to $c=15.c=15.$

Another useful tool for understanding the graph of a function of two variables is called a vertical trace. Level curves are always graphed in the $xy-plane,xy-plane,$ but as their name implies, vertical traces are graphed in the $xzxz$- or $yz-planes.yz-planes.$

### Definition

Consider a function $z=f(x,y)z=f(x,y)$ with domain $D⊆ℝ2.D⊆ℝ2.$ A vertical trace of the function can be either the set of points that solves the equation $f(a,y)=zf(a,y)=z$ for a given constant $x=ax=a$ or $f(x,b)=zf(x,b)=z$ for a given constant $y=b.y=b.$

### Example 4.5

#### Finding Vertical Traces

Find vertical traces for the function $f(x,y)=sinxcosyf(x,y)=sinxcosy$ corresponding to $x=−π4,0,andπ4,x=−π4,0,andπ4,$ and $y=−π4,0,andπ4.y=−π4,0,andπ4.$

Checkpoint 4.3

Determine the equation of the vertical trace of the function $g(x,y)=−x2−y2+2x+4y−1g(x,y)=−x2−y2+2x+4y−1$ corresponding to $y=3,y=3,$ and describe its graph.

Functions of two variables can produce some striking-looking surfaces. The following figure shows two examples.

Figure 4.12 Examples of surfaces representing functions of two variables: (a) a combination of a power function and a sine function and (b) a combination of trigonometric, exponential, and logarithmic functions.

### Functions of More Than Two Variables

So far, we have examined only functions of two variables. However, it is useful to take a brief look at functions of more than two variables. Two such examples are

$f(x,y,z)=x2−2xy+y2+3yz−z2+4x−2y+3x−6(a polynomial in three variables)f(x,y,z)=x2−2xy+y2+3yz−z2+4x−2y+3x−6(a polynomial in three variables)$

and

$g(x,y,t)=(x2−4xy+y2)sint−(3x+5y)cost.g(x,y,t)=(x2−4xy+y2)sint−(3x+5y)cost.$

In the first function, $(x,y,z)(x,y,z)$ represents a point in space, and the function $ff$ maps each point in space to a fourth quantity, such as temperature or wind speed. In the second function, $(x,y)(x,y)$ can represent a point in the plane, and $tt$ can represent time. The function might map a point in the plane to a third quantity (for example, pressure) at a given time $t.t.$ The method for finding the domain of a function of more than two variables is analogous to the method for functions of one or two variables.

### Example 4.6

#### Domains for Functions of Three Variables

Find the domain of each of the following functions:

1. $f(x,y,z)=3x−4y+2z9−x2−y2−z2f(x,y,z)=3x−4y+2z9−x2−y2−z2$
2. $g(x,y,t)=2t−4x2−y2g(x,y,t)=2t−4x2−y2$
Checkpoint 4.4

Find the domain of the function $h(x,y,t)=(3t−6)y−4x2+4.h(x,y,t)=(3t−6)y−4x2+4.$

Functions of two variables have level curves, which are shown as curves in the $xy-plane.xy-plane.$ However, when the function has three variables, the curves become surfaces, so we can define level surfaces for functions of three variables.

### Definition

Given a function $f(x,y,z)f(x,y,z)$ and a number $cc$ in the range of $f,f,$ a level surface of a function of three variables is defined to be the set of points satisfying the equation $f(x,y,z)=c.f(x,y,z)=c.$

### Example 4.7

#### Finding a Level Surface

Find the level surface for the function $f(x,y,z)=4x2+9y2−z2f(x,y,z)=4x2+9y2−z2$ corresponding to $c=1.c=1.$

Checkpoint 4.5

Find the equation of the level surface of the function

$g(x,y,z)=x2+y2+z2−2x+4y−6zg(x,y,z)=x2+y2+z2−2x+4y−6z$

corresponding to $c=2,c=2,$ and describe the surface, if possible.

### Section 4.1 Exercises

For the following exercises, evaluate each function at the indicated values.

1.

$W(x,y)=4x2+y2.W(x,y)=4x2+y2.$ Find $W(2,−1),W(2,−1),$ $W(−3,6).W(−3,6).$

2.

$W(x,y)=4x2+y2.W(x,y)=4x2+y2.$ Find $W(2+h,3+h).W(2+h,3+h).$

3.

The volume of a right circular cylinder is calculated by a function of two variables, $V(x,y)=πx2y,V(x,y)=πx2y,$ where $xx$ is the radius of the right circular cylinder and $yy$ represents the height of the cylinder. Evaluate $V(2,5)V(2,5)$ and explain what this means.

4.

An oxygen tank is constructed of a right cylinder of height $yy$ and radius $xx$ with two hemispheres of radius $xx$ mounted on the top and bottom of the cylinder. Express the volume of the tank as a function of two variables, $xandy,xandy,$ find $V(10,2),V(10,2),$ and explain what this means.

For the following exercises, find the domain of the function.

5.

$V(x,y)=4x2+y2V(x,y)=4x2+y2$

6.

$f(x,y)=x2+y2−4f(x,y)=x2+y2−4$

7.

$f(x,y)=4ln(y2−x)f(x,y)=4ln(y2−x)$

8.

$g(x,y)=16−4x2−y2g(x,y)=16−4x2−y2$

9.

$z(x,y)=y2−x2z(x,y)=y2−x2$

10.

$f(x,y)=y+2x2f(x,y)=y+2x2$

Find the range of the functions.

11.

$g(x,y)=16−4x2−y2g(x,y)=16−4x2−y2$

12.

$V(x,y)=4x2+y2V(x,y)=4x2+y2$

13.

$z=y2−x2z=y2−x2$

For the following exercises, find the level curves of each function at the indicated value of $cc$ to visualize the given function.

14.

$z(x,y)=y2−x2,z(x,y)=y2−x2,$ $c=1c=1$

15.

$z(x,y)=y2−x2,z(x,y)=y2−x2,$ $c=4c=4$

16.

$g(x,y)=x2+y2;c=4,c=9g(x,y)=x2+y2;c=4,c=9$

17.

$g(x,y)=4−x−y;c=0,4g(x,y)=4−x−y;c=0,4$

18.

$f(x,y)=xy;c=1;c=−1f(x,y)=xy;c=1;c=−1$

19.

$h(x,y)=2x−y;c=0,−2,2h(x,y)=2x−y;c=0,−2,2$

20.

$f(x,y)=x2−y;c=1,2f(x,y)=x2−y;c=1,2$

21.

$g(x,y)=xx+y;c=−1,0,2g(x,y)=xx+y;c=−1,0,2$

22.

$g(x,y)=x3−y;c=−1,0,2g(x,y)=x3−y;c=−1,0,2$

23.

$g(x,y)=exy;c=12,3g(x,y)=exy;c=12,3$

24.

$f(x,y)=x2;c=4,9f(x,y)=x2;c=4,9$

25.

$f(x,y)=xy−x;c=−2,0,2f(x,y)=xy−x;c=−2,0,2$

26.

$h(x,y)=ln(x2+y2);c=−1,0,1h(x,y)=ln(x2+y2);c=−1,0,1$

27.

$g(x,y)=ln(yx2);c=−2,0,2g(x,y)=ln(yx2);c=−2,0,2$

28.

$z=f(x,y)=x2+y2,z=f(x,y)=x2+y2,$ $c=3c=3$

29.

$f(x,y)=y+2x2,f(x,y)=y+2x2,$ $c=c=$ any constant

For the following exercises, find the vertical traces of the functions at the indicated values of $xx$ and y, and plot the traces.

30.

$z=4−x−y;x=2z=4−x−y;x=2$

31.

$f(x,y)=3x+y3,x=1f(x,y)=3x+y3,x=1$

32.

$z=cosx2+y2z=cosx2+y2$ $x=1x=1$

Find the domain of the following functions.

33.

$z=100−4x2−25y2z=100−4x2−25y2$

34.

$z=ln(x−y2)z=ln(x−y2)$

35.

$f(x,y,z)=136−4x2−9y2−z2f(x,y,z)=136−4x2−9y2−z2$

36.

$f(x,y,z)=49−x2−y2−z2f(x,y,z)=49−x2−y2−z2$

37.

$f(x,y,z)=16−x2−y2−z23f(x,y,z)=16−x2−y2−z23$

38.

$f(x,y)=cosx2+y2f(x,y)=cosx2+y2$

For the following exercises, plot a graph of the function.

39.

$z=f(x,y)=x2+y2z=f(x,y)=x2+y2$

40.

$z=x2+y2z=x2+y2$

41.

Use technology to graph $z=x2y.z=x2y.$

Sketch the following by finding the level curves. Verify the graph using technology.

42.

$f(x,y)=4−x2−y2f(x,y)=4−x2−y2$

43.

$f(x,y)=2−x2+y2f(x,y)=2−x2+y2$

44.

$z=1+e−x2−y2z=1+e−x2−y2$

45.

$z=cosx2+y2z=cosx2+y2$

46.

$z=y2−x2z=y2−x2$

47.

Describe the contour lines for several values of $cc$ for $z=x2+y2−2x−2y.z=x2+y2−2x−2y.$

Find the level surface for the functions of three variables and describe it.

48.

$w(x,y,z)=x−2y+z,c=4w(x,y,z)=x−2y+z,c=4$

49.

$w(x,y,z)=x2+y2+z2,c=9w(x,y,z)=x2+y2+z2,c=9$

50.

$w(x,y,z)=x2+y2−z2,c=−4w(x,y,z)=x2+y2−z2,c=−4$

51.

$w(x,y,z)=x2+y2−z2,c=4w(x,y,z)=x2+y2−z2,c=4$

52.

$w(x,y,z)=9x2−4y2+36z2,c=0w(x,y,z)=9x2−4y2+36z2,c=0$

For the following exercises, find an equation of the level curve of $ff$ that contains the point $P.P.$

53.

$f(x,y)=1−4x2−y2,P(0,1)f(x,y)=1−4x2−y2,P(0,1)$

54.

$g(x,y)=y2arctanx,P(1,2)g(x,y)=y2arctanx,P(1,2)$

55.

$g(x,y)=exy(x2+y2),P(1,0)g(x,y)=exy(x2+y2),P(1,0)$

56.

The strength $EE$ of an electric field at point $(x,y,z)(x,y,z)$ resulting from an infinitely long charged wire lying along the $y-axisy-axis$ is given by $E(x,y,z)=k/x2+y2,E(x,y,z)=k/x2+y2,$ where $kk$ is a positive constant. For simplicity, let $k=1k=1$ and find the equations of the level surfaces for $E=10andE=100.E=10andE=100.$

57.

A thin plate made of iron is located in the $xy-plane.xy-plane.$ The temperature $TT$ in degrees Celsius at a point $P(x,y)P(x,y)$ is inversely proportional to the square of its distance from the origin. Express $TT$ as a function of $xandy.xandy.$

58.

Refer to the preceding problem. Using the temperature function found there, determine the proportionality constant if the temperature at point $P(1,2)is50°C.P(1,2)is50°C.$ Use this constant to determine the temperature at point $Q(3,4).Q(3,4).$

59.

Refer to the preceding problem. Find the level curves for $T=40°C andT=100°C,T=40°C andT=100°C,$ and describe what the level curves represent.