← Back to calculus 3

Functions of Several Variables

Functions of several variables

A function of several variables takes more than one input. In this chapter we mainly study scalar-valued functions of two variables,

f:R2R,z=f(x,y),f : \mathbb{R}^2 \to \mathbb{R}, \qquad z = f(x, y),

where the input is an ordered pair (x,y)(x, y) and the output is a single real number zz.

This is different from a single-variable function y=f(x)y = f(x), which has one input and one output, and also different from a vector-valued function Vector-Valued Functions, which takes one input and returns a vector.

TypeInputOutputTypical graph
Single-variable functionone real numberone real numbercurve in the plane
Vector-valued functionone real numbervectorcurve in space
Function of two variablestwo real numbersone real numbersurface in space

The big geometric change is this: the graph of y=f(x)y = f(x) lives in R2\mathbb{R}^2, but the graph of z=f(x,y)z = f(x, y) lives in R3\mathbb{R}^3.


Domain, range, and graph

Let f(x,y)f(x, y) be a function of two variables.

The domain of ff is the set of all ordered pairs (x,y)(x, y) for which the formula makes sense.

The range of ff is the set of all values zz that the function can produce.

The graph of ff is the set of all points in space

{(x,y,z)R3:z=f(x,y), (x,y)dom(f)}.\{(x, y, z) \in \mathbb{R}^3 : z = f(x, y),\ (x, y) \in \mathrm{dom}(f)\}.

For a two-variable function, the graph is a surface.

Examples of domain restrictions


Standard graphs of functions of two variables

The surfaces below are all standard examples from Cylinders and Quadratic Surfaces, except for the plane, which is also closely related to Lines and Planes.

1. Cone: z=x2+y2z = \sqrt{x^2 + y^2}

This is the upper nappe of a double cone. Each horizontal slice z=cz = c is a circle of radius cc.

Cone: z = sqrt(x² + y²)

x²/a² + y²/b² = z²/c² (double cone)

2. Paraboloid: z=x2+y2z = x^2 + y^2

This is an elliptic paraboloid. Horizontal slices z=cz = c are circles, and the surface opens upward.

Paraboloid: z = x² + y²

z = x²/a² + y²/b²

3. Plane: z=ax+by+cz = ax + by + c

A plane is the graph of a linear function of two variables. Written in standard form, this becomes an equation of the type discussed in Lines and Planes.

Plane: z = 1 - x + 2y

4. Upper hemisphere: z=9x2y2z = \sqrt{9 - x^2 - y^2}

This is the upper half of the sphere of radius 33 centered at the origin.

Upper hemisphere: z = sqrt(9 - x² - y²)


Level sets

Given a function f(x,y)f(x, y) and a constant cc, the level set (or contour line) is the set of points where the function has constant value:

Lc={(x,y)dom(f):f(x,y)=c}.L_c = \{(x, y) \in \mathrm{dom}(f) : f(x, y) = c\}.

So a level set is the two-variable analogue of a contour map on a topographic chart: instead of showing height directly, it shows the points with the same height.

For example, if f(x,y)=x2+y2f(x, y) = x^2 + y^2, then each level set is a circle centered at the origin. The interactive graph below shows a family of five nearby level curves together with their projections onto the xyxy-plane.

Level set of f(x, y) = x² + y²

c = 1.00

The blue surface is z = x² + y². The colored circles are a family of five level curves, and the matching circles below are their projections onto the xy-plane.

As cc changes, the level sets of f(x,y)=x2+y2f(x, y) = x^2 + y^2 become circles of different radii. Larger values of cc give larger circles.


Exercises

Find the domain and range of

f(x,y)=4x2y2.f(x, y) = \sqrt{4 - x^2 - y^2}.

Answer: The domain is the disk x2+y24x^2 + y^2 \le 4. The output is always nonnegative, and the largest value occurs at (0,0)(0,0), so the range is

0f(x,y)2.0 \le f(x, y) \le 2.

Describe the graph of

z=x2+y21.z = x^2 + y^2 - 1.

Answer: This is an upward-opening elliptic paraboloid shifted down by 11 unit. Its vertex is at (0,0,1)(0, 0, -1).

Let

f(x,y)=x2+y2.f(x, y) = x^2 + y^2.

Find the level sets for c=0c = 0, c=1c = 1, and c=4c = 4.

Answer:

  • c=0c = 0: (x,y)=(0,0)(x, y) = (0, 0).
  • c=1c = 1: x2+y2=1x^2 + y^2 = 1, a circle of radius 11.
  • c=4c = 4: x2+y2=4x^2 + y^2 = 4, a circle of radius 22.

Explain why y=f(x)y = f(x) and z=f(x,y)z = f(x, y) behave differently as graphs.

Answer: A single-variable function gives a curve in the plane because one input determines one output. A two-variable function gives a surface in space because two inputs determine one output. The extra input changes the geometry from a curve to a surface.