Chapter 4: Differentiation of Functions of Several Variables
4.3 Partial Derivatives
Study guide for Calculus Volume 3 (Gilbert Strang, 2016 edition)
Independent study guide. Not affiliated with OpenStax or Rice University.
Big idea
A function of one variable has one rate of change because there is only one way to move. On a surface there are infinitely many directions to walk, so “the” rate of change is not a single number. The fix is to measure along two standard directions first and build everything else from them later.
Freeze $y$ at a constant and $f(x,y)$ becomes a function of $x$ alone. Differentiate it the way you always have. The result is the partial derivative with respect to $x$, written $f_x$ or $\partial f/\partial x$, and it reports how the output responds when you step east while holding your northing fixed. Freeze $x$ instead and you get $f_y$, the response to a step north. No new differentiation rules are needed. The only new skill is deciding which letters are constants for the duration of the calculation, and that is the step beginners get wrong: in $f(x,y) = x^2 y^3$, the factor $y^3$ is just a number when you differentiate in $x$, so $f_x = 2x y^3$ and not anything involving $3y^2$.
Geometrically, fixing $y = b$ slices the surface with a vertical plane and leaves a curve. The partial derivative $f_x(a,b)$ is the ordinary slope of that curve at the point above $(a,b)$. Two partials give the slopes of two perpendicular trace curves, which is enough to pin down a tangent plane in the next section and, once assembled into the gradient, enough to give the slope in any direction at all.
Differentiating twice is where something genuinely new appears. There are four second-order partials, and the two mixed ones, $f_{xy}$ and $f_{yx}$, are computed in opposite orders. For every function you are likely to meet they come out equal. That is a theorem, not an accident, and it needs continuity to hold.
Decoder
If the mixed second partials of $f$ both exist and are continuous on a disk around a point, then they are equal there: differentiating in $x$ then $y$ gives the same function as differentiating in $y$ then $x$.
The content is in the hypothesis. The conclusion sounds like bookkeeping you could assume, but equality of mixed partials is a real restriction, and functions built to be badly behaved at a single point can violate it. Since polynomials, exponentials, sines, logarithms and their compositions have continuous partials of every order wherever they are defined, in practice you get the equality for free and can differentiate in whichever order is less work.
Note what the statement does not say. It says nothing about $f_{xx}$ and $f_{yy}$, which measure different things and are generally different. And it is about order of differentiation only.
The practical payoff is a free check. Compute $f_{xy}$ and $f_{yx}$ by the two routes and compare. If they disagree on a function assembled from standard pieces, you made an arithmetic error, and the disagreement usually points straight at the term where it happened.
Definitions and results
Partial derivative with respect to $x$. The limit
$$ f_x(a,b) = \lim_{h \to 0} \frac{f(a+h, b) - f(a,b)}{h} $$
when it exists. The second input never moves, so this is a one-variable derivative in disguise.
Partial derivative with respect to $y$. Symmetrically,
$$ f_y(a,b) = \lim_{h \to 0} \frac{f(a, b+h) - f(a,b)}{h} $$
Notation. All of $f_x$, $\partial f/\partial x$, $\partial z/\partial x$ and $D_x f$ name the same object. The rounded symbol $\partial$ signals that other variables are present and being held fixed; a straight $d$ would claim the function has only one input.
Computation rule. To find $f_x$, treat every other variable as a constant and apply the ordinary product, quotient and chain rules to what remains. Anything not containing $x$ differentiates to zero; a factor free of $x$ rides along as a coefficient.
Geometric reading. The plane $y = b$ meets the surface $z = f(x,y)$ in a curve. The number $f_x(a,b)$ is the slope of the tangent line to that curve at the point above $(a,b)$, measured in the $x$-direction. Likewise $f_y(a,b)$ is a slope in the $y$-direction.
Three or more variables. The same freezing rule applies. For $w = f(x,y,z)$ there are three first partials, each computed with the other two variables held constant.
Second-order partials. Differentiating each first partial in each variable gives four functions:
$$ f_{xx} = \frac{\partial^2 f}{\partial x^2}, \quad f_{xy} = \frac{\partial^2 f}{\partial y \, \partial x}, \quad f_{yx} = \frac{\partial^2 f}{\partial x \, \partial y}, \quad f_{yy} = \frac{\partial^2 f}{\partial y^2} $$
In subscript notation the order of differentiation reads left to right: $f_{xy}$ means differentiate in $x$ first. In the fraction notation it reads right to left. The two conventions disagree in appearance and agree in meaning, and the equality theorem makes the clash harmless.
Equality of mixed partials. If $f_{xy}$ and $f_{yx}$ are continuous on an open disk containing $(a,b)$, then $f_{xy}(a,b) = f_{yx}(a,b)$.
Partials do not imply continuity. Unlike the one-variable case, a function can have both partial derivatives at a point and still fail to be continuous there, since the two partials only sample two directions. Repairing this gap is the job of differentiability in the next section.
Worked examples
Freezing one variable
Find both partials of $f(x,y) = x^3 y^2 - 4xy + 7y$ and evaluate them at $(1,2)$.
For $f_x$, treat $y$ as a constant: the first term has coefficient $y^2$, the second has coefficient $-4y$, and the third has no $x$ at all, so it dies:
$$ f_x = 3x^2 y^2 - 4y $$
For $f_y$, treat $x$ as a constant:
$$ f_y = 2x^3 y - 4x + 7 $$
At $(1,2)$: $f_x = 3(1)(4) - 8 = 4$ and $f_y = 2(1)(2) - 4 + 7 = 7$. Check $f_x$ by freezing first: setting $y = 2$ gives the one-variable function $g(x) = 4x^3 - 8x + 14$, and $g'(1) = 12 - 8 = 4$. The two routes agree, as they must, since freezing and then differentiating is the definition.
A chain rule inside a partial
Find both partials of $f(x,y) = \sin(x^2 y)$.
The outer function is sine and the inner function is $x^2 y$. Differentiating in $x$ with $y$ frozen, the inner derivative is $2xy$:
$$ f_x = 2xy \cos(x^2 y) $$
Differentiating in $y$ with $x$ frozen, the inner function is a constant multiple of $y$, so its derivative is $x^2$:
$$ f_y = x^2 \cos(x^2 y) $$
The cosine factor is identical in both, because the outer differentiation never sees which variable you chose. Only the inner factor changes.
Slopes of two trace curves
For $f(x,y) = 9 - x^2 - 2y^2$, find the slopes of the two traces through the point above $(1,1)$.
The partials are $f_x = -2x$ and $f_y = -4y$, so $f_x(1,1) = -2$ and $f_y(1,1) = -4$.
Read this concretely. Slicing with $y = 1$ leaves the curve $z = 7 - x^2$, whose derivative at $x = 1$ is $-2$. Slicing with $x = 1$ leaves $z = 8 - 2y^2$, whose derivative at $y = 1$ is $-4$. Both match. The surface falls away from this point in both directions, and it falls twice as fast to the north as to the east.
Mixed partials by both routes
Let $f(x,y) = x^3 y^2 + \sin(xy)$. Compute $f_{xy}$ and $f_{yx}$.
First partials, using the product rule on the inner function of the sine where needed:
$$ f_x = 3x^2 y^2 + y\cos(xy), \qquad f_y = 2x^3 y + x\cos(xy) $$
Now differentiate $f_x$ with respect to $y$. The first term gives $6x^2 y$. The second is a product of $y$ and $\cos(xy)$, both depending on $y$, so it gives $\cos(xy) + y \cdot (-x\sin(xy))$:
$$ f_{xy} = 6x^2 y + \cos(xy) - xy\sin(xy) $$
Differentiate $f_y$ with respect to $x$ instead. The first term gives $6x^2 y$. The second is a product of $x$ and $\cos(xy)$, giving $\cos(xy) + x\cdot(-y\sin(xy))$:
$$ f_{yx} = 6x^2 y + \cos(xy) - xy\sin(xy) $$
The two agree, which the equality theorem guarantees here since every piece is built from polynomials and sines and so has continuous partials everywhere. For completeness, the pure second partials are $f_{xx} = 6xy^2 - y^2\sin(xy)$ and $f_{yy} = 2x^3 - x^2\sin(xy)$, and these are not equal to each other or to the mixed ones.
Practice
Start with first partials. Identify which variable is frozen, then differentiate with the one-variable rules you already have, including the chain rule when a composition appears.
Practice
Generated problems for this section, graded instantly.
Then go up a level. These ask for second-order and mixed partials, and for the check that the two mixed orders agree.
Practice
Generated problems for this section, graded instantly.
Quiz
Five items on computing first partials, reading them as trace slopes, and second-order and mixed partials.
Quiz
5 problems with a score at the end.