Skip to ContentGo to accessibility pageKeyboard shortcuts menu
OpenStax Logo
Calculus Volume 3

4.1 Functions 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 22 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.

A bulbous shape is marked domain and it contains the point (x, y). From this point, there is an arrow marked f that points to a point z on a straight line marked range.
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)=9x2y2g(x,y)=9x2y2

Checkpoint 4.1

Find the domain and range of the function f(x,y)=369x29y2.f(x,y)=369x29y2.

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)=9x2y2g(x,y)=9x2y2
  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(x3)2(y2)2,f(x,y)=16(x3)2(y2)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.

This figure consists of two figures marked a and b. Figure a shows a topographic map of Devil’s Tower, which has its lines very close together to indicate the very steep terrain. Figure b shows a picture of Devil’s Tower, which has very steep sides.
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)=9x2y2,g(x,y)=9x2y2, 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

9x2y2=2.9x2y2=2.

To simplify, square both sides of this equation:

9x2y2=4.9x2y2=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.

Three concentric circles with center at the origin. The largest circle marked c = 0 has a radius of 3. The medium circle marked c = 1 has a radius slightly less than 3. The smallest circle marked c = 2 has a radius slightly more than 2.
Figure 4.8 Level curves of the function g(x,y)=9x2y2,g(x,y)=9x2y2, 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+8x4y4x2y2,f(x,y)=8+8x4y4x2y2, 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?

Domain:x,y inside the ellipse (x-1)24+(y+2)216=1Range: [0,)Domain:x,y inside the ellipse (x-1)24+(y+2)216=1Range: [0,)

Checkpoint 4.2

Find and graph the level curve of the function g(x,y)=x2+y26x+2yg(x,y)=x2+y26x+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 D2.D2. 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)=x2y2+2x+4y1g(x,y)=x2y2+2x+4y1 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.

This figure consists of two figures marked a and b. In figure a, the function f(x, y) = x2 sin y is given; it has some sinusoidal properties by increases as the square along the maximums of the sine function. In figure b, the function f(x, y) = sin(ex) cos(ln y) is given in three dimensions; it decreases gently from the corner nearest (–2, 20) but then seems to bunch up into a series of folds that are parallel to the x and y axes.
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)=x22xy+y2+3yzz2+4x2y+3x6(a polynomial in three variables)f(x,y,z)=x22xy+y2+3yzz2+4x2y+3x6(a polynomial in three variables)

and

g(x,y,t)=(x24xy+y2)sint(3x+5y)cost.g(x,y,t)=(x24xy+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)=3x4y+2z9x2y2z2f(x,y,z)=3x4y+2z9x2y2z2
  2. g(x,y,t)=2t4x2y2g(x,y,t)=2t4x2y2

Checkpoint 4.4

Find the domain of the function h(x,y,t)=(3t6)y4x2+4.h(x,y,t)=(3t6)y4x2+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+9y2z2f(x,y,z)=4x2+9y2z2 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+z22x+4y6zg(x,y,z)=x2+y2+z22x+4y6z

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 ) = 4 x 2 + y 2 V ( x , y ) = 4 x 2 + y 2

6.

f ( x , y ) = x 2 + y 2 4 f ( x , y ) = x 2 + y 2 4

7.

f ( x , y ) = 4 ln ( y 2 x ) f ( x , y ) = 4 ln ( y 2 x )

8.

g ( x , y ) = 16 4 x 2 y 2 g ( x , y ) = 16 4 x 2 y 2

9.

z ( x , y ) = y 2 x 2 z ( x , y ) = y 2 x 2

10.

f ( x , y ) = y + 2 x 2 f ( x , y ) = y + 2 x 2

Find the range of the functions.

11.

g ( x , y ) = 16 4 x 2 y 2 g ( x , y ) = 16 4 x 2 y 2

12.

V ( x , y ) = 4 x 2 + y 2 V ( x , y ) = 4 x 2 + y 2

13.

z = y 2 x 2 z = y 2 x 2

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)=y2x2,z(x,y)=y2x2, c=1c=1

15.

z(x,y)=y2x2,z(x,y)=y2x2, c=4c=4

16.

g ( x , y ) = x 2 + y 2 ; c = 4 , c = 9 g ( x , y ) = x 2 + y 2 ; c = 4 , c = 9

