Functions of Several Variables

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)

maps each ordered pair (x,y)

in a subset D

of the real plane 2

to a unique real number z.

The set D

is called the domain of the function. The range of f

is the set of all real numbers z

that has at least one ordered pair (x,y)D

such that f(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.

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

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+2
  2. g(x,y)=9x2y2
  1. This is an example of a linear function in two variables. There are no values or combinations of x

    and

    y

    that cause

    f(x,y)

    to be undefined, so the domain of

    f

    is

    2.

    To determine the range, first pick a value for

    z.

    We need to find a solution to the equation

    f(x,y)=z,

    or

    3x5y+2=z.

    One such solution can be obtained by first setting

    y=0,

    which yields the equation

    3x+2=z.

    The solution to this equation is

    x=z23,

    which gives the ordered pair

    (z23,0)

    as a solution to the equation

    f(x,y)=z

    for any value of

    z.

    Therefore, the range of the function is all real numbers, or

    .
  2. For the function g(x,y)

    to have a real value, the quantity under the square root must be nonnegative:


    9x2y20.

    This inequality can be written in the form


    x2+y29.

    Therefore, the domain of

    g(x,y)

    is

    {(x,y)2\|x2+y29}.

    The graph of this set of points can be described as a disk of radius

    3

    centered at the origin. The domain includes the boundary circle as shown in the following graph.


    A circle of radius three with center at the origin. The equation x2 + y2 = 9 is given.


    To determine the range of

    g(x,y)=9x2y2

    we start with a point

    (x0,y0)

    on the boundary of the domain, which is defined by the relation

    x2+y2=9.

    It follows that

    x02+y02=9

    and


    g(x0,y0)=9x02y02=9(x02+y02)=99=0.

    If

    x02+y02=0

    (in other words,

    x0=y0=0),

    then


    g(x0,y0)=9x02y02=9(x02+y02)=90=3.

    This is the maximum value of the function. Given any value c between

    0and3,

    we can find an entire set of points inside the domain of

    g

    such that

    g(x,y)=c:
    9x2y2=c9x2y2=c2x2+y2=9c2.

    Since

    9c2>0,

    this describes a circle of radius

    9c2

    centered at the origin. Any point on this circle satisfies the equation

    g(x,y)=c.

    Therefore, the range of this function can be written in interval notation as

    [0,3].

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

The domain is the shaded circle defined by the inequality 9x2+9y236,

which has a circle of radius 2

as its boundary. The range is [0,6].


A circle of radius two with center at the origin. The equation x2 + y2 ≤ 4 is given.

Hint

Determine the set of ordered pairs that do not make the radicand negative.

Graphing Functions of Two Variables

Suppose we wish to graph the function z=(x,y).

This function has two independent variables (xandy)

and one dependent variable (z).

When graphing a function y=f(x)

of one variable, we use the Cartesian plane. We are able to graph any ordered pair (x,y)

in the plane, and every point in the plane has an ordered pair (x,y)

associated with it. With a function of two variables, each ordered pair (x,y)

in the domain of the function is mapped to a real number z.

Therefore, the graph of the function f

consists of ordered triples (x,y,z).

The graph of a function 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)

coordinate system laying flat. Then, every point in the domain of the function f

has a unique z-value

associated with it. If z

is positive, then the graphed point is located above the xy-plane,

if z

is negative, then the graphed point is located below the xy-plane.

The set of all the graphed points becomes the two-dimensional surface that is the graph of the function f.

Graphing Functions of Two Variables

