Multivariable Calculus — MathsTricks & Calculus

Partial Derivatives
Differentiation in Multiple Dimensions

Extend single-variable differentiation to functions of two or more variables. Learn ∂f/∂x and ∂f/∂y, higher-order and mixed partials, Clairaut’s Theorem, and the geometric meaning of slopes on a surface.

12 Worked Examples 10-Question Quiz 1 500+ Words Clairaut’s Theorem Tangent Planes
Share this page

§ 01The Big Idea — What Is a Partial Derivative?

A function of two variables f(x, y) lives on a surface in three dimensions. A partial derivative measures the slope of that surface in one specific direction while everything else stays frozen.

In single-variable calculus, the derivative f′(x) tells you the instantaneous rate of change of f as x varies. When we have a function of two variables, f(x, y), the function has infinitely many directions in which it can change. Rather than try to capture all of them at once, we pick one variable and ask: “how does f change as x increases, with y held perfectly still?” The answer is the partial derivative with respect to x, written ∂f/∂x.

The formal definition mirrors the single-variable limit definition of a derivative — the only difference is that the other variable is treated as a constant throughout:

Definition — Partial Derivative with respect to x
∂f/∂x  =  limh→0   [f(x+h, y) − f(x, y)] / h
Definition — Partial Derivative with respect to y
∂f/∂y  =  limh→0   [f(x, y+h) − f(x, y)] / h

In practice, you never have to use these limit definitions directly. Computing a partial derivative is identical to computing an ordinary derivative, with one simple rule: when differentiating with respect to x, treat every occurrence of y as if it were a numeric constant (and vice versa).

The Geometric Picture

Picture a hilly surface z = f(x, y). If you stand at the point (a, b, f(a,b)) and walk in the x-direction only (keeping y fixed at b), you trace a curve. The slope of that curve at your feet is exactly ∂f/∂x evaluated at (a, b). Likewise, walking in the y-direction gives the slope ∂f/∂y. Together, these two slopes determine the orientation of the tangent plane to the surface at that point — one of the most important geometric objects in multivariable calculus.

§ 02Notation — All the Ways to Write a Partial Derivative

Partial derivatives appear in several equivalent notations. You will see all of them in textbooks and need to be comfortable with each.

NotationReads asNotes
∂f/∂x “partial f, partial x” Most common. The symbol ∂ (a rounded d) flags a partial derivative.
fx “f sub x” Compact subscript notation. Very common in analysis and PDE texts.
∂f/∂y “partial f, partial y” The partial with respect to y — x treated as constant.
fy “f sub y” Subscript notation for the y partial.
∂²f/∂x² “second partial in x” Differentiate twice with respect to x. Also written fxx.
∂²f/∂y∂x “mixed partial, y then x” Differentiate first w.r.t. x, then w.r.t. y. Also written fxy.
✦ Reading Mixed Partial Notation Carefully In the subscript notation fxy, the order of operations is left-to-right: differentiate first with respect to x, then with respect to y. In the Leibniz notation ∂²f/∂y∂x, read right-to-left: x first, then y. Both mean the same operation. Clairaut’s Theorem (§ 05) explains why the order usually does not affect the answer.

§ 03Computing First Partial Derivatives — 8 Worked Examples

The only skill required is treating the other variable as a constant. Every differentiation rule you know — power rule, product rule, chain rule — applies unchanged.

