Intuition What this page is for
The parent note told you the rule: f x y = f y x when the mixed partials are continuous. But rules only stick when you have seen them survive every kind of input you can throw at them — and also seen the one place they break.
This page walks a grid of scenarios so that after reading it, no exam question can surprise you: you will already have met a version of it.
Every problem about mixed partials falls into one of these cells. We work at least one example per cell.
#
Case class
What makes it tricky
Example that hits it
A
Polynomial (all signs, positive powers)
pure bookkeeping
Ex 1
B
Product with trig / chain rule
product + chain interact
Ex 2
C
"Which order is cheaper?" (the 80/20 payoff)
choose the easy path
Ex 3
D
Higher order (f xx y = f y xx )
count, don't order
Ex 4
E
Zero / degenerate input (a variable missing)
a partial collapses to 0
Ex 5
F
Word problem (real-world twist, units)
translate physics ↔ math
Ex 6
G
Failure case — discontinuous mixed partial
Clairaut does not apply
Ex 7
H
Exam twist — "find a constant so equality holds"
reverse-engineer a function
Ex 8
Before we start, one reminder in plain words so no symbol is unearned:
Definition The three symbols we use constantly
f x means "==differentiate f with respect to x , pretending y is a frozen number==."
f x y means "do f x first, then differentiate that with respect to y ." (Subscripts read left to right .)
f y x means "do f y first, then differentiate with respect to x ."
Clairaut's promise: when both are continuous near a point, f x y = f y x there.
Worked example Example 1 — signs and powers
Let f ( x , y ) = − 2 x 4 y 3 + 5 x y 2 − y 5 . Verify f x y = f y x .
Forecast: guess now — will the two orders match? (They must, since polynomials are smooth everywhere.)
f x (freeze y ): f x = − 8 x 3 y 3 + 5 y 2 .
Why this step? Differentiate each term in x ; the lone − y 5 has no x , so it vanishes — our first taste of a term dropping out.
f x y (now differentiate that in y ): f x y = − 24 x 3 y 2 + 10 y .
Why this step? ∂ y ( − 8 x 3 y 3 ) = − 24 x 3 y 2 and ∂ y ( 5 y 2 ) = 10 y .
f y (freeze x ): f y = − 6 x 4 y 2 + 10 x y − 5 y 4 .
Why this step? The other order — differentiate the original in y first.
f y x : f y x = − 24 x 3 y 2 + 10 y .
Why this step? ∂ x ( − 6 x 4 y 2 ) = − 24 x 3 y 2 , ∂ x ( 10 x y ) = 10 y , and − 5 y 4 drops.
Verify: f x y = f y x = − 24 x 3 y 2 + 10 y ✅. Sanity spot-check at ( 1 , 1 ) : both give − 24 + 10 = − 14 .
Worked example Example 2 — the twist meets the chain rule
Let f ( x , y ) = x 2 cos ( x y ) . Show the two orders agree.
Forecast: with a product and a chain rule, it feels like the two orders should diverge — bet on your gut before reading.
f x : f x = 2 x cos ( x y ) + x 2 ⋅ ( − sin ( x y )) ⋅ y = 2 x cos ( x y ) − x 2 y sin ( x y ) .
Why this step? Product rule on x 2 and cos ( x y ) ; the chain rule sends ∂ x cos ( x y ) = − y sin ( x y ) .
f x y : differentiate in y .
∂ y [ 2 x cos ( x y )] = − 2 x 2 sin ( x y ) .
∂ y [ − x 2 y sin ( x y )] = − x 2 sin ( x y ) − x 3 y cos ( x y ) (product y ⋅ sin , chain on sin ).
Sum: f x y = − 3 x 2 sin ( x y ) − x 3 y cos ( x y ) .
f y : f y = x 2 ⋅ ( − sin ( x y )) ⋅ x = − x 3 sin ( x y ) .
Why this step? Freeze x ; the x 2 is a constant multiplier now.
f y x : ∂ x [ − x 3 sin ( x y )] = − 3 x 2 sin ( x y ) − x 3 y cos ( x y ) .
Why this step? Product rule on x 3 and sin ( x y ) ; chain gives ∂ x sin ( x y ) = y cos ( x y ) .
Verify: both equal − 3 x 2 sin ( x y ) − x 3 y cos ( x y ) ✅. At ( 1 , 0 ) : sin 0 = 0 , cos 0 = 1 , both give 0 − 1 ⋅ 0 ⋅ 1 = 0 .
Worked example Example 3 — pick the lazy path on purpose
Find f x y for f ( x , y ) = x ln ( 1 + y 2 ) , then confirm by the other order.
Forecast: which order avoids the messy ln derivative longest — x first or y first?
Cheap path — y first (because x appears only as 1/ x , the tame part):
f y = x 1 ⋅ 1 + y 2 2 y = x ( 1 + y 2 ) 2 y .
Why this step? ∂ y ln ( 1 + y 2 ) = 1 + y 2 2 y by chain rule; 1/ x rides along.
Then x : f y x = ∂ x [ 1 + y 2 2 y ⋅ x − 1 ] = − x 2 ( 1 + y 2 ) 2 y .
Why this step? ∂ x x − 1 = − x − 2 ; the y -block is a constant here.
Expensive path — x first (to show the two orders literally match):
f x = ∂ x [ ln ( 1 + y 2 ) ⋅ x − 1 ] = − x 2 ln ( 1 + y 2 ) .
Why this step? Now the whole ln ( 1 + y 2 ) is a constant multiplier; only x − 1 moves.
Then y : f x y = ∂ y [ − x 2 ln ( 1 + y 2 ) ] = − x 2 1 ⋅ 1 + y 2 2 y = − x 2 ( 1 + y 2 ) 2 y .
Why this step? Here we do pay the price — we differentiate the ln on this path. It lands on the exact same expression as Step 2, confirming f x y = f y x .
Verify: both paths give − x 2 ( 1 + y 2 ) 2 y ✅. At ( 2 , 1 ) : − 4 ⋅ 2 2 ⋅ 1 = − 4 1 . Payoff: either order works, so in an exam pick the path (Step 1–2) that never touches the ln derivative until forced.
Worked example Example 4 — three derivatives, three orders
For f ( x , y ) = x 3 y 4 , show f xx y = f x y x = f y xx and give the value.
Forecast: all three should agree — the theorem says only how many x 's and y 's matters (here: two x 's, one y ).
f xx y (order x , x , y ): first f x = ∂ x ( x 3 y 4 ) = 3 x 2 y 4 ; then f xx = ∂ x ( 3 x 2 y 4 ) = 3 ⋅ 2 x 2 − 1 y 4 = 6 x y 4 ; then f xx y = ∂ y ( 6 x y 4 ) = 6 x ⋅ 4 y 3 = 24 x y 3 .
Why this step? Each x -step lowers the x -power by one and multiplies by the old power (x 3 → 3 x 2 → 6 x ), keeping y 4 frozen; only the final step spends the single y -derivative (y 4 → 4 y 3 ).
f x y x (order x , y , x ): f x = 3 x 2 y 4 , then f x y = ∂ y ( 3 x 2 y 4 ) = 12 x 2 y 3 , then f x y x = ∂ x ( 12 x 2 y 3 ) = 24 x y 3 .
Why this step? Same first x -step, but now we hit y in the middle (y 4 → 4 y 3 gives 12 x 2 y 3 ) and finish with x (x 2 → 2 x gives 24 x y 3 ).
f y xx (order y , x , x ): f y = ∂ y ( x 3 y 4 ) = 4 x 3 y 3 , then f y x = ∂ x ( 4 x 3 y 3 ) = 12 x 2 y 3 , then f y xx = ∂ x ( 12 x 2 y 3 ) = 24 x y 3 .
Why this step? Hit y first (y 4 → 4 y 3 ), then differentiate in x twice (x 3 → 3 x 2 , then x 2 → 2 x ).
The pattern: each route rearranges when we spend the single y -derivative, but every route spends one y and two x 's — so by Clairaut they must land in the same place.
Verify: all three = 24 x y 3 ✅. At ( 1 , 1 ) : 24 .
Worked example Example 5 — when a variable is missing
Let f ( x , y ) = 7 x 2 + cos ( 3 x ) − e 2 y . Compute f x y and f y x .
Forecast: notice something — no term contains both x and y . What should a mixed partial of a "separable" sum be?
f x = 14 x − 3 sin ( 3 x ) — depends on x only.
Why this step? Freeze y : the term − e 2 y has no x , so it drops; the x -terms differentiate to 14 x and − 3 sin ( 3 x ) . Notice the result contains no y — this is the seed of what happens next.
f x y = ∂ y ( 14 x − 3 sin ( 3 x )) = 0 .
Why this step? f x turned out to be a function of x alone. An expression with no y in it has zero rate of change as y moves — so its y -derivative is exactly 0 .
f y = − 2 e 2 y — depends on y only.
Why this step? Freeze x : every x -only term (7 x 2 , cos 3 x ) is now a constant and drops; only − e 2 y survives, giving − 2 e 2 y . Again the result contains no x .
f y x = ∂ x ( − 2 e 2 y ) = 0 .
Why this step? f y is a function of y alone, so differentiating it in x gives 0 — mirror image of Step 2.
Verify: f x y = f y x = 0 ✅. General law you just discovered: if f ( x , y ) = g ( x ) + h ( y ) (a separable sum ), the first partial in one variable kills all dependence on the other, so every mixed partial is 0 . That is the degenerate/zero cell of the matrix — Clairaut holds trivially (0 = 0 ).
Worked example Example 6 — heat plate (real-world twist)
A metal plate's temperature is T ( x , y ) = 40 + 3 x 2 y − 2 x y 2 (in ∘ C , with x , y in metres). The quantity T x y measures how the East–West temperature-slope changes as you walk North . Compute it two ways and interpret.
Forecast: the two orders describe physically different-sounding questions ("East-slope's Northward change" vs "North-slope's Eastward change"). Should they give the same number?
T x = 6 x y − 2 y 2 — the East–West slope, in ∘ C / m .
Why this step? Freeze y : the constant 40 drops, ∂ x ( 3 x 2 y ) = 6 x y , ∂ x ( − 2 x y 2 ) = − 2 y 2 . This is the temperature gradient as you step East.
T x y = ∂ y ( 6 x y − 2 y 2 ) = 6 x − 4 y , in ∘ C / m 2 .
Why this step? Now differentiate that East-slope in y : ∂ y ( 6 x y ) = 6 x , ∂ y ( − 2 y 2 ) = − 4 y . It is the rate at which the East-slope changes per metre walked North.
Other order — T y = 3 x 2 − 4 x y , in ∘ C / m .
Why this step? Freeze x : 40 drops, ∂ y ( 3 x 2 y ) = 3 x 2 , ∂ y ( − 2 x y 2 ) = − 4 x y . This is the North–South slope.
T y x = ∂ x ( 3 x 2 − 4 x y ) = 6 x − 4 y .
Why this step? Differentiate the North-slope in x : ∂ x ( 3 x 2 ) = 6 x , ∂ x ( − 4 x y ) = − 4 y . Because T is a smooth polynomial, Clairaut forces this to equal Step 2 — and it does.
Verify: both = 6 x − 4 y ✅. At the point ( 2 m , 1 m ) : 6 ( 2 ) − 4 ( 1 ) = 8 ∘ C / m 2 . The twist of the temperature field is 8 regardless of which walk you take — the physical meaning of Clairaut.
Here we see the only place the two orders disagree — because the hypothesis (continuity of the mixed partial) breaks. The figure below shows the surface: read it before the algebra so you can see where the trouble lives.
Figure (Cell G): the surface f ( x , y ) = x y ( x 2 − y 2 ) / ( x 2 + y 2 ) . The teal curve is the slice along the x -axis (y = 0 ); the plum curve is the slice along the y -axis (x = 0 ). The orange dot is the origin O , where the surface is pinched — the mixed partials fail to be continuous exactly there, and that pinch is what lets the two orders disagree.
Worked example Example 7 — mixed partials differ at the origin
f ( x , y ) = ⎩ ⎨ ⎧ x 2 + y 2 x y ( x 2 − y 2 ) , 0 , ( x , y ) = ( 0 , 0 ) ( x , y ) = ( 0 , 0 ) .
Show f x y ( 0 , 0 ) = − 1 but f y x ( 0 , 0 ) = + 1 .
Forecast: every earlier example matched. Predict whether this one can — and why the origin is special (look at the pinch in the figure).
Find f x ( 0 , y ) from the definition of a partial derivative. The definition is
f x ( 0 , y ) = lim h → 0 h f ( 0 + h , y ) − f ( 0 , y ) .
Why this step? Near the pinch we cannot trust shortcut rules, so we return to the raw definition: "slope in x = rise over run as the run h shrinks to 0 ."
Plug in the formula. For y = 0 , f ( 0 , y ) = 0 (the numerator has a factor x = 0 ), and
f ( h , y ) = h 2 + y 2 h y ( h 2 − y 2 ) .
So the difference quotient is
h f ( h , y ) − 0 = h 2 + y 2 y ( h 2 − y 2 ) .
Why this step? Dividing by h cancels the single power of h in the numerator — that cancellation is why the limit will exist cleanly.
Take h → 0 . As h → 0 , h 2 → 0 , so
f x ( 0 , y ) = 0 + y 2 y ( 0 − y 2 ) = y 2 − y 3 = − y .
Why this step? Letting the run shrink to zero gives the exact slope; the messy quotient collapses to the tidy function f x ( 0 , y ) = − y .
Differentiate that in y : f x y ( 0 , 0 ) = ∂ y [ f x ( 0 , y ) ] y = 0 = ∂ y ( − y ) = − 1 .
Why this step? f x y means "do x first (Steps 1–3), then y " — and − y has y -derivative − 1 .
Repeat with the roles of x , y swapped — writing the limit out in full. By definition,
f y ( x , 0 ) = lim k → 0 k f ( x , 0 + k ) − f ( x , 0 ) .
For x = 0 , f ( x , 0 ) = 0 (numerator has a factor y = 0 ), and
f ( x , k ) = x 2 + k 2 x k ( x 2 − k 2 ) , so k f ( x , k ) − 0 = x 2 + k 2 x ( x 2 − k 2 ) .
Letting k → 0 (so k 2 → 0 ):
f y ( x , 0 ) = x 2 + 0 x ( x 2 − 0 ) = x 2 x 3 = + x .
Then f y x ( 0 , 0 ) = ∂ x [ f y ( x , 0 ) ] x = 0 = ∂ x ( x ) = + 1 .
Why this step? Swapping x ↔ y turns the factor x 2 − y 2 into x 2 − k 2 with the opposite overall sign pattern — that built-in sign flip is exactly what makes f y ( x , 0 ) = + x where f x ( 0 , y ) = − y , and hence the two orders come out with opposite signs.
Verify: f x y ( 0 , 0 ) = − 1 = f y x ( 0 , 0 ) = 1 ✅. As the figure shows, the surface has a pinched twist at the origin — the mixed partial is not continuous there, so Clairaut's admission price is unpaid. See Continuity of Multivariable Functions for why that discontinuity is the real culprit.
Common mistake "But both partials exist — shouldn't they be equal?"
Existence is not enough. Clairaut needs continuity of the mixed partials, not mere existence. Here they exist everywhere yet jump at the origin, and that jump is exactly what lets − 1 = + 1 .
Before the example, one piece of vocabulary so nothing is unearned:
Definition "Exact" — the term we need for Cell H
A pair of functions ( P , Q ) is called an exact pair (an exact differential ) when there is a single "parent" function f ( x , y ) whose partials rebuild them: P = f x and Q = f y . In plain words: P and Q are the two slopes of one surface. The test for whether such a parent f can exist is precisely Clairaut's equality P y = Q x — because if P = f x and Q = f y , then P y = f x y must equal Q x = f y x . (More on solving these in Exact Differential Equations .)
Worked example Example 8 — reverse-engineer equality
For which constant a is the pair ( P , Q ) = ( a x y 2 , x 2 y ) an exact pair — i.e. the two slopes P = f x , Q = f y of some single function f ( x , y ) ?
Forecast: a parent f exists only if the "twist" is consistent. Which theorem enforces that?
Apply the exactness test. If P = f x and Q = f y , Clairaut forces P y = f x y = f y x = Q x . So we need P y = Q x .
Why this step? Clairaut is the gatekeeper : a valid parent f can only exist when ∂ y P = ∂ x Q .
Compute both sides: P y = ∂ y ( a x y 2 ) = 2 a x y ; Q x = ∂ x ( x 2 y ) = 2 x y .
Why this step? Differentiate P in y (y 2 → 2 y ) and Q in x (x 2 → 2 x ) to get the two "twists" we must match.
Set equal and solve: 2 a x y = 2 x y for all x , y ⇒ 2 a = 2 ⇒ a = 1 .
Why this step? The equation must hold for every ( x , y ) , so match the coefficient of the identical monomial x y : 2 a = 2 .
Build the parent f to confirm. With a = 1 we need f x = x y 2 and f y = x 2 y . The function f = 2 1 x 2 y 2 works: f x = ∂ x ( 2 1 x 2 y 2 ) = x y 2 ✅ and f y = ∂ y ( 2 1 x 2 y 2 ) = x 2 y ✅.
Why this step? Producing an actual parent f proves the pair really is exact, not just that the test passed.
Verify: with a = 1 , P y = Q x = 2 x y ✅ and the parent f = 2 1 x 2 y 2 regenerates both slopes ✅. The answer is a = 1 . This is why Clairaut underpins both the Hessian Matrix being symmetric and the exactness test for Higher Order Partial Derivatives .
Recall One-line recap of every cell
Poly (A) — trig/chain (B) — cheaper order (C) — higher order counts (D) — separable sum gives 0 (E) — physical twist with units (F) — discontinuous ⇒ − 1 = 1 (G) — solve for a via P y = Q x (H).
Ex 5 discovered: what are all mixed partials of a separable sum g ( x ) + h ( y ) ? All zero.
In the failure case, what are f x y ( 0 , 0 ) and f y x ( 0 , 0 ) ? − 1 and + 1 .
In Ex 8, which constant makes ( a x y 2 , x 2 y ) an exact pair? a = 1 (from P y = Q x ).
Why can Ex 7 break Clairaut even though both partials exist? The mixed partials are not continuous at the origin.
What does it mean for ( P , Q ) to be an "exact" pair? There is one function f with P = f x and Q = f y ; the test is P y = Q x .