Functions of two variables and partial derivatives
A function of two variables, f(x, y), can be pictured by its graph, the surface z = f(x, y), found slice by slice, or by a contour plot: its level curves f(x, y) = c, the graph sliced by horizontal planes, like a topographic map. Close contours mean a steep graph. The partial derivative ∂f/∂x is the rate of change of f when only x changes: the slope of the slice y = constant. To compute it, treat y as a constant; for f = x³y + y², f_x = 3x²y and f_y = x³ + 2y.
So far the course has done geometry in space: vectors, planes, motions. Calculus is about functions, and the next unit, about three weeks, studies functions of several variables and their derivatives (transcript, p. 1).
A function of two variables gives a number f(x,y) for each pair of values x, y, for example f(x,y)=x2+y2 (transcript, p. 1). Like functions of one variable, some are only defined on part of the plane: y needs y≥0, 1/(x+y) needs x+y=0 (p. 1). Real-world examples depend on more variables still: the temperature at a place depends on longitude and latitude, on elevation, and on time (p. 1). The course mostly uses two or three variables, because they can be pictured, but the tools (partial derivatives, the gradient) work the same in any number (p. 1).
The graph of f is the surface z=f(x,y): above each point (x,y) of the plane, the point at height f(x,y) (transcript, p. 1; notes, p. 1). To draw it by hand, slice it with coordinate planes (p. 1; notes, p. 1).
f(x,y)=−y: the graphz=−y is a plane. In the yz-plane it is a line going down with slope 1, and changing x changes nothing, so the plane contains the x-axis (p. 1).
f(x,y)=1−x2−y2: the slice x=0 is the downward parabolaz=1−y2, the slice y=0 is z=1−x2, and the graph meets the xy-plane where x2+y2=1, the unit circle. It is a surface of revolution about the z-axis, a dome (pp. 1–2).
On a computer, z=x2+y2 is the same shape opening upwards, a bowl, and z=y2−x2 is a saddle: an upward parabola in the yz-plane and a downward one in the xz-plane (p. 2; notes, p. 1). But pictures of surfaces are hard to draw and to read (p. 2).
A contour plot is a map instead: it draws in the xy-plane the level curves where f takes fixed values, usually evenly spaced (transcript, p. 2; notes, p. 1):
It is the graph sliced by the horizontal planes z=c, with all slices pressed flat onto one map (p. 2). Walking along a level curve keeps your height constant, which is exactly what a topographic map shows; a coloured temperature map works the same way, with the boundaries between colours as level curves (p. 2; notes, p. 1). Reading the value of f at a point from the nearby curves is much faster than from a graph (p. 2).
f=−y: the level curvef=c is the horizontal line y=−c. The lines are evenly spaced, because f changes at a constant rate as y changes, and nothing happens along x (p. 2).
f=1−(x2+y2): the level 0 is the unit circle, the level 1 is the single point at the origin, the level −1 the circle of radius 2≈1.4, the level −2 radius 3≈1.7, the level −3 radius 2 (p. 3). Concentric circles show a surface of revolution, and circles getting closer together show it getting steeper: the top is flat, the sides steep (p. 3).
Loading graph…
Contour plot of f(x,y)=1−x2−y2, computed from the level curves x2+y2=1−c: circles of radius 1, 2, 3 and 2 for f=0,−1,−2,−3. The value of f drops by 1 from each circle to the next, and the circles crowd together as the dome gets steeper.
The contour plot of x2+y2 looks the same; only the labels show that it increases outwards (p. 3). For y2−x2 the level 0 is the two diagonal lines y=±x, crossing at the saddle point like the paths that stay level through a mountain pass (p. 3).
Moving east–west on the map changes x, moving north–south changes y. A contour plot shows at once whether f increases or decreases (transcript, p. 3; notes, p. 1). In the lecture's sketch, at a point (x0,y0) on the level f=1 with the level 2 to the right and above, increasing x (or y) increases f, and decreasing it decreases f (p. 3). To say how fastf changes, we need derivatives (p. 3).
For a function of one variable, f′(x)=df/dx is the limit of Δf/Δx, the slope of the tangent line to the graph, and it gives the approximationf(x)≈f(x0)+f′(x0)(x−x0) (transcript, p. 3). With two variables we can change x, or y, or both, and f responds differently to each. So there is one derivative per variable, written with the curly ∂ ("partial"), not d and not Δ (pp. 3–4; notes, p. 1):
partial f over partial x, times ( x nought, y nought ) equals the limit as capital delta x goes to 0 of the quantity f of the quantity x nought plus capital delta x, y nought, minus f( x nought, y nought ), all over the quantity capital delta x
y does not change at all; ∂f/∂y is defined the same way with x fixed and y changing (p. 4). The function is differentiable when these exist, which is the case for most functions in the course (p. 4).
Geometrically, fixing y=y0 slices the graph by a vertical plane parallel to the xz-plane. The slice is a curve, and ∂f/∂x is the slope of its tangent line; ∂f/∂y is the slope of the slice x=x0 (p. 4; notes, p. 1).
Loading graph…
The slice y=0.5 of the dome z=1−x2−y2 is z=0.75−x2, computed from the formula. Its tangent line at x0 has slope ∂f/∂x=−2x0: zero at the top, and steeper further out.
To compute, treat y as a constant and differentiate in x; for fy the other way round. The notations∂f/∂x and fx mean the same (p. 4; notes, p. 1). The lecture's example (p. 4; notes, p. 1):
An example
f(x,y)=x3y+y2:fx=3x2y,fy=x3+2y
In words
f(x, y) equals x cubed y plus y squared : f sub x equals 3 x squared y, f sub y equals x cubed plus 2 y
In fx, x3 times the constant y gives 3x2y, and y2 is a constant with derivative 0; in fy, x3 is the constant factor (p. 4).
Worked example
Partial derivatives and a first estimate
Let f(x,y)=x2y+3y2. (a) Find fx and fy at (1,2). (b) Estimate f(1.1,2) from fx, and compare with the exact value. (c) Describe the level curvef=14 near (1,2): if x increases a little, must y increase or decrease to stay on it?
(a) Treat the other variable as a constant
fx=2xy, which is 2⋅1⋅2=4 at (1,2). fy=x2+6y, which is 1+12=13. And f(1,2)=2+12=14.
(b) Change only x
Moving Δx=0.1 with y fixed, f changes by about fxΔx=4×0.1=0.4: f(1.1,2)≈14.4. Exactly, f(1.1,2)=1.21×2+12=14.42.
(c) Staying on the level curve
Both partial derivatives are positive, so increasing x raises f and increasing y raises it too. To keep f=14 when x increases, y must decrease: the level curve slopes downwards through (1,2), as in the lecture's sketch.
The vector of a function's partial derivatives; it points the way the function increases fastest, and its length is that fastest rate. Explained in Graphs, straight lines and slope.
The value a quantity gets closer and closer to, as near as we like, as its input approaches some value, without having to reach it. Explained in Rates of change and area under a graph.
Having a derivative: at that point the graph has a single, definite, non-vertical tangent line, with no corner or break. Explained in The mean value theorem and inequalities.
The puzzle of why the cosmic microwave background has the same temperature in all directions, though those regions were never in contact. Explained in Inflation.
The spread of light or other radiation over its wavelengths, or the full set of values a quantity such as energy can take. Explained in Light and the electromagnetic spectrum.
How fast one quantity changes compared with another, often time: the change in the first divided by the change in the second. Explained in Rates of change and area under a graph.
Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).