Create a graph of each of the following functions:

  1. g(x,y)=9x2y2
  2. f(x,y)=x2+y2
  1. In [link], we determined that the domain of g(x,y)=9x2y2

    is

    {(x,y)2\|x2+y29}

    and the range is

    {z2\|0z3}.

    When

    x2+y2=9

    we have

    g(x,y)=0.

    Therefore any point on the circle of radius

    3

    centered at the origin in the

    x,y-plane

    maps to

    z=0

    in

    3.

    If

    x2+y2=8,

    then

    g(x,y)=1,

    so any point on the circle of radius

    22

    centered at the origin in the

    x,y-plane

    maps to

    z=1

    in

    3.

    As

    x2+y2

    gets closer to zero, the value of z approaches 3. When

    x2+y2=0,

    then

    g(x,y)=3.

    This is the origin in the

    x,y-plane.

    If

    x2+y2

    is equal to any other value between

    0and9,

    then

    g(x,y)

    equals some other constant between

    0and3.

    The surface described by this function is a hemisphere centered at the origin with radius

    3

    as shown in the following graph.


    A hemisphere with center at the origin. The equation z = g(x, y) = the square root of the quantity (9 – x2 – y2) is given.

  2. This function also contains the expression x2+y2.

    Setting this expression equal to various values starting at zero, we obtain circles of increasing radius. The minimum value of

    f(x,y)=x2+y2

    is zero (attained when

    x=y=0.).

    When

    x=0,

    the function becomes

    z=y2,

    and when

    y=0,

    then the function becomes

    z=x2.

    These are cross-sections of the graph, and are parabolas. Recall from Introduction to Vectors in Space that the name of the graph of

    f(x,y)=x2+y2

    is a paraboloid. The graph of

    f

    appears in the following graph.


    A paraboloid with vertex at the origin. The equation z = f(x, y) = x2 + y2 is given.

Nuts and Bolts

A profit function for a hardware manufacturer is given by

f(x,y)=16(x3)2(y2)2,

where x

is the number of nuts sold per month (measured in thousands) and y

represents the number of bolts sold per month (measured in thousands). Profit is measured in thousands of dollars. Sketch a graph of this function.

This function is a polynomial function in two variables. The domain of f

consists of (x,y)

coordinate pairs that yield a nonnegative profit:

16(x3)2(y2)20(x3)2+(y2)216.

This is a disk of radius 4

centered at (3,2).

A further restriction is that both xandy

must be nonnegative. When x=3

and y=2,

f(x,y)=16.

Note that it is possible for either value to be a noninteger; for example, it is possible to sell 2.5

thousand nuts in a month. The domain, therefore, contains thousands of points, so we can consider all points within the disk. For any z<16,

we can solve the equation f(x,y)=16:

16(x3)2(y2)2=z(x3)2+(y2)2=16z.

Since z<16,

we know that 16z>0,

so the previous equation describes a circle with radius 16z

centered at the point (3,2).

Therefore. the range of f(x,y)

is {z\|z16}.

The graph of f(x,y)

is also a paraboloid, and this paraboloid points downward as shown.

A paraboloid center seemingly on the positive z axis. The equation z = f(x, y) = 16 – (x – 3)2 – (y – 2)2 is given.

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 ([link]). A level curve of a function of two variables 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.

Definition

Given a function f(x,y)

and a number c

in the range of f,a

level curve of a function of two variables for the value c

is defined to be the set of points satisfying the equation f(x,y)=c.

Returning to the function g(x,y)=9x2y2,

we can determine the level curves of this function. The range of g

is the closed interval [0,3].

First, we choose any number in this closed interval—say, c=2.

The level curve corresponding to c=2

is described by the equation

9x2y2=2.

To simplify, square both sides of this equation:

9x2y2=4.

Now, multiply both sides of the equation by −1

and add 9

to each side:

x2+y2=5.

This equation describes a circle centered at the origin with radius 5.

Using values of c

between 0and3

yields other circles also centered at the origin. If c=3,

then the circle has radius 0,

so it consists solely of the origin. [link] is a graph of the level curves of this function corresponding to 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.

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

Making a Contour Map

Given the function f(x,y)=8+8x4y4x2y2,

find the level curve corresponding to c=0.

Then create a contour map for this function. What are the domain and range of f?

To find the level curve for c=0,

we set f(x,y)=0

and solve. This gives

0=8+8x4y4x2y2.

We then square both sides and multiply both sides of the equation by −1:

4x2+y28x+4y8=0.

Now, we rearrange the terms, putting the x

terms together and the y

terms together, and add 8

to each side:

