MULTIVARIABLE CALCULUS • PARTIAL DERIVATIVES

Clairaut's Theorem — Use Clairaut's theorem for mixed partials

Discover why the order of partial differentiation doesn't matter for smooth functions.

Historical Context & Motivation

When you first learn about derivatives, you work with functions of a single variable — slope at a point on a curve. But real-world quantities often depend on more than one input. The temperature in a room depends on position and time; the pressure of a gas depends on temperature and volume. Mathematicians in the 1700s began asking: when you take partial derivatives with respect to different variables, does the order in which you differentiate change the answer?

This question led to one of the most elegant and practical results in multivariable calculus: Clairaut's Theorem. Named after the French mathematician Alexis Claude Clairaut, it guarantees that — under reasonable conditions — mixed partial derivatives are equal regardless of the order of differentiation. The theorem saves enormous effort in computation and forms the backbone of many advanced results in physics and engineering.

1713
Alexis Clairaut Born
Clairaut was a child prodigy born in Paris. He read his first paper to the French Academy of Sciences at age 13 and became one of the youngest members ever elected.
1740
Clairaut's Theorem Published
Clairaut formally stated that for functions with continuous second-order partial derivatives, the mixed partials are equal. This result appeared in his work on the shape of the Earth.
1823
Schwarz's Rigorous Proof
German mathematician Hermann Schwarz provided a rigorous proof with precisely stated continuity conditions. The result is sometimes called the Schwarz theorem or the symmetry of second derivatives.
1900s
Widespread Use in Physics
Clairaut's Theorem became essential in thermodynamics (Maxwell relations), electromagnetism, and fluid dynamics — anywhere mixed partial derivatives appear in physical laws.

The central question Clairaut answered is deceptively simple: if you have a function f(x, y) and you first differentiate with respect to x, then with respect to y, do you get the same result as differentiating first with respect to y, then x? As we will see, the answer is yes — provided the mixed partials are continuous.

Core Principles & Definitions

Before diving into the theorem itself, let's make sure the foundational vocabulary is solid. A partial derivative measures how a multivariable function changes when you vary one input while holding all the others constant. If f(x, y) is a function of two variables, the partial derivative with respect to x is written ∂f/∂x, and it treats y as a constant during differentiation.

1

Partial Derivative

The derivative of a multivariable function with respect to one variable, treating all other variables as constants. Written as ∂f/∂x or fx.
2

Mixed Partial Derivative

A second-order derivative where you differentiate with respect to two different variables. For example, ∂²f/∂y∂x means: first differentiate with respect to x, then with respect to y.
3

Continuity Condition

Clairaut's Theorem requires that the second-order mixed partials be continuous on the region in question. Most functions you encounter in practice satisfy this condition.
4

Equality of Mixed Partials

When the continuity condition holds, ∂²f/∂x∂y = ∂²f/∂y∂x. The order of differentiation does not matter — this is the core statement of Clairaut's Theorem.
⚠️ Notation Alert
Watch the order carefully! In the notation ∂²f/∂y∂x, you differentiate with respect to x first (rightmost), then y (leftmost). In subscript notation, fxy means differentiate with respect to x first, then y. The subscript order reads left to right, while the fraction notation reads right to left.
KEY TAKEAWAY
Think of mixed partial derivatives like driving directions. Imagine you need to go 3 blocks east and 2 blocks north. Whether you go east first then north, or north first then east, you end up at the same destination. Clairaut's Theorem says the same thing about differentiation: for well-behaved functions, the final answer is the same no matter which variable you differentiate first.

Visual Explanation

The diagram below illustrates the two paths to a mixed partial derivative. Starting from the original function f(x, y), you can follow either branch — differentiating first with respect to x or first with respect to y — and Clairaut's Theorem guarantees that both paths lead to the same result.

Two differentiation paths from f(x, y) to a mixed second partial. Path A (cyan) differentiates with respect to x first, then y. Path B (pink) differentiates with respect to y first, then x. The green dashed line shows that both results are equal.

Notice that the two boxes at the bottom contain different-looking expressions — ∂²f/∂y∂x on the left and ∂²f/∂x∂y on the right — yet Clairaut's Theorem tells us they evaluate to the same function. This symmetry is not obvious from the notation alone, which is why the theorem is so powerful: it lets you choose whichever differentiation order is computationally easier, knowing the result will be the same.

Mathematical Framework

Let's formalize what Clairaut's Theorem says and break down the notation. Understanding the precise statement will help you apply it with confidence.

