Chapter 4: Differentiation of Functions of Several Variables
4.1 Functions of Several Variables
Study guide for Calculus Volume 3 (Gilbert Strang, 2016 edition)
Independent study guide. Not affiliated with OpenStax or Rice University.
Big idea
Until now a function took one number and returned one number, and its graph lived in a plane. Most quantities you actually measure depend on more than one input. The temperature in a room depends on three coordinates, the cost of a shipment depends on weight and distance, the height of a hillside depends on how far east and how far north you stand. A function of several variables is the machine that accepts a list of inputs and returns a single number.
Two inputs is the case worth picturing carefully, because it is the last one you can draw. If $z = f(x,y)$, then the set of points $(x, y, f(x,y))$ in space is a surface sitting above (or below) the $xy$-plane. The domain is no longer an interval on a line but a region in the plane, and describing that region is half the work of the first few problems you will meet.
The trick that makes three-dimensional pictures usable on flat paper is slicing. Fix an output value $c$ and ask which inputs produce it. The answer is a curve in the plane called a level curve, and a family of them drawn together is a contour map. Hikers and meteorologists have used this device for a long time: closely spaced contours mean a steep climb, widely spaced contours mean a gentle one, and closed loops shrinking to a point mark a peak or a pit. Every idea in the rest of this chapter, from partial derivatives to the gradient, can be read off a contour map once you know how to look.
With three inputs the graph would need four dimensions, so slicing stops being a convenience and becomes the only option. Setting $f(x,y,z) = c$ produces a level surface, and a function of three variables is understood by the family of surfaces it sorts space into.
Decoder
For a function of two variables, the level curve at value $c$ is the set of input points where the function equals $c$, and it is the shadow cast on the input plane by slicing the graph with the horizontal plane at height $c$.
The word carrying the content is “shadow”. The slice itself happens up in space, where the plane $z = c$ cuts the surface. The level curve is that intersection dropped straight down into the $xy$-plane, so it is drawn with two axes, not three. Confusing the two is the standard mistake: a level curve of $f(x,y) = x^2 + y^2$ is a circle in the plane, not a circle floating at height $c$, and it is certainly not the paraboloid itself.
A second point worth fixing early: different values of $c$ give curves that never cross. A single input point has exactly one output, so it cannot lie on the level curve for $c = 2$ and the level curve for $c = 5$. Contours that appear to touch on a sketch signal an error.
Reading direction takes practice. A contour map records which values occur where, but not which way is uphill, so labels matter. Once labeled, the map tells you the shape: nested loops with increasing labels are a hill, nested loops with decreasing labels are a basin, and curves that separate into two opposing families are the signature of a saddle.
Definitions and results
Function of two variables. A rule $f$ that assigns exactly one real number $f(x,y)$ to each ordered pair $(x,y)$ in a set $D$ of the plane. The set $D$ is the domain and the collection of outputs is the range.
Natural domain. When no domain is stated, take every input for which the formula makes sense: no division by zero, no even root of a negative number, no logarithm of a nonpositive number. The result is usually a region bounded by a curve, and you should say whether the boundary is included.
Graph. The graph of $z = f(x,y)$ is the surface $\{(x,y,f(x,y)) : (x,y) \in D\}$ in space. Each vertical line through the domain meets the surface at most once.
Level curve. For a value $c$ in the range, the level curve is the set of $(x,y)$ in $D$ with $f(x,y) = c$. A contour map is several level curves drawn at evenly spaced values of $c$ and labeled.
Spacing and steepness. With contours drawn at equally spaced values, closely packed curves mean the surface climbs fast and widely separated curves mean it is nearly flat. This is the first appearance of the gradient idea.
Vertical traces. Fixing $x = a$ or $y = b$ instead and letting the other input vary gives a curve on the surface itself. These traces are what partial derivatives measure.
Function of three variables. A rule assigning a number $f(x,y,z)$ to each point of a region in space. Its graph needs four dimensions, so it is described instead by its level surfaces $f(x,y,z) = c$, which fill space without intersecting.
Standard shapes. Quadratic formulas repay memorizing: $x^2 + y^2$ gives circles and a bowl, $x^2 - y^2$ gives hyperbolas and a saddle, $ax + by$ gives parallel straight lines and a tilted plane.
Worked examples
Domain and range of a root
Describe the domain and range of
$$ f(x,y) = \sqrt{25 - x^2 - y^2} $$
The square root demands $25 - x^2 - y^2 \ge 0$, that is $x^2 + y^2 \le 25$. The domain is the closed disk of radius $5$ centered at the origin, boundary circle included.
For the range, note that $x^2 + y^2$ runs over every value from $0$ to $25$ on that disk, so the expression under the root runs over $[0, 25]$ and its square root runs over $[0,5]$. The range is $[0,5]$. The graph is the upper half of a sphere of radius $5$: squaring gives $z^2 = 25 - x^2 - y^2$ with $z \ge 0$.
Contours of an elliptic bowl
Sketch level curves of $f(x,y) = x^2 + 4y^2$ at $c = 0, 4, 16, 36$.
Setting $x^2 + 4y^2 = c$ with $c > 0$ and dividing by $c$ gives
$$ \frac{x^2}{c} + \frac{y^2}{c/4} = 1 $$
an ellipse with $x$-intercepts $\pm\sqrt{c}$ and $y$-intercepts $\pm\sqrt{c}/2$. So $c = 4$ gives intercepts $\pm 2$ and $\pm 1$, $c = 16$ gives $\pm 4$ and $\pm 2$, and $c = 36$ gives $\pm 6$ and $\pm 3$. At $c = 0$ the only solution is the single point at the origin, the bottom of the bowl.
Check one point: $(6,0)$ and $(0,3)$ should sit on the same contour. The formula gives $36 + 0 = 36$ and $0 + 4(9) = 36$. They do. Notice the ellipses crowd together as $c$ grows, since the intercepts grow like $\sqrt{c}$ while the labels grow by fixed steps. The bowl gets steeper as you move out.
Reading a saddle off its contours
Take $f(x,y) = x^2 - y^2$. The level curve at $c = 0$ is $x^2 = y^2$, the pair of lines $y = x$ and $y = -x$. For $c > 0$ the curves $x^2 - y^2 = c$ are hyperbolas opening left and right; for $c < 0$ they open up and down.
Walk out along the $x$-axis and the values $x^2$ increase, so that direction is uphill. Walk along the $y$-axis and the values $-y^2$ decrease, so that direction is downhill. The origin is a low point of one trace and a high point of another, which is exactly what a saddle means. The crossed lines at $c = 0$ are the fingerprint to look for.
A family of level surfaces
For $g(x,y,z) = z - x^2 - y^2$, the level surface at value $c$ is $z - x^2 - y^2 = c$, or
$$ z = x^2 + y^2 + c $$
Every level surface is the same upward paraboloid, shifted vertically by $c$. Through any point of space passes exactly one of them: given $(x_0,y_0,z_0)$, the value $c = z_0 - x_0^2 - y_0^2$ is forced. That is the general principle in miniature, since a point has one output and therefore lies on one level surface.
Practice
These problems ask for the three basic readings: state a domain as a region, identify the range, and match a formula with its level curves or the surface they describe.
Practice
Generated problems for this section, graded instantly.
Quiz
Five items on domains, ranges, level curves, contour maps, and level surfaces.
Quiz
5 problems with a score at the end.