Example 01 — Polynomial in Two Variables
Find fx and fy for f(x,y) = x³y + 2xy² − 5y³
fx
Treat y as a constant. Differentiate term by term:
d/dx(x³y) = 3x²y,   d/dx(2xy²) = 2y²,   d/dx(−5y³) = 0
fx = 3x²y + 2y²
fy
Now treat x as a constant. Differentiate term by term:
d/dy(x³y) = x³,   d/dy(2xy²) = 4xy,   d/dy(−5y³) = −15y²
fy = x³ + 4xy − 15y²
fx = 3x²y + 2y²    fy = x³ + 4xy − 15y²
Example 02 — Exponential and Trigonometric
Find ∂f/∂x and ∂f/∂y for f(x,y) = exy sin(y)
∂f/∂x
sin(y) is constant w.r.t. x, so the chain rule only touches exy:
d/dx(exy) = y exy  (chain rule, inner derivative is y)
∂f/∂x = y exysin(y)
∂f/∂y
Product rule on exysin(y) — both factors involve y:
= (d/dy exy)sin(y) + exy(d/dy sin(y))
= x exysin(y) + exycos(y)
∂f/∂y = exy(x sin(y) + cos(y))
∂f/∂x = y exysin(y)    ∂f/∂y = exy(x sin(y) + cos(y))
Example 03 — Natural Logarithm
Find fx and fy for f(x,y) = ln(x² + y²)
fx
Chain rule: d/dx[ln(u)] = (1/u) ∂u/∂x where u = x²+y²
∂u/∂x = 2x
fx = 2x / (x²+y²)
fy
Same chain rule, ∂u/∂y = 2y
fy = 2y / (x²+y²)
fx = 2x/(x²+y²)    fy = 2y/(x²+y²)
Example 04 — Quotient of Two Variables
Find ∂f/∂x and ∂f/∂y for f(x,y) = (x² + 1) / (xy + 2)
∂f/∂x
Quotient rule with y constant. Let u = x²+1, v = xy+2:
u′ = 2x, v′ = y (w.r.t. x)
∂f/∂x = (2x(xy+2) − (x²+1)y) / (xy+2)²
= (2x²y + 4x − x²y − y) / (xy+2)² = (x²y + 4x − y) / (xy+2)²
∂f/∂y
x²+1 is constant w.r.t. y; only denominator changes. Rewrite as (x²+1)(xy+2)−1:
∂f/∂y = (x²+1) · (−1)(xy+2)−2 · x
= −x(x²+1) / (xy+2)²
∂f/∂x = (x²y + 4x − y)/(xy+2)²    ∂f/∂y = −x(x²+1)/(xy+2)²
Example 05 — Evaluating at a Point
For f(x,y) = x²y − 3xy³, find fx(2, 1) and fy(2, 1)
Find fx
fx = 2xy − 3y³
Evaluate
fx(2,1) = 2(2)(1) − 3(1)³ = 4 − 3 = 1
Find fy
fy = x² − 9xy²
Evaluate
fy(2,1) = (2)² − 9(2)(1)² = 4 − 18 = −14
fx(2,1) = 1    fy(2,1) = −14

§ 04Higher-Order Partial Derivatives — Second and Mixed Partials

Just as we can differentiate f′(x) again to get f″(x), we can differentiate partial derivatives to get second-order partials. A function of two variables has four second-order partials.

The Four Second-Order Partial Derivatives
fxx = ∂²f/∂x²    (differentiate fx again w.r.t. x)
fyy = ∂²f/∂y²    (differentiate fy again w.r.t. y)
fxy = ∂²f/∂y∂x   (differentiate fx w.r.t. y)
fyx = ∂²f/∂x∂y   (differentiate fy w.r.t. x)

The first two (fxx and fyy) are called pure second partials. The last two (fxy and fyx) are called mixed partials. Each measures how the slope in one direction changes as we move in the same or a different direction.

Example 06 — All Four Second-Order Partials
Find all four second-order partials of f(x,y) = x³y² + 4x²y
First partials
fx = 3x²y² + 8xy    fy = 2x³y + 4x²
fxx
Differentiate fx w.r.t. x: fxx = 6xy² + 8y
fyy
Differentiate fy w.r.t. y: fyy = 2x³
fxy
Differentiate fx = 3x²y²+8xy w.r.t. y: fxy = 6x²y + 8x
fyx
Differentiate fy = 2x³y+4x² w.r.t. x: fyx = 6x²y + 8x
fxy = fyx = 6x²y + 8x  —  the mixed partials are equal. ✓