CLAIRAUT'S THEOREM
If f(x, y) has continuous second partial derivatives, then f_xy = f_yx equivalently: ∂²f/∂y∂x = ∂²f/∂x∂y
fxy means: differentiate f with respect to x first, then with respect to y. fyx means: differentiate f with respect to y first, then with respect to x.
SUBSCRIPT NOTATION
f_xy = ∂/∂y ( ∂f/∂x ) and f_yx = ∂/∂x ( ∂f/∂y )
Read subscript notation left to right: fxy differentiates with respect to x, then y. In fraction notation ∂²f/∂y∂x, read right to left: differentiate with respect to x first (innermost), then y.
EXAMPLE COMPUTATION
f(x, y) = x³y² + 2xy → f_x = 3x²y² + 2y → f_xy = 6x²y + 2
First we treat y as a constant and differentiate with respect to x. Then we treat x as a constant and differentiate the result with respect to y.
VERIFICATION (OTHER ORDER)
f(x, y) = x³y² + 2xy → f_y = 2x³y + 2x → f_yx = 6x²y + 2
Now we differentiate with respect to y first, then x. The result is 6x²y + 2 — identical to fxy, confirming Clairaut's Theorem.

The key condition is that the second-order mixed partial derivatives must be continuous in a neighborhood of the point where you are evaluating them. In practice, this means the function should be "smooth" — no sharp corners, jumps, or undefined patches. Polynomial, exponential, trigonometric, and logarithmic functions (where defined) all meet this requirement.

Detailed Breakdown & Surface Visualization

To build deeper intuition, consider what mixed partial derivatives measure geometrically. The first partial ∂f/∂x tells you the slope of the surface z = f(x, y) in the x-direction. When you then take ∂/∂y of that slope, you are measuring how fast that x-slope changes as y varies. Clairaut's Theorem says this cross-rate of change is the same whether you measure the x-rate of the y-slope or the y-rate of the x-slope.

A 3D surface z = x²y with tangent slopes at a point. The pink arrow shows the x-slope (∂f/∂x), and the amber arrow shows the y-slope (∂f/∂y). The mixed partial measures how each slope changes as the other variable moves.

For the function f(x, y) = x²y shown in the diagram, the first partials are fx = 2xy and fy = x². The mixed partials are fxy = 2x and fyx = 2x — indeed equal, just as the theorem predicts.

Verification of Clairaut's Theorem for common functions
Function f(x, y)f_xyf_yxEqual?
x³y² + 2xy6x²y + 26x²y + 2✓ Yes
sin(xy)cos(xy) − xy sin(xy)cos(xy) − xy sin(xy)✓ Yes
ex+yex+yex+y✓ Yes
x²y³ − 4xy6xy² − 46xy² − 4✓ Yes

Worked Example

Let's work through a complete example using Clairaut's Theorem to verify that the mixed partials of a function are equal, and then use the theorem to simplify a computation.

Verify Clairaut's Theorem for f(x, y) = x²sin(y) + 3xy²
1
Step 1 — Find f_x (differentiate with respect to x, treating y as constant)Differentiate each term with respect to x: the derivative of x²sin(y) is 2x sin(y) (since sin(y) is constant with respect to x), and the derivative of 3xy² is 3y².
fx = 2x sin(y) + 3y²
2
Step 2 — Find f_xy (differentiate f_x with respect to y)Now differentiate fx with respect to y: the derivative of 2x sin(y) with respect to y is 2x cos(y), and the derivative of 3y² with respect to y is 6y.
fxy = 2x cos(y) + 6y
3
Step 3 — Find f_y (differentiate with respect to y, treating x as constant)Go back to the original function and differentiate with respect to y: the derivative of x²sin(y) is x²cos(y), and the derivative of 3xy² is 6xy.
fy = x²cos(y) + 6xy
4
Step 4 — Find f_yx (differentiate f_y with respect to x)Differentiate fy with respect to x: the derivative of x²cos(y) is 2x cos(y), and the derivative of 6xy is 6y.
fyx = 2x cos(y) + 6y
5
Step 5 — Compare and ConcludeWe found fxy = 2x cos(y) + 6y and fyx = 2x cos(y) + 6y. Since both mixed partials are equal, Clairaut's Theorem is confirmed. Both expressions are continuous everywhere, so the continuity condition is satisfied.
f_xy = f_yx = 2x cos(y) + 6y ✓
💡 Pro Tip
In many problems, one order of differentiation is easier than the other. If you need to find fxy and differentiating with respect to y first gives a simpler expression, Clairaut's Theorem lets you compute fyx instead and get the same answer. This can save you a lot of algebra!

When Clairaut's Theorem Applies (and When It Doesn't)