17.

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

18.

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

19.

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

20.

f ( x , y ) = x 2 y ; c = 1 , 2 f ( x , y ) = x 2 y ; c = 1 , 2

21.

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

22.

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

23.

g ( x , y ) = e x y ; c = 1 2 , 3 g ( x , y ) = e x y ; c = 1 2 , 3

24.

f ( x , y ) = x 2 ; c = 4 , 9 f ( x , y ) = x 2 ; c = 4 , 9

25.

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

26.

h ( x , y ) = ln ( x 2 + y 2 ) ; c = −1 , 0 , 1 h ( x , y ) = ln ( x 2 + y 2 ) ; c = −1 , 0 , 1

27.

g ( x , y ) = ln ( y x 2 ) ; c = −2 , 0 , 2 g ( x , y ) = ln ( y x 2 ) ; 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 = 2 z = 4 x y ; x = 2

31.

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

32.

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

Find the domain of the following functions.

33.

z = 100 4 x 2 25 y 2 z = 100 4 x 2 25 y 2

34.

z = ln ( x y 2 ) z = ln ( x y 2 )

35.

f ( x , y , z ) = 1 36 4 x 2 9 y 2 z 2 f ( x , y , z ) = 1 36 4 x 2 9 y 2 z 2

36.

f ( x , y , z ) = 49 x 2 y 2 z 2 f ( x , y , z ) = 49 x 2 y 2 z 2

37.

f ( x , y , z ) = 16 x 2 y 2 z 2 3 f ( x , y , z ) = 16 x 2 y 2 z 2 3

38.

f ( x , y ) = cos x 2 + y 2 f ( x , y ) = cos x 2 + y 2

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

39.

z = f ( x , y ) = x 2 + y 2 z = f ( x , y ) = x 2 + y 2

40.

z = x 2 + y 2 z = x 2 + y 2

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 x 2 y 2 f ( x , y ) = 4 x 2 y 2

43.

f ( x , y ) = 2 x 2 + y 2 f ( x , y ) = 2 x 2 + y 2

44.

z = 1 + e x 2 y 2 z = 1 + e x 2 y 2

45.

z = cos x 2 + y 2 z = cos x 2 + y 2

46.

z = y 2 x 2 z = y 2 x 2

47.

Describe the contour lines for several values of cc for z=x2+y22x2y.z=x2+y22x2y.

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

48.

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

49.

w ( x , y , z ) = x 2 + y 2 + z 2 , c = 9 w ( x , y , z ) = x 2 + y 2 + z 2 , c = 9

50.

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

51.

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

52.

w ( x , y , z ) = 9 x 2 4 y 2 + 36 z 2 , c = 0 w ( x , y , z ) = 9 x 2 4 y 2 + 36 z 2 , 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 4 x 2 y 2 , P ( 0 , 1 ) f ( x , y ) = 1 4 x 2 y 2 , P ( 0 , 1 )

54.

g ( x , y ) = y 2 arctan x , P ( 1 , 2 ) g ( x , y ) = y 2 arctan x , P ( 1 , 2 )

55.

g ( x , y ) = e x y ( x 2 + y 2 ) , P ( 1 , 0 ) g ( x , y ) = e x y ( x 2 + y 2 ) , 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.

Order a print copy

As an Amazon Associate we earn from qualifying purchases.

Citation/Attribution

This book may not be used in the training of large language models or otherwise be ingested into large language models or generative AI offerings without OpenStax's permission.

Want to cite, share, or modify this book? This book uses the Creative Commons Attribution-NonCommercial-ShareAlike License and you must attribute OpenStax.

Attribution information
  • If you are redistributing all or part of this book in a print format, then you must include on every physical page the following attribution:
    Access for free at https://openstax.org/books/calculus-volume-3/pages/1-introduction
  • If you are redistributing all or part of this book in a digital format, then you must include on every digital page view the following attribution:
    Access for free at https://openstax.org/books/calculus-volume-3/pages/1-introduction
Citation information

© Feb 5, 2024 OpenStax. Textbook content produced by OpenStax is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike License . The OpenStax name, OpenStax logo, OpenStax book covers, OpenStax CNX name, and OpenStax CNX logo are not subject to the Creative Commons license and may not be reproduced without the prior and express written consent of Rice University.