§ 05Clairaut’s Theorem — Why Mixed Partials Are Equal

✦ Clairaut’s Theorem (Symmetry of Second Derivatives) If f(x, y) is defined on an open disk D and both mixed partials fxy and fyx are continuous on D, then:

fxy(x, y)  =  fyx(x, y)    for all (x, y) in D

In plain English: if the mixed partials are both continuous, it does not matter in which order you differentiate — you get the same answer. This is true for the overwhelming majority of functions you will encounter at undergraduate level (all polynomials, exponentials, trig functions, and their combinations).

Clairaut’s theorem is enormously useful. It means you can choose whichever order of mixed differentiation looks simpler. It also underlies the structure of Hessian matrices (used to classify critical points) and is a key hypothesis in the theory of exact differential equations.

Example 07 — Verifying Clairaut’s Theorem
Verify that fxy = fyx for f(x,y) = sin(xy) + x²y
fx
fx = y cos(xy) + 2xy
fxy
Differentiate fx w.r.t. y:
d/dy[y cos(xy)] = cos(xy) + y(−sin(xy))·x = cos(xy) − xy sin(xy)
d/dy[2xy] = 2x
fxy = cos(xy) − xy sin(xy) + 2x
fy
fy = x cos(xy) + x²
fyx
Differentiate fy w.r.t. x:
d/dx[x cos(xy)] = cos(xy) + x(−sin(xy))·y = cos(xy) − xy sin(xy)
d/dx[x²] = 2x
fyx = cos(xy) − xy sin(xy) + 2x
fxy = fyx = cos(xy) − xy sin(xy) + 2x  ✓

§ 06Geometric Meaning — Slopes on a Surface & the Tangent Plane

Partial derivatives are not just algebraic gadgets. They have a precise geometric interpretation that connects back to the slope of a tangent line — now in 3D.

Slopes of Traces

When we fix y = b and let x vary, the surface z = f(x, y) is “sliced” by the plane y = b, producing a curve called a trace. The partial derivative fx(a, b) is exactly the slope of the tangent line to this trace at the point (a, b, f(a,b)). Similarly, fy(a, b) is the slope of the trace obtained by fixing x = a.

The Tangent Plane Equation

The two trace slopes together determine the equation of the tangent plane at (a, b, f(a,b)):

Equation of the Tangent Plane to z = f(x,y) at (a, b)
z  =  f(a,b)  +  fx(a,b) (x−a)  +  fy(a,b) (y−b)

This formula is the 2D analogue of the tangent line y = f(a) + f′(a)(x−a). It is the foundation of linear approximation in multivariable calculus (the linearisation of f near (a, b)), and it feeds directly into the gradient vector and directional derivatives that follow in the next topic.

Example 08 — Finding a Tangent Plane
Find the equation of the tangent plane to z = x² + y² at the point (1, 2, 5)
Partials
fx = 2x  →  fx(1,2) = 2
fy = 2y  →  fy(1,2) = 4
Verify z
f(1,2) = 1 + 4 = 5 ✓
Apply formula
z = 5 + 2(x−1) + 4(y−2) = 5 + 2x − 2 + 4y − 8
Tangent plane:  z = 2x + 4y − 5
Example 09 — Tangent Plane to an Exponential Surface
Find the tangent plane to f(x,y) = xey at the point (2, 0)
Partials
fx = ey  →  fx(2,0) = e&sup0; = 1
fy = xey  →  fy(2,0) = 2e&sup0; = 2
Base value
f(2,0) = 2e&sup0; = 2
Tangent plane
z = 2 + 1·(x−2) + 2·(y−0)
Tangent plane:  z = x + 2y

§ 07Partial Derivatives of Functions of Three or More Variables

