Functions of Several Variables
A function of several variables, such as z = f(x, y), assigns one output to each input point (x, y). Its domain is where the formula is defined, its graph is a surface in 3D, and its level curves f(x, y) = k, drawn together as a contour map, show that surface from above like a hiking map.
Before this lesson: Domain and Range, 3D Coordinate System and Quadric Surfaces
Functions with more than one input
Many quantities depend on more than one thing. The temperature on a metal plate depends on both x and y. The volume of a can depends on its radius and its height. A function of two variables takes an ordered pair (x, y) and returns one number, z = f(x, y).
The domain is now a region of the xy-plane: every point where the formula makes sense. The range is the set of outputs. The rules from one-variable functions still apply: no dividing by 0, no square root of a negative number, and no logarithm of a number that is 0 or negative.
The graph of f is the set of points (x, y, f(x, y)) in space. It is a surface, with height f(x, y) above each point of the domain.
Level curves and contour maps
A level curve is the set of points in the xy-plane where f has one fixed value k. It is the outline you get by slicing the surface with the horizontal plane z = k and dropping the slice onto the xy-plane. A contour map shows several level curves, each labeled with its k-value.
Read a contour map like a hiking map. Where the curves are close together, f changes quickly and the surface is steep. Where they are far apart, the surface is nearly flat.
z = f(x, y), \qquad \text{level curve: } f(x, y) = k, \qquad \text{level surface: } f(x, y, z) = k- A function of three variables, w = f(x, y, z), has a domain in space. Its graph would need four dimensions, so instead you study its level surfaces f(x, y, z) = k.
- Different level curves of one function never cross, because each point has only one output.
Functions of several variables examples
Example 1: Evaluating, domain and range
Let f(x, y) = √(9 − x² − y²). Find f(1, 2), the domain and the range.
f(1, 2) = \sqrt{9 - 1^2 - 2^2}Substitute x = 1 and y = 2.
= \sqrt{9 - 1 - 4} = \sqrt{4}Square and subtract.
= 2
Take the square root.
9 - x^2 - y^2 \ge 0
Domain: the expression under the square root cannot be negative.
x^2 + y^2 \le 9
Add x² + y² to both sides and switch sides.
0 \le \sqrt{9 - x^2 - y^2} \le 3Range: 9 − x² − y² runs from 0 (on the edge) to 9 (at the origin).
Answer: f(1, 2) = 2. The domain is the closed disk x² + y² ≤ 9, of radius 3 (see equation of a circle), and the range is [0, 3]. The graph is the top half of the sphere x² + y² + z² = 9.
Example 2: A domain with a logarithm
Find and describe the domain of g(x, y) = ln(y − x²). Is (1, 1) in the domain? Is (1, 3)?
y - x^2 \gt 0
A logarithm needs a positive input.
y \gt x^2
Add x² to both sides.
1 \gt 1^2 \text{ is false}Test (1, 1): 1 is not greater than 1.
3 \gt 1^2 \text{ is true}Test (1, 3).
g(1, 3) = \ln(3 - 1) = \ln 2 \approx 0.693
Evaluate at (1, 3).
Answer: the domain is every point strictly above the parabola y = x²; the parabola itself is not included. (1, 1) is on the parabola, so it is not in the domain; (1, 3) is, with g(1, 3) = ln 2 ≈ 0.693.
Example 3: Level curves of a paraboloid
Draw the level curves of f(x, y) = x² + y² for k = 0, 1, 4 and 9, and describe the surface.
x^2 + y^2 = 0
k = 0: only the point (0, 0).
x^2 + y^2 = 1
k = 1: a circle of radius 1.
x^2 + y^2 = 4
k = 4: a circle of radius √4 = 2.
x^2 + y^2 = 9
k = 9: a circle of radius √9 = 3.
Answer: the level curves are circles centered at the origin with radius √k. The heights go up by 1, 3 and then 5 while the radius goes up by 1 each time, so the circles crowd together as you move out: the bowl-shaped surface, a paraboloid, gets steeper away from the center.
Example 4: Level curves of a plane
Find the level curves of f(x, y) = 6 − 2x − 3y for k = 0, 3 and 6.
6 - 2x - 3y = k \;\Rightarrow\; 2x + 3y = 6 - k
Set f equal to k, then move terms.
2x + 3y = 6
k = 0: a line through (3, 0) and (0, 2).
2x + 3y = 3
k = 3: a line through (1.5, 0) and (0, 1).
2x + 3y = 0
k = 6: a line through the origin.
Answer: the level curves are parallel lines with slope −2/3, equally spaced because the heights are equally spaced. Equal spacing means constant steepness, which is exactly what a plane has.
Example 5: Temperature on a metal plate (word problem)
The temperature on a metal plate is T(x, y) = 100 − x² − 4y² degrees Celsius, with x and y in centimeters. Find the temperature at (2, 1), and describe the isotherm (level curve) T = 84.
T(2, 1) = 100 - 2^2 - 4(1)^2
Substitute x = 2 and y = 1.
= 100 - 4 - 4 = 92
Simplify.
100 - x^2 - 4y^2 = 84
Set T equal to 84.
x^2 + 4y^2 = 16
Add x² + 4y² to both sides and subtract 84.
\dfrac{x^2}{16} + \dfrac{y^2}{4} = 1Divide both sides by 16 to get standard form (see ellipses).
Answer: the temperature at (2, 1) is 92 °C. The isotherm T = 84 is an ellipse centered at the origin, reaching x = ±4 and y = ±2. The point (2, 1) lies inside it, which fits: it is warmer than 84 °C.
Common mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Using a strict inequality for a square root | Domain of √(9 − x² − y²) given as x² + y² < 9 | A square root allows 0: x² + y² ≤ 9, including the circle. |
| Allowing 0 inside a logarithm | Domain of ln(y − x²) given as y ≥ x² | A logarithm needs a positive input: y > x². |
| Mixing up domain and range | Range of √(9 − x² − y²) given as the disk x² + y² ≤ 9 | The domain is the disk; the range is the set of outputs, [0, 3]. |
| Drawing level curves in space at height 0 only | Labeling every circle of x² + y² as “z = 0” | Each level curve is labeled with its own value k. |
| Reading spacing backward | “Close contour lines mean flat ground” | Close lines mean f changes fast: the surface is steep there. |
Related methods
Traces and quadric surfaces
Level curves are horizontal traces. Vertical traces (setting x or y equal to a constant) complete the picture, as in quadric surfaces: the paraboloid z = x² + y² has circles for horizontal traces and parabolas for vertical ones.
Level surfaces in three variables
For w = x² + y² + z², each level surface x² + y² + z² = k is a sphere of radius √k (see the 3D coordinate system lesson for spheres). Weather maps of air pressure at different altitudes use the same idea.
What comes next
With several inputs, you can approach a point from many directions. The next lessons look at limits and continuity, then partial derivatives, which measure how f changes when only one input moves.
Practice problems
- Evaluate f(x, y) = x²y − 3y at (2, −1).
- Find the domain of f(x, y) = √(x + y).
- Find the domain of f(x, y) = 1/(x − y).
- Find the domain and range of f(x, y) = √(16 − x² − y²).
- Find the domain of f(x, y) = ln(x² + y² − 1).
- Describe the level curves of f(x, y) = x + y for k = −1, 0 and 1.
- Describe the level curve of f(x, y) = x² + 4y² for k = 4.
- Describe the level curves of f(x, y) = xy for k = 0, 1 and −1.
- Describe the level surface of f(x, y, z) = x² + y² + z² for k = 25.
- The volume of a cylinder is V(r, h) = πr²h. Find V(3, 10) in cubic centimeters, and describe the level curve V = 100π.
Show answers
1.
f(2, -1) = 2^2(-1) - 3(-1)
Substitute x = 2 and y = −1.
= -4 + 3 = -1
Multiply, then add.
Answer: −1
2.
x + y \ge 0
The square root needs a nonnegative input.
y \ge -x
Subtract x from both sides.
Answer: all points on or above the line y = −x
3.
x - y \ne 0
The denominator cannot be 0.
y \ne x
Add y to both sides and switch sides.
Answer: every point except those on the line y = x
4.
16 - x^2 - y^2 \ge 0 \;\Rightarrow\; x^2 + y^2 \le 16
Domain: the square root needs a nonnegative input.
0 \le f(x, y) \le \sqrt{16} = 4Range: the expression under the root runs from 0 to 16.
Answer: domain the disk x² + y² ≤ 16 (radius 4); range [0, 4]
5.
x^2 + y^2 - 1 \gt 0
The logarithm needs a positive input.
x^2 + y^2 \gt 1
Add 1 to both sides.
Answer: every point outside the unit circle (the circle itself is excluded)
6.
x + y = k \;\Rightarrow\; y = k - x
Solve for y.
y = -1 - x, \quad y = -x, \quad y = 1 - x
Substitute k = −1, 0, 1.
Answer: three parallel lines of slope −1 with y-intercepts −1, 0 and 1
7.
x^2 + 4y^2 = 4
Set f equal to 4.
\dfrac{x^2}{4} + y^2 = 1Divide both sides by 4.
Answer: an ellipse centered at the origin reaching x = ±2 and y = ±1
8.
xy = 0
k = 0: x = 0 or y = 0, the two axes.
y = \dfrac{1}{x}k = 1: divide by x; a hyperbola in quadrants I and III (see hyperbolas).
y = -\dfrac{1}{x}k = −1: a hyperbola in quadrants II and IV.
Answer: the axes for k = 0 and hyperbolas for k = ±1
9.
x^2 + y^2 + z^2 = 25
Set f equal to 25.
\sqrt{25} = 5Find the radius.
Answer: the sphere of radius 5 centered at the origin
10.
V(3, 10) = \pi(3)^2(10) = 90\pi \approx 282.7
Substitute r = 3 and h = 10.
\pi r^2 h = 100\pi \;\Rightarrow\; r^2 h = 100
Set V = 100π and divide both sides by π.
h = \dfrac{100}{r^2}Solve for h; r and h must be positive.
Answer: V(3, 10) = 90π ≈ 282.7 cm³. The level curve V = 100π is h = 100/r² for r > 0: every can shape with that volume.
Functions of several variables FAQ
What is a function of two variables?
It is a rule that assigns one number z = f(x, y) to each point (x, y) in its domain. Its graph is a surface in three dimensions.
How do you find the domain of a function of two variables?
Find the points where the formula is undefined and remove them: denominators cannot be 0, square roots need inputs ≥ 0, and logarithms need inputs > 0. Describe what is left as a region of the xy-plane.
What is a level curve?
A level curve is the set of points (x, y) where f(x, y) equals a fixed number k. It shows where the surface has height k, like one line on a topographic map.
What does a contour map tell you?
A contour map shows several level curves at once. Close curves mean the surface is steep; widely spaced curves mean it is nearly flat.
Summary
- A function of two variables z = f(x, y) gives one output for each point of its domain, a region of the plane.
- Domain rules: no division by 0, square roots of numbers ≥ 0, logarithms of numbers > 0.
- The graph of f is a surface; its level curves f(x, y) = k show it from above.
- Close level curves mean steep; level curves never cross.
- A function of three variables has level surfaces f(x, y, z) = k instead of a graph.
Previous lesson: Motion in Space
Next lesson: Limits of Multivariable Functions
Back to the Calculus 3 Index