4x28x+y2+4y=8.

Next, we group the pairs of terms containing the same variable in parentheses, and factor 4

from the first pair:

4(x22x)+(y2+4y)=8.

Then we complete the square in each pair of parentheses and add the correct value to the right-hand side:

4(x22x+1)+(y2+4y+4)=8+4(1)+4.

Next, we factor the left-hand side and simplify the right-hand side:

4(x1)2+(y+2)2=16.

Last, we divide both sides by 16:

(x1)24+(y+2)216=1.

This equation describes an ellipse centered at (1,−2).

The graph of this ellipse appears in the following graph.

An ellipse with center (1, –2), major axis vertical and of length 8, and minor axis horizontal of length 4.

We can repeat the same derivation for values of c

less than 4.

Then, [link] becomes

4(x1)216c2+(y+2)216c2=1

for an arbitrary value of c.

[link] shows a contour map for f(x,y)

using the values c=0,1,2,and3.

When c=4,

the level curve is the point (−1,2).

An series of four concentric ellipses with center (1, –2). The largest one is marked c = 0 and has major axis vertical and of length 8 and minor axis horizontal of length 4. The next smallest one is marked c = 1 and is only slightly smaller. The next two are marked c = 2 and c = 3 and are increasingly smaller. Finally, there is a point marked c = 4 at the center (1, –2).

Find and graph the level curve of the function g(x,y)=x2+y26x+2y

corresponding to c=15.

The equation of the level curve can be written as (x3)2+(y+1)2=25,

which is a circle with radius 5

centered at (3,−1).


An circle of radius 5 with center (3, –1).

Hint

First, set g(x,y)=15

and then complete the square.

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,

but as their name implies, vertical traces are graphed in the xz

Definition

Consider a function z=f(x,y)

with domain D2.

A vertical trace of the function can be either the set of points that solves the equation f(a,y)=z

for a given constant x=a

or f(x,b)=z

for a given constant y=b.

Finding Vertical Traces

Find vertical traces for the function f(x,y)=sinxcosy

corresponding to x=π4,0,andπ4,

and y=π4,0,andπ4.

First set x=π4

in the equation z=sinxcosy:

z=sin(π4)cosy=2cosy2−0.7071cosy.

This describes a cosine graph in the plane x=π4.

The other values of z

appear in the following table.

Vertical Traces Parallel to the xz-Plane for the Function f(x,y)=sinxcosy
c Vertical Trace for x=c
π4 z=2cosy2
0 z=0
π4 z=2cosy2

In a similar fashion, we can substitute the y-values

in the equation f(x,y)

to obtain the traces in the yz-plane,

as listed in the following table.

Vertical Traces Parallel to the yz-Plane for the Function f(x,y)=sinxcosy
d Vertical Trace for y=d
π4 z=2sinx2
0 z=sinx
π4 z=2sinx2

The three traces in the xz-plane

are cosine functions; the three traces in the yz-plane

are sine functions. These curves appear in the intersections of the surface with the planes x=π4,x=0,x=π4

and y=π4,y=0,y=π4

as shown in the following figure.

This figure consists of two figures marked a and b. In figure a, a function is given in three dimensions and it is intersected by three parallel x-z planes at y = ±π/4 and 0. In figure b, a function is given in three dimensions and it is intersected by three parallel y-z planes at x = ±π/4 and 0.

Determine the equation of the vertical trace of the function g(x,y)=x2y2+2x+4y1

corresponding to y=3,

and describe its graph.

z=3(x1)2.

This function describes a parabola opening downward in the plane y=3.

Hint

Set y=3

in the equation z=x2y2+2x+4y1

and complete the square.

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.

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)

and

g(x,y,t)=(x24xy+y2)sint(3x+5y)cost.

In the first function, (x,y,z)

represents a point in space, and the function f

maps each point in space to a fourth quantity, such as temperature or wind speed. In the second function, (x,y)

can represent a point in the plane, and t

can represent time. The function might map a point in the plane to a third quantity (for example, pressure) at a given time 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.

Domains for Functions of Three Variables