The same rule extends without change to functions of three, four, or any number of variables. When finding ∂f/∂x, treat every variable except x as a constant.

Example 10 — Three-Variable Function
Find all three first partial derivatives of f(x,y,z) = x²yz − 3xz² + y²z
∂f/∂x
Treat y, z as constants: 2xyz − 3z²
∂f/∂y
Treat x, z as constants: x²z + 2yz
∂f/∂z
Treat x, y as constants: x²y − 6xz + y²
∂f/∂x = 2xyz − 3z²   ∂f/∂y = x²z + 2yz   ∂f/∂z = x²y − 6xz + y²
Example 11 — Ideal Gas Law Application
The ideal gas law gives pressure P = nRT/V. Find ∂P/∂T and ∂P/∂V (treating n and R as constants)
∂P/∂T
V is constant: P = (nR/V)T, so
∂P/∂T = nR/V
Meaning: increasing temperature at fixed volume increases pressure proportionally.
∂P/∂V
T is constant: P = nRT · V−1, so
∂P/∂V = −nRT/V²
Meaning: increasing volume at fixed temperature decreases pressure (negative derivative).
∂P/∂T = nR/V     ∂P/∂V = −nRT/V²
Example 12 — Higher-Order Mixed Partial in Three Variables
For f(x,y,z) = x²y sin(z), find fxyz
fx
2xy sin(z)
fxy
Differentiate w.r.t. y: 2x sin(z)
fxyz
Differentiate w.r.t. z: 2x cos(z)
fxyz = 2x cos(z)

§ 08What Comes Next — Related Topics

Partial derivatives are the gateway to all of multivariable calculus. Once you are confident with ∂f/∂x and ∂f/∂y, every topic below builds directly on them.

§ 09Common Mistakes — What to Watch Out For

⚠ Mistake 1 — Differentiating the Frozen Variable When computing ∂f/∂x, every y term is a constant. The derivative of a constant is zero. For example: d/dx(y³) = 0, not 3y². This is the single most common error in partial differentiation.
⚠ Mistake 2 — Forgetting the Chain Rule with the Other Variable If the “constant” variable appears inside a composite function, you still need the chain rule. For example, d/dx(exy) = y exy, not just exy. The inner function’s partial derivative (here, y) must be included.
⚠ Mistake 3 — Confusing fxy Notation In subscript notation, fxy means “first differentiate with respect to x, then with respect to y.” In Leibniz notation ∂²f/∂y∂x, you read right-to-left (x first, then y). Both express the same operation. Know both conventions.
⚠ Mistake 4 — Assuming Mixed Partials Always Equal Each Other Clairaut’s Theorem requires both mixed partials to be continuous. There exist pathological functions where fxy ≠ fyx at a single point of discontinuity. For all standard functions you will encounter, however, continuity holds and the theorem applies.
✦   ✦   ✦

§ 10Test Your Knowledge — 10-Question Quiz

Select your answer and click Submit. Correct answers light up green; wrong answers reveal the right choice with a full explanation.

Score: 0 / 0
Question 1 of 10
Find ∂f/∂x for f(x,y) = x³y + 2xy²
Question 2 of 10
Find ∂f/∂y for f(x,y) = x³y + 2xy²
Question 3 of 10
For f(x,y) = e2xy, find ∂f/∂x
Question 4 of 10
What does Clairaut’s Theorem guarantee about fxy and fyx?
Question 5 of 10
For f(x,y) = x²y³, find fxx
Question 6 of 10
The tangent plane to z = f(x,y) at (a,b) uses the values of which two partial derivatives?
Question 7 of 10
For f(x,y) = ln(x² + y²), find fx
Question 8 of 10
For f(x,y) = x²y³, find the mixed partial fxy
Question 9 of 10
Evaluate fx(1, −1) for f(x,y) = x²y − 3xy³
Question 10 of 10
The tangent plane to z = x² + y² at (1, 2, 5) is:

Cookie Settings