Clairaut's Theorem is remarkably reliable, but it's important to understand its boundaries. The theorem requires continuity of the mixed partial derivatives. For the vast majority of functions you encounter in a calculus course — polynomials, rational functions (where defined), trigonometric, exponential, and logarithmic functions — this condition is automatically met.

When does Clairaut's Theorem apply?
SituationDoes the theorem apply?Why?
Polynomial function✓ AlwaysAll partial derivatives of polynomials are continuous everywhere.
Trigonometric function✓ AlwaysSine, cosine, and their derivatives are continuous everywhere.
e raised to a polynomial✓ AlwaysExponential functions and their derivatives are continuous everywhere.
Piecewise-defined function⚠ MaybeMust check continuity of mixed partials at the boundary between pieces.
Function with a discontinuity✗ No (at that point)If the mixed partials are discontinuous, the theorem fails and f_xy ≠ f_yx is possible.
PRACTICAL RULE
If you can write the function using a formula involving standard operations (addition, multiplication, powers, trig, exponentials, logs), and there are no division-by-zero issues or piecewise definitions near your point of interest, then Clairaut's Theorem will apply. In a typical high school or undergraduate calculus course, you can safely assume the theorem holds for every function you are asked to work with, unless the problem specifically tells you otherwise.

Extension to Higher Dimensions & Advanced Theory

Clairaut's Theorem extends naturally beyond two variables. If you have a function f(x, y, z), the theorem tells you that any pair of mixed partials can be swapped. For instance, fxz = fzx, fyz = fzy, and fxy = fyx, provided the relevant mixed partials are continuous. Moreover, for third-order and higher derivatives, you can rearrange the differentiation order freely.

Clairaut's Theorem in 2 variables vs. higher dimensions
ConceptClairaut's Theorem (2 variables)Extended Version (3+ variables)
Statementf_xy = f_yxf_xy = f_yx, f_xz = f_zx, f_yz = f_zy, etc.
Number of mixed pairs1 pair3 pairs for 3 variables, 6 for 4, etc.
Higher-order extensionf_xxy = f_xyx = f_yxxAny permutation of differentiation gives the same result
Applications2D optimization, exact equationsThermodynamics (Maxwell relations), electromagnetism, PDEs

In physics, Clairaut's Theorem plays a central role in thermodynamics through the Maxwell relations, which connect quantities like temperature, entropy, pressure, and volume. It also appears in differential equations, where testing whether a differential equation is exact requires checking the equality of certain mixed partials — a direct application of Clairaut's Theorem. These connections will become important if you go on to study AP Physics, engineering, or advanced mathematics.

Practice Problems

Test your understanding with these five problems, arranged from conceptual to challenging. Try each problem on your own before checking the answer.

PROBLEM 1CONCEPTUAL
In your own words, what does Clairaut's Theorem guarantee about a smooth function f(x, y)? What condition must the function satisfy for the theorem to apply?
PROBLEM 2BASIC CALCULATION
Let f(x, y) = 4x³y − 5xy⁴. Compute fxy and fyx and verify they are equal.
PROBLEM 3INTERMEDIATE
Let f(x, y) = e2x cos(y). Find ∂²f/∂y∂x. Then, using Clairaut's Theorem, state the value of ∂²f/∂x∂y without computing it from scratch.
PROBLEM 4APPLIED
The temperature T at a point on a metal plate is given by T(x, y) = 100 − x² − 2y², where x and y are in centimeters and T is in degrees Celsius. Compute both mixed partials Txy and Tyx. Interpret what the result means physically.
PROBLEM 5CRITICAL THINKING
Suppose you know that for a certain function g(x, y), the partial derivative gx = 3x²y + ey and gy = x³ + xey + 2y. Use Clairaut's Theorem to determine whether these two expressions could genuinely come from the same function g(x, y). Explain your reasoning.

Lesson Summary

Clairaut's Theorem states that for a function f(x, y) with continuous second-order mixed partial derivatives, the order of differentiation does not matter: f_xy = f_yx. This means ∂²f/∂y∂x = ∂²f/∂x∂y. The theorem applies to all polynomials, trigonometric, exponential, and logarithmic functions (where they are defined), which covers virtually every function encountered in standard calculus courses.

Named after the French mathematician Alexis Claude Clairaut (1713–1765), the theorem allows you to choose the computationally easier differentiation order when finding mixed partials, and it serves as a consistency check for verifying partial derivative computations. It extends to functions of three or more variables and forms the foundation for advanced results in thermodynamics (Maxwell relations), differential equations (exactness tests), and mathematical analysis.

Varsity Tutors • Multivariable Calculus • Clairaut's Theorem — Use Clairaut's theorem for mixed partials