Hexa Scholar

Partial derivatives and the tangent plane

A surface \(z = f(x, y)\) can rise in one direction and fall in another. How do you measure its slope at a point?

Move in one direction at a time. Hold \(y\) fixed and the surface becomes a curve in \(x\); the slope of that curve is the partial derivative \(f_x\). Hold \(x\) fixed instead and you get \(f_y\). Stage 1 asks you to estimate both from a contour map before the page shows the two curves; the later stages build a plane from the two slopes and prove when it fits the surface.

A rounded hill seen from above, with five contour lines drawn as nested closed ellipses. A hiker stands on the middle contour line, drawn thicker than the others. A bright straight path runs from the hiker up to the summit at the center.
A hiker on a hill. The straight path climbs from the hiker to the summit, so along it the ground rises. The thick path is the contour line through the hiker, and the elevation stays constant along it. So the slope at one point depends on the direction you walk. \(f_x\) and \(f_y\) are the slopes in two such directions.
Before you start · 3 quick checks on derivatives, tangent lines and level curves, about 3 min
Setup: functions of two variables

A function of two variables \(f\) gives a number \(f(x, y)\) for each point \((x, y)\) of a region of the plane. Its graph is the surface \(z = f(x, y)\): above the point \((x, y)\) it has height \(f(x, y)\).

A level curve, or contour, of \(f\) is the set of points where \(f(x, y) = c\) for one number \(c\). A contour map draws level curves for equally spaced heights \(c\), like the height lines on a hiking map: where they crowd together, the surface is steep.

Partial derivatives. Let \((a, b)\) be a point of the region with an open disk around it that also lies in the region. The partial derivatives of \(f\) at \((a, b)\) are

\[ \begin{aligned} &f_x(a, b) \\ &= \lim_{h \to 0} \frac{f(a+h, b) - f(a, b)}{h}, \end{aligned} \] \[ \begin{aligned} &f_y(a, b) \\ &= \lim_{k \to 0} \frac{f(a, b+k) - f(a, b)}{k}, \end{aligned} \]

when these limits exist and are real numbers. They are also written \(\partial f/\partial x\) and \(\partial f/\partial y\). So \(f_x(a, b)\) is the ordinary derivative at \(x = a\) of the slice \(x \mapsto f(x, b)\), the curve in which the vertical plane \(y = b\) cuts the graph, and \(f_y(a, b)\) is the derivative at \(y = b\) of the slice \(y \mapsto f(a, y)\). To compute \(f_x\), treat \(y\) as a constant and differentiate in \(x\): for \(f(x, y) = x^3y^2\), \(f_x = 3x^2y^2\) and \(f_y = 2x^3y\).

The plane of the two slopes. When \(f_x(a, b)\) and \(f_y(a, b)\) exist, the plane

\[ \begin{aligned} z = f(a, b) &+ f_x(a, b)(x - a) \\ &+ f_y(a, b)(y - b) \end{aligned} \]

passes through the point \((a, b, f(a, b))\) of the graph, and its slices \(y = b\) and \(x = a\) are the tangent lines of the two slices of the graph. When \(f\) is differentiable at \((a, b)\), a condition defined in stage 3, this plane is called the tangent plane at \((a, b)\). Every function in stages 1 and 2 is a polynomial, and stage 3 shows that polynomials are differentiable at every point.

Reading slopes on a contour map

Suppose the contours are drawn every 0.5 in height, and move to the right near a point \(P\). Between two neighboring contours that you cross one after the other, a horizontal distance \(d\) apart, the slice changes by exactly 0.5 in height, so its average slope over that stretch is \(0.5/d\) when the heights increase and \(-0.5/d\) when they decrease. For a function with continuous partial derivatives, the mean value theorem makes the average slope over a short stretch close to \(P\) close to \(f_x(P)\), so the spacing \(d\) of the contours next to \(P\) gives \(|f_x(P)| \approx 0.5/d\). Moving up instead of right gives \(f_y(P)\) in the same way.

The slice figures in stage 1 use the same scale on both axes, so a slope of 1 is drawn at 45° and every slope you see is the true one.

1 See

Estimate two slopes from a contour map

Each goal shows a contour map of a function \(f\) on a square and marks a point \(P\) with a cross. A more strongly shaded band is higher. Estimate \(f_x(P)\), the slope as you move right from \(P\), and \(f_y(P)\), the slope as you move up, with the two sliders, then press Check my slopes. The page then cuts the graph along the two lines through \(P\) and draws both slices with your slopes and the true ones.

How the estimates are scored
2 Try

How close is the tangent plane?

A prediction first; the explorer opens when you have answered it.

The explorer opens when you have answered the question above.

3 Prove

Continuous partial derivatives give a tangent plane

Definition: differentiable at a point

Let \(f\) be defined on an open disk around \(P = (a, b)\), and write \(r = \sqrt{h^2 + k^2}\) for the length of a step \((h, k)\). The function \(f\) is differentiable at \(P\) when there are numbers \(m\) and \(n\) such that the error

\[ \begin{aligned} e(h, k) &= f(a+h, b+k) \\ &\quad - f(a, b) - mh - nk \end{aligned} \]

satisfies \(e(h, k)/r \to 0\) as \((h, k) \to (0, 0)\). Then \(m = f_x(a, b)\) and \(n = f_y(a, b)\): take \(k = 0\), so \(r = |h|\), and the condition gives \(\big(f(a+h, b) - f(a, b)\big)/h\) \(- m \to 0\). The plane \(z = f(a, b) + m(x - a)\) \(+ n(y - b)\) is then the tangent plane, and the error of the plane is small even compared with the length of the step.

Theorem

Let \(f\) be defined on an open disk of radius \(\rho \gt 0\) around \(P = (a, b)\). Suppose \(f_x\) and \(f_y\) exist at every point of this disk and are continuous at \(P\). For a step \((h, k) \ne (0, 0)\) with \(r = \sqrt{h^2 + k^2} \lt \rho\), let

\[ \begin{aligned} E(h, k) &= f(a+h, b+k) \\ &\quad - f(a, b) - f_x(a, b)h \\ &\quad - f_y(a, b)k, \end{aligned} \]

the error of the plane of the two slopes above the point \((a+h, b+k)\). Then

\[ \frac{E(h, k)}{r} \to 0 \]

as \((h, k) \to (0, 0)\), so \(f\) is differentiable at \(P\). In particular, a polynomial in \(x\) and \(y\) has polynomial partial derivatives, which are continuous, so it is differentiable at every point.

Facts the proof uses. The mean value theorem for a function of one variable; a function with a derivative at a point is continuous there; the triangle inequality; and \(|h| \le r\), \(|k| \le r\).

Build the proof one line at a time; each line has one correct choice. A wrong option is a false claim: either a claim about all steps \((h, k)\), or a rule stated for a whole class of functions (every such \(f\), with partial derivatives on the disk that are continuous at \(P\), or a wider class), which some function in that class breaks.

What does not follow

Partial derivatives alone do not give a tangent plane

Let \(g(x, y) = \dfrac{xy}{x^2 + y^2}\) for \((x, y) \ne (0, 0)\) and \(g(0, 0) = 0\). On both axes \(g = 0\), so \(g_x(0, 0) = g_y(0, 0) = 0\), and away from \((0, 0)\) both partial derivatives exist by the usual rules. But \(g(t, t) = \tfrac12\) for every \(t \ne 0\): arbitrarily close to the origin the graph is at height \(\tfrac12\), so \(g\) is not even continuous at \((0, 0)\), and no plane fits it there. The theorem does not apply, because \(g_x\) is not continuous at \((0, 0)\): \(g_x(0, t) = 1/t\) for \(t \ne 0\).

Partial derivatives in finance

In the Black–Scholes model, hold a European call's strike, volatility and interest rate fixed. Its price \(V(t, S)\) then depends on the time \(t\) and the stock price \(S\), and before expiry, for \(t \lt T\) and \(S \gt 0\), it has continuous partial derivatives. Two of them, \(\Theta = \partial V/\partial t\) and \(\Delta = \partial V/\partial S\), are among the Greeks, and the tangent plane at such a point gives the first-order estimate \(\Delta V \approx \Theta\,\Delta t + \Delta\,\Delta S\) for small moves. The Greeks lesson adds the second-order term in \(S\) that this plane leaves out.

4 Apply

Problems

Each problem has hints and a full solution. Exact answers are graded exactly: type whole numbers, exact decimals such as 0.5 or fractions such as 1/2, and separate the numbers with a comma where a problem asks for two. Where an answer is rounded (P4), the accepted error is stated.

Key point To find \(f_x\), hold \(y\) fixed and differentiate in \(x\); to find \(f_y\), hold \(x\) fixed. Near a point where \(f\) is differentiable, \(f(a+h, b+k) \approx f(a, b)\) \(+ f_x(a, b)h + f_y(a, b)k\), with an error that is small compared with the length of the step. A horizontal tangent plane needs \(f_x = f_y = 0\).
Level Intro (Calculus III) Prerequisites What a derivative measures when you zoom in: derivatives as slopes, tangent lines Time ~40 min

Related: Why the chain rule multiplies, for functions of one variable, and The Greeks, where the partial derivatives of an option price get their names.

Further reading