Calculus › Section N · Functions of several variables › Topic N.1
Functions of several variables
Temperature depends on position and time; profit depends on price and volume. When one input is not enough, functions of several variables take over — and level curves and contour maps let you actually see them.
One input is not enough
Most of the functions you have met so far take one number and return another, but the real world rarely cooperates. How cold it feels depends on the temperature and the wind speed; the volume of a cylindrical tank depends on its radius and its height. To model situations like these you need functions of several variables. A function of two variables assigns to each ordered pair \((x, y)\) in a set \(D\) a unique number \(f(x, y)\). The set \(D\) is the domain, the set of output values is the range, \(x\) and \(y\) are the independent variables, and \(z = f(x, y)\) is the dependent variable.
Domains are regions, not intervals
In one variable a domain is a stretch of the number line. With two inputs the domain is a region in the plane, and reading the formula carefully tells you its shape. For \(f(x, y) = \sqrt{25 - x^2 - y^2}\), the expression under the root must be non-negative, so \(x^2 + y^2 \le 25\): the domain is the closed disk of radius 5 centred at the origin. For \(g(x, y) = \frac{1}{x - y}\), the only forbidden points satisfy \(x = y\), so the domain is the whole plane with the line \(y = x\) removed. The usual checks: an even root needs a non-negative inside, a fraction needs a non-zero denominator, and a logarithm needs a positive argument.
Building new functions
Two-variable functions combine exactly as one-variable functions do: you may add, subtract, multiply and divide them, provided the denominator is not zero. A polynomial in two variables adds up terms like \(cx^m y^n\), with whole-number powers, such as \(x^2 + 2xy - y + 3\), and a quotient of two such polynomials is called a rational function. You can also feed a two-variable function into a one-variable one: \(h(x, y) = 16 - 4x^2 - y^2\) followed by \(g(u) = \sqrt{u}\) produces \(g(h(x, y)) = \sqrt{16 - 4x^2 - y^2}\). The domain of such a composition keeps the pairs where \(h\) is defined and where \(h(x, y)\) stays inside the domain of \(g\).
The graph is a surface
The graph of a one-variable function is a curve; the graph of \(z = f(x, y)\) is the set of all points \((x, y, z)\) in space with \(z = f(x, y)\), and that set is a surface. Think of the domain \(D\) as the surface's shadow on the xy-plane: each point of \(D\) has exactly one point of the surface directly above it. That is why the graph of a two-variable function can never fold back over itself. To visualise a surface by hand, use traces: slice it with a horizontal plane \(z = k\) and look at the curve that remains.
Worked example: a hemisphere
Consider \(f(x, y) = \sqrt{25 - x^2 - y^2}\). The domain is the disk \(x^2 + y^2 \le 25\). For the range, the root is never negative and never exceeds 5: \(0 \le z \le 5\). A point on the graph satisfies \(z^2 = 25 - x^2 - y^2\) with \(z \ge 0\), that is \(x^2 + y^2 + z^2 = 25\): the upper hemisphere of a sphere of radius 5. The trace in the plane \(z = 3\) comes from substituting: \(x^2 + y^2 = 25 - 9 = 16\), a circle of radius 4 sitting at height 3. Check: \(f(0, 0) = 5\) and \(f(4, 0) = 3\), a dome rising to 5 at the centre.
Level curves and contour maps
Slicing a surface at height \(c\) and looking straight down gives the level curve \(f(x, y) = c\): the set of input pairs that produce the output \(c\). Drawing several level curves on one xy-plane produces a contour map. Weather maps show level curves of equal pressure, called isobars, and of equal temperature, called isotherms; hiking maps show curves of equal elevation. The spacing carries information. Where level curves sit far apart, the height changes gently; where they crowd together, the surface is steep — exactly as tightly packed lines on a hiking map warn of a cliff. Evenly spaced \(c\)-values make the map easiest to read.
Worked example: sketching a contour map
Sketch level curves of \(f(x, y) = 64 - x^2 - y^2\), a downward-opening paraboloid whose peak value 64 sits at the origin. Setting \(f(x, y) = c\) and rearranging gives \(x^2 + y^2 = 64 - c\), so every level curve is a circle centred at the origin. Using evenly spaced values \(c = 0, 16, 32, 48, 64\), the radii come out as \(8, \sqrt{48} \approx 6.9, \sqrt{32} \approx 5.7, 4\) and 0. The rings sit close together near the rim and spread apart near the top, which tells you the surface climbs steeply at the outside and flattens at the summit, where \(c = 64\) collapses to a single point, the peak itself.
Level surfaces
Add a third input and the level curves grow into level surfaces. For a three-input function \(w = f(x, y, z)\), fixing the output at a constant \(c\) picks out the points of space where \(f(x, y, z) = c\), and that set is called a level surface. With three inputs there is no room left to draw the full graph, so level surfaces are the main way to visualise such functions. For example, the level surfaces of \(f(x, y, z) = x^2 + y^2 + z^2\) are the spheres \(x^2 + y^2 + z^2 = c\) for \(c > 0\), nested shells around the origin. If \(f\) recorded the temperature at each point of a room, its level surfaces would be the three-dimensional cousins of isotherms.
Worked example: a production function
Economists model a workshop's weekly output with a Cobb-Douglas production function, here \(f(x, y) = 50\sqrt{xy}\), where \(x\) is hours of labour, \(y\) is machine-hours, and the constant 50 reflects the workshop's efficiency; the model assumes its technology stays fixed. With \(x = 40\) and \(y = 90\), output is \(50\sqrt{3600} = 3000\) units. Doubling both inputs to \(x = 80\) and \(y = 180\) gives \(50\sqrt{14400} = 6000\), exactly double, because \(\sqrt{2x \cdot 2y} = 2\sqrt{xy}\). The level curves, called isoquants, are the hyperbolas \(xy = k\): every input pair on one hyperbola yields the same output, so the firm can trade labour for machine-hours while production holds steady.
Common mistakes to avoid
The most common slip is treating the domain as an interval rather than a region: describe exactly which pairs are allowed, and sketch the region before moving on. The second is ignoring the range: \(\sqrt{25 - x^2 - y^2}\) can never be negative or exceed 5, so the range is \(0 \le z \le 5\), not all real numbers. The third is confusing a level curve with the graph itself: \(f(x, y) = c\) lives in the xy-plane as the shadow of a slice, while the surface rises above it. Finally, spacing signals steepness only when the \(c\)-values are evenly spaced; with uneven steps, crowded curves can mislead.
Key takeaways
A function of two variables assigns one number \(f(x, y)\) to each pair in a domain \(D\), a region of the plane; \(x\) and \(y\) are independent and \(z\) is dependent. The graph \(z = f(x, y)\) is a surface above its shadow \(D\), explored through traces in planes \(z = k\). Level curves \(f(x, y) = c\), drawn together as a contour map, visualise the function in flat pictures — isobars, isotherms and topographic lines all work this way — with tight spacing meaning steep ground. Functions of three variables are visualised through level surfaces \(f(x, y, z) = c\). Applied models such as the Cobb-Douglas production function put all of this to work.
Flashcards
Flashcard
Assigns one number f(x, y) to each pair (x, y) in a domain D
Test your understanding
Question 1 of 5
What is the domain of f(x, y) = √(49 − x² − y²)?
Question 2 of 5
The level curves of f(x, y) = 100 − x² − y² are what shape?
Question 3 of 5
The graph of a function z = f(x, y) is best described as what?
Question 4 of 5
A workshop's output is modelled by f(x, y) = 50√(xy). If both inputs double, the output is multiplied by what?
Question 5 of 5
On a contour map with evenly spaced c-values, level curves that crowd close together indicate what?
Standards: Beyond AP