Find the domain of each of the following functions:

  1. f(x,y,z)=3x4y+2z9x2y2z2
  2. g(x,y,t)=2t4x2y2
  1. For the function f(x,y,z)=3x4y+2z9x2y2z2

    to be defined (and be a real value), two conditions must hold:

    1. The denominator cannot be zero.
    2. The radicand cannot be negative.

    Combining these conditions leads to the inequality


    9x2y2z2>0.

    Moving the variables to the other side and reversing the inequality gives the domain as


    domain(f)={(x,y,z)3\|x2+y2+z2<9},

    which describes a ball of radius

    3

    centered at the origin. (Note: The surface of the ball is not included in this domain.)

  2. For the function g(x,y,t)=2t4x2y2

    to be defined (and be a real value), two conditions must hold:

    1. The radicand cannot be negative.
    2. The denominator cannot be zero.

    Since the radicand cannot be negative, this implies

    2t40,

    and therefore that

    t2.

    Since the denominator cannot be zero,

    x2y20,

    or

    x2y2,

    Which can be rewritten as

    y=±x,

    which are the equations of two lines passing through the origin. Therefore, the domain of

    g

    is


    domain(g)={(x,y,t)\|y±x,t2}.

Find the domain of the function h(x,y,t)=(3t6)y4x2+4.

domain(h)={(x,y,t)3\|y4x24}
Hint

Check for values that make radicands negative or denominators equal to zero.

Functions of two variables have level curves, which are shown as curves in the 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)

and a number c

in the range of 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.

Finding a Level Surface

Find the level surface for the function f(x,y,z)=4x2+9y2z2

corresponding to c=1.

The level surface is defined by the equation 4x2+9y2z2=1.

This equation describes a hyperboloid of one sheet as shown in the following figure.

This figure consists of four figures. The first is marked c = 0 and consists of a double cone (that is, two nappes) with their apex at the origin. The second is marked c = 1 and it looks remarkably similar to the first except that there is no apex at which the cones meet: instead, the two nappes are connected. Similarly, the next figure marked c = 2 has the two nappes connect, but this time their connection is larger (that is, the radius of their connection is greater). The final figure marked c = 3 also has the two nappes connect in an even larger fashion.

Find the equation of the level surface of the function

g(x,y,z)=x2+y2+z22x+4y6z

corresponding to c=2,

and describe the surface, if possible.

(x1)2+(y+2)2+(z3)2=16

describes a sphere of radius 4

centered at the point (1,−2,3).

Hint

Set g(x,y,z)=c

and complete the square.

Key Concepts

Key Equations

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

W(x,y)=4x2+y2.

Find W(2,−1),

W(−3,6).
17,72
W(x,y)=4x2+y2.

Find W(2+h,3+h).

The volume of a right circular cylinder is calculated by a function of two variables, V(x,y)=πx2y,

where x

is the radius of the right circular cylinder and y

represents the height of the cylinder. Evaluate V(2,5)

and explain what this means.

20π.

This is the volume when the radius is 2

and the height is 5.

An oxygen tank is constructed of a right cylinder of height y

and radius x

with two hemispheres of radius x

mounted on the top and bottom of the cylinder. Express the volume of the cylinder as a function of two variables, xandy,

find V(10,2),

and explain what this means.

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

V(x,y)=4x2+y2

All points in the xy-plane

f(x,y)=x2+y24
f(x,y)=4ln(y2x)
x<y2
g(x,y)=164x2y2
z(x,y)=y2x2

All real ordered pairs in the xy-plane

of the form (a,b)

f(x,y)=y+2x2

Find the range of the functions.

g(x,y)=164x2y2
{z\|0z4}
V(x,y)=4x2+y2
z=y2x2

The set

For the following exercises, find the level curves of each function at the indicated value of c

to visualize the given function.

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

a hyperbola

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

a line; x+y=0,

line through the origin

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

three lines

f(x,y)=x2y;c=1,2
g(x,y)=xx+y;c=−1,0,2
xx+y=−1,xx+y=0,xx+y=2
g(x,y)=x3y;c=−1,0,2
g(x,y)=exy;c=12,3
exy=12,exy=3
f(x,y)=x2;c=4,9
f(x,y)=xyx;c=−2,0,2
xyx=−2,xyx=0,xyx=2
h(x,y)=ln(x2+y2);c=−1,0,1
g(x,y)=ln(yx2);c=−2,0,2
e−2x2=y,y=x2,y=e2x2
z=f(x,y)=x2+y2, c=3
f(x,y)=y+2x2, c=

any constant

The level curves are parabolas of the form y=cx22.

For the following exercises, find the vertical traces of the functions at the indicated values of x

and y, and plot the traces.

z=4xy;x=2
f(x,y)=3x+y3,x=1
z=3+y3,

a curve in the zy-plane

with rulings parallel to the x-axis


A planar version of the function y3 + 3 with results in the z axis and nothing mattering from the x axis.

z=cosx2+y2 x=1

Find the domain of the following functions.

z=1004x225y2
x225+y241
z=ln(xy2)
f(x,y,z)=1364x29y2z2
x29+y24+z236<1
f(x,y,z)=49x2y2z2
f(x,y,z)=16x2y2z23

All points in xyz-space

f(x,y)=cosx2+y2

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

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

An upward facing, gently increasing paraboloid.

z=x2+y2

Use technology to graph z=x2y.


A twisted plane with corners at (1, –1, –1), (–1, –1, –1), (–1, 1, 0.5), and (1, 1, 0.5).

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

f(x,y)=4x2y2
f(x,y)=2x2+y2

A downward facing, gently decreasing paraboloid.

z=1+ex2y2
z=cosx2+y2

A hemisphere in the center with edges then swooping up at the four corners.

z=y2x2

Describe the contour lines for several values of c

for z=x2+y22x2y.

The contour lines are circles.

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

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

a sphere of radius 3

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

a hyperboloid of one sheet

w(x,y,z)=9x24y2+36z2,c=0

For the following exercises, find an equation of the level curve of f

that contains the point P.

f(x,y)=14x2y2,P(0,1)
4x2+y2=1,
g(x,y)=y2arctanx,P(1,2)
g(x,y)=exy(x2+y2),P(1,0)
1=exy(x2+y2)

The strength E

of an electric field at point (x,y,z)

resulting from an infinitely long charged wire lying along the y-axis

is given by E(x,y,z)=k/x2+y2,

where k

is a positive constant. For simplicity, let k=1

and find the equations of the level surfaces for E=10andE=100.

A thin plate made of iron is located in the xy-plane.

The temperature T

in degrees Celsius at a point P(x,y)

is inversely proportional to the square of its distance from the origin. Express T

as a function of xandy.

T(x,y)=kx2+y2

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.

Use this constant to determine the temperature at point Q(3,4).

Refer to the preceding problem. Find the level curves for T=40°C andT=100°C,

and describe what the level curves represent.

x2+y2=k40, x2+y2=k100.

The level curves represent circles of radii 10k/20

and k/10

Glossary

contour map
a plot of the various level curves of a given function f(x,y)
function of two variables
a function z=f(x,y)

that maps each ordered pair

(x,y)

in a subset

D

of

2

to a unique real number

z
graph of a function of two variables
a set of ordered triples (x,y,z)

that satisfies the equation

z=f(x,y)

plotted in three-dimensional Cartesian space

level curve of a function of two variables
the set of points satisfying the equation f(x,y)=c

for some real number

c

in the range of

f
level surface of a function of three variables
the set of points satisfying the equation f(x,y,z)=c

for some real number

c

in the range of

f
surface
the graph of a function of two variables, z=f(x,y)
vertical trace
the set of ordered triples (c,y,z)

that solves the equation

f(c,y)=z

for a given constant

x=c

or the set of ordered triples

(x,d,z)

that solves the equation

f(x,d)=z

for a given constant

y=d

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

You can also download for free at http://cnx.org/contents/9a1df55a-b167-4736-b5ad-15d996704270@5.1

Attribution: