Calculus · Functions of several variables
The temperature in a room depends on where you stand: \(T = f(x, y, z)\). How fast does it change if you step east? If you step north? What if you move diagonally while time passes? Partial derivatives answer the first questions, the differential combines them, and the chain rule handles variables that themselves depend on other variables. This post builds all three from one simple idea: change one variable at a time, then add up the effects.
Let \( f(\xi_1, \xi_2, \dots, \xi_n) \) be a function of \(n\) variables. There are two natural ways to change its arguments.
In general, the total increment is not the sum of the partial increments. For \( f(x, y) = xy \):
\[ \Delta_xf = y\,\Delta x, \qquad \Delta_yf = x\,\Delta y, \qquad \Delta f = (x + \Delta x)(y + \Delta y) - xy = y\,\Delta x + x\,\Delta y + \Delta x\,\Delta y. \]There is an extra term \( \Delta x\,\Delta y \): the effect of both changes acting together. The point of the differential (Section 4) is that this "interaction" is negligibly small for small increments.
How to compute it: treat all the other variables as constants and differentiate as usual. Nothing new is needed: all the rules for functions of one variable apply.
Geometric meaning (for \(z = f(x, y)\)): fix \(y = y_0\). The plane \(y = y_0\) cuts the surface along a curve, and \( \frac{\partial f}{\partial x}(x_0, y_0) \) is the slope of that curve, the steepness of the surface "in the \(x\)-direction". Similarly \( \frac{\partial f}{\partial y} \) is the slope in the \(y\)-direction.
Common notations: \( \frac{\partial f}{\partial x} = f_x = f'_x = \partial_xf \).
Partial derivatives are again functions of all the variables, so they can be differentiated again. The \(k\)-th partial derivative with respect to \(\xi_i\) is the first partial derivative, with respect to \(\xi_i\), of the \((k-1)\)-th one. We may also switch variables along the way, which gives mixed derivatives:
\[ \frac{\partial^2 f}{\partial x^2} = \frac{\partial}{\partial x}\Big(\frac{\partial f}{\partial x}\Big), \qquad \frac{\partial^2 f}{\partial y\,\partial x} = \frac{\partial}{\partial y}\Big(\frac{\partial f}{\partial x}\Big), \qquad \frac{\partial^2 f}{\partial x\,\partial y} = \frac{\partial}{\partial x}\Big(\frac{\partial f}{\partial y}\Big). \]For one variable, \( \Delta f = f'(x)\,\Delta x + o(\Delta x) \): near a point, the function is almost linear. Differentiability in several variables asks for the same thing, with all variables moving at once.
Two things are worth unpacking.
In the example \(f = xy\) above: \( df = y\,dx + x\,dy \), and the remainder \( \Delta x\,\Delta y \) satisfies \( |\Delta x\,\Delta y| \le \frac12\rho^2 \), so it is indeed \(o(\rho)\).
Geometrically, for \(z = f(x, y)\), the differential is the increment along the tangent plane: differentiability means the surface looks like a plane when you zoom in.
For small increments,
\[ \Delta f \approx df, \qquad\text{that is}\qquad f(\xi_1 + \Delta\xi_1, \dots, \xi_n + \Delta\xi_n) \approx f(\xi_1, \dots, \xi_n) + \sum_{i=1}^n\frac{\partial f}{\partial\xi_i}\,\Delta\xi_i. \tag{2} \]When \(\xi_1, \dots, \xi_n\) are independent variables, their increments \(d\xi_i\) are constants, and differentiating \(df\) again gives the second differential. For two variables:
\[ d^2f = \frac{\partial^2 f}{\partial x^2}dx^2 + 2\frac{\partial^2 f}{\partial x\,\partial y}dx\,dy + \frac{\partial^2 f}{\partial y^2}dy^2. \]This looks like \( (a + b)^2 \), and that is no accident. In general the \(k\)-th differential can be written symbolically as
\[ d^kf = \Big(\sum_{i=1}^n d\xi_i\,\frac{\partial}{\partial\xi_i}\Big)^{(k)}f, \]meaning: expand the \(k\)-th power formally as a polynomial, then read each "product" \( \frac{\partial}{\partial\xi_i}\frac{\partial}{\partial\xi_j}\cdots \) as the corresponding partial derivative of \(f\). (Schwarz's theorem is what allows us to treat the operators as commuting, like ordinary numbers.)
Often the variables are not independent: the position \((x, y)\) of a moving object depends on time, or we switch to polar coordinates. Then \(u = f(\xi_1, \dots, \xi_n)\) becomes a function of the new variables, and we want its derivatives with respect to them.
How to read it: \(\eta_k\) influences \(u\) through every intermediate variable \(\xi_i\). Along each path, the rates multiply ("how much \(\xi_i\) moves per unit \(\eta_k\)" times "how much \(u\) moves per unit \(\xi_i\)"), and the contributions of all paths add up.
Why it holds: by differentiability, \( \Delta u = \sum\frac{\partial u}{\partial\xi_i}\Delta\xi_i + o(\rho) \). Change only \(\eta_k\), divide by \(\Delta\eta_k\), and let it tend to zero: each \( \frac{\Delta\xi_i}{\Delta\eta_k} \to \frac{\partial\xi_i}{\partial\eta_k} \), and the remainder vanishes. This is exactly where differentiability of \(f\) (not just existence of partial derivatives) is needed.
A beautiful consequence: formula (1), \( df = \sum\frac{\partial f}{\partial\xi_i}d\xi_i \), remains valid even when the \(\xi_i\) are differentiable functions of new variables, as long as \(d\xi_i\) is then understood as the differential of \(\xi_i\). You can write the differential without caring whether the variables are independent.
| Concept | Formula / statement |
|---|---|
| Partial derivative | \( \frac{\partial f}{\partial\xi_i} = \lim\frac{\Delta_{\xi_i}f}{\Delta\xi_i} \): other variables held constant |
| Mixed derivatives | \( f_{xy} = f_{yx} \) if they are continuous (Schwarz) |
| Differentiability | \( \Delta f = \sum a_i\Delta\xi_i + o(\rho) \); guaranteed by continuous partials |
| Differential | \( df = \sum\frac{\partial f}{\partial\xi_i}d\xi_i \), \( \Delta f \approx df \) |
| \(k\)-th differential | \( d^kf = \big(\sum d\xi_i\frac{\partial}{\partial\xi_i}\big)^{(k)}f \) (independent variables) |
| Chain rule | \( \frac{\partial u}{\partial\eta_k} = \sum_i\frac{\partial u}{\partial\xi_i}\frac{\partial\xi_i}{\partial\eta_k} \) |
| Invariance | \(df\) has the same form for dependent variables; \(d^2f\) does not |
Try each one before opening the solution. More solved problems from this topic are in Limits.
\( f_x = \frac1y e^{x/y} \), \( f_y = -\frac{x}{y^2}e^{x/y} \).
\( u_x = \frac{2x}{x^2 + y^2} \), \( u_{xx} = \frac{2(y^2 - x^2)}{(x^2 + y^2)^2} \); by symmetry \( u_{yy} = \frac{2(x^2 - y^2)}{(x^2 + y^2)^2} \). The sum is \(0\). (This is Laplace's equation; its solutions are called harmonic functions.)
\( f = x^y \) at \((1, 3)\): \( f = 1 \), \( f_x = yx^{y-1} = 3 \), \( f_y = x^y\ln x = 0 \). So \( df = 3\cdot 0.02 + 0\cdot 0.01 = 0.06 \) and the estimate is \(1.06\). Exact: \(1.0614\).
\( f_{xx} = f_{yy} = 0 \), \( f_{xy} = 1 \), so \( d^2f = 2\,dx\,dy \). This is twice the corner term \( \Delta x\,\Delta y \) from Figure 1.
Differentiate both sides with respect to \(t\), using the chain rule on the left: \( xf_x(tx, ty) + yf_y(tx, ty) = kt^{k-1}f(x, y) \). Now put \(t = 1\). Check with \( f = x^2 + xy \) (\(k = 2\)): \( x(2x + y) + y\cdot x = 2x^2 + 2xy = 2f \).
\( d = \sqrt{x^2 + y^2} = 10 \), \( \Delta d \approx \frac{x\,\Delta x + y\,\Delta y}{d} = \frac{0.6 - 0.4}{10} = 0.02 \).
Everything in this post grows from a single habit: change one variable at a time. Doing it once gives a partial derivative; doing it repeatedly gives higher derivatives, whose order doesn't matter when they are continuous. Adding the one-variable effects gives the differential, which is accurate exactly when the function is differentiable, so the joint effect of simultaneous changes is negligible. Following the effects through intermediate variables gives the chain rule. Together they are the toolkit for every later topic in several variables: tangent planes, extrema, and changes of variables in multiple integrals.
Related posts: limits and continuity in several variables, and the differential of a function of one variable.