Functions of Several Variables and Their Domains

A function of several variables assigns one real number to each point of a set in ℝn, for example f(x, y) = √(9 − x2 − y2); its domain is the set of points where the formula is defined, its graph is a surface in space, and its level curves f(x, y) = c show where the function is constant. In brief: the domain of √(9 − x2 − y2) is the closed disc x2 + y2 ≤ 9, the range is [0, 3], and the graph is the upper half of a sphere of radius 3.

Temperature depends on position and time, profit depends on price and quantity, and height of a landscape depends on two coordinates. This guide explains how to find the domain of a function of two or three variables, how to draw its graph and level curves, and the first notions of limit, continuity and partial derivatives, with worked examples and a table.

What is a function of several variables?

A function f: D → ℝ with D ⊆ ℝn assigns to each point (x1, …, xn) of D a single real number. For n = 2 we write z = f(x, y), for n = 3, w = f(x, y, z). The set D is the domain and the set of values is the range. The notion of a function itself is covered; here the input is a point rather than a number.

How do you find the domain?

Unless a domain is given, it is the largest set where the formula makes sense: no division by zero, no square root (or even root) of a negative number, positive argument of a logarithm, and an argument of arcsin or arccos in [−1, 1]. Each restriction becomes an inequality, and the domain is their intersection.

Example 1: a square root

f(x, y) = √(9 − x2 − y2): we need 9 − x2 − y2 ≥ 0, so x2 + y2 ≤ 9, a closed disc of radius 3. The values range from 0 (on the boundary circle) to 3 (at the origin), so the range is [0, 3].

3 −3 3 −3 x y

Example 2: a logarithm

f(x, y) = ln(x − y): x − y > 0, that is y < x, an open half-plane below the line y = x (the line itself is excluded). The range is all of ℝ.

x y y = x

Example 3: a quotient with a root

f(x, y) = 1/√(x2 + y2 − 1): the expression under the root must be positive (not just nonnegative, since it is in the denominator), so x2 + y2 > 1: the exterior of the unit disc.

1 −1 x y

Example 4: several restrictions

f(x, y) = arcsin x + √y requires −1 ≤ x ≤ 1 and y ≥ 0: a half-strip. For f(x, y) = √(y − x2)/ln(x + 1) we need y ≥ x2, x + 1 > 0 and ln(x + 1) ≠ 0, so x > −1 with x ≠ 0: the region on and above the parabola, with the vertical line x = 0 removed.

−1 1 2 x y

Example 5: three variables

g(x, y, z) = ln(z − x2 − y2): z > x2 + y2, the region inside (above) the paraboloid. And √(1 − x2 − y2 − z2) is defined on the closed unit ball.

How do graphs and level curves show a function?

The graph of z = f(x, y) is the set of points (x, y, f(x, y)), a surface above the domain. A level curve (contour) is the set where f(x, y) = c for a constant c, the projection onto the xy-plane of the cross-section of the graph at the height c. Closely spaced contours indicate a steep surface, as on a topographic map. For three variables, one draws level surfaces f(x, y, z) = c.

Example 6: a paraboloid

f(x, y) = x2 + y2. The level curves x2 + y2 = c are circles of radius √c for c > 0, a single point for c = 0 and empty for c < 0. The graph is a bowl opening upward, with the minimum value 0 at the origin.

x y 1 2 3

Example 7: a saddle

f(x, y) = xy. The level curves xy = c are hyperbolas (in the first and third quadrants for c > 0, in the second and fourth for c < 0), and xy = 0 is the pair of axes. The graph is a saddle: along y = x it rises as x2, along y = −x it falls as −x2.

x y

Example 8: level surfaces

For f(x, y, z) = x2 + y2 + z2 the level surfaces are concentric spheres of radius √c. For f = x + 2y + 3z, they are parallel planes.

What are limits and continuity here?

The limit of f at (a, b) is L if f(x, y) approaches L as the point (x, y) approaches (a, b) along every path, not just along the axes. To show that a limit does not exist, find two paths with different values. Continuity means that the limit equals f(a, b). Polynomials, and sums, products and compositions of continuous functions, are continuous on their domains.

Example 9: a limit that exists

lim(x,y)→(0,0) x2y/(x2 + y2) = 0, because |x2y/(x2 + y2)| ≤ |y| (as x2 ≤ x2 + y2), and |y| → 0.

Example 10: a limit that does not exist

For xy/(x2 + y2), along the path y = mx the value is mx2/(x2 + m2x2) = m/(1 + m2), which depends on m: 0 along the x-axis, 1/2 along y = x. Different paths give different values, so the limit does not exist.

What are partial derivatives?

The partial derivative fx is the derivative with respect to x with y held constant, and fy the other way around. They give the slopes of the graph in the coordinate directions. For f = x2y + 3y3: fx = 2xy and fy = x2 + 9y2.

Table of examples

Domains, ranges and level sets of sample functions
Function Domain Range Level sets
√(9 − x2 − y2)disc x2 + y2 ≤ 9[0, 3]circles
ln(x − y)half-plane y < xℝlines y = x − ec
1/√(x2 + y2 − 1)exterior of the unit disc(0, ∞)circles
x2 + y2ℝ2[0, ∞)circles, a point
xyℝ2ℝhyperbolas, the axes
x2 + y2 + z2ℝ3[0, ∞)spheres

Where does the concept come from?

Functions of several variables arose in the eighteenth century with the study of surfaces and of physical fields by Euler, d’Alembert and Lagrange. Contour lines on maps were used from the eighteenth century, and Edmond Halley drew early charts of lines of equal magnetic variation (1701). The rigorous treatment of limits in several variables developed in the nineteenth century with Cauchy and Weierstrass.

Which mistakes are common?

Checking a limit along one path only

A limit in several variables requires the same value along all paths. Agreement along the axes proves nothing.

Forgetting that a denominator excludes only where it vanishes

The domain of a quotient excludes the points where the denominator is 0. For a root in a denominator, the strict inequality applies.

Mixing up the graph and the level curves

The graph lives in ℝ3; level curves live in the plane of the variables. The contour for c is a curve in the xy-plane, not at the height c.

Reading partial derivatives as ordinary ones

When differentiating with respect to x, treat y as a constant, and vice versa.