Clairaut's Theorem on Mixed Partials
Take a function of two variables. Differentiate first with respect to , then . Now reverse the order: differentiate first with respect to , then . Do you get the same answer? For essentially every function encountered in a first pass through calculus — polynomials, exponentials, trigonometric combinations — the answer is yes. This fact is used silently and constantly. Clairaut's Theorem (also called Schwarz's Theorem) explains exactly why. It isolates the one hypothesis that makes it true: continuity of the mixed partial derivatives themselves. This matters far beyond bookkeeping convenience. The symmetry of mixed partials is what makes the Hessian Matrix symmetric. This in turn allows the spectral theorem to diagonalize it. That lets us classify critical points as maxima, minima, or saddles. It is what makes exact differential equations exact. It is what makes a vector field conservative when its curl vanishes. It is what makes the multivariable Taylor's Theorem in Several Variables expansion collapse into a clean symmetric polynomial in the increments. Without this symmetry, second-order calculus in several variables would be a much messier subject. Then and would carry genuinely different information. The subtlety is that the theorem is not a triviality about swapping limits. Mixed partial derivatives can fail to agree. Concrete counterexamples exist among functions that are otherwise perfectly smooth away from one point. The proof has to actually work for this failure to be excludable. It does so through a clever double application of the Mean Value Theorem to a second difference quotient. This is followed by a careful limit argument that uses continuity of the mixed partials in an essential way. This article gives the precise statement and a complete proof via the double-difference-quotient method. It includes a worked example where the two iterated derivatives are computed independently and compared. It also gives the classical counterexample showing that continuity of the mixed partials cannot be dropped. We also address the subtlety of directional order. Finally, we cover the difference between existence and continuity of partial derivatives.
- Clairaut's Theorem says at a point, provided both mixed partials exist near that point and are continuous there.
- The proof uses a second-order difference quotient and the Mean Value Theorem applied twice, in two different orders.
- Continuity of the mixed partials is the hypothesis that forces the two orders of differentiation to converge to the same limit.
- Without continuity, mixed partials can genuinely disagree — a classical rational function built from demonstrates this.
- The result underlies the symmetry of the Hessian Matrix and the exactness conditions in vector calculus and differential equations.
- Key idea: continuity of and near a point forces them to be equal there, via a symmetric double difference quotient.
Where this lives today
The symmetry of mixed partials is quietly load-bearing across mathematics and its applications. In multivariable calculus itself, it is what guarantees the Hessian Matrix of second partial derivatives is symmetric, which is essential for applying the spectral theorem to classify critical points via eigenvalues in optimization theory. In vector calculus, it is precisely the identity behind for any sufficiently smooth scalar potential , and behind the exactness test for differential equations , which requires . In physics, Maxwell's relations in thermodynamics (e.g., ) are direct applications of Clairaut's Theorem to a thermodynamic potential's mixed partial derivatives, encoding deep physical symmetries as calculus identities. In differential geometry, the symmetry of the Hessian underlies the symmetry of the Riemann curvature tensor in special cases and the commutativity of mixed covariant derivatives on flat connections. In numerical analysis and machine learning, symmetric-Hessian assumptions justify Newton's method formulations and quasi-Newton optimization algorithms (BFGS and its relatives), where a non-symmetric approximate Hessian would signal a bug or a genuine failure of smoothness. In signal processing and PDE theory, it justifies interchanging the order of differentiation when deriving the wave equation, heat equation, and other second-order partial differential equations from physical first principles.
Ask the tutor: How does the symmetry of mixed partials generalize to the equality of higher-order partial derivatives under all permutations of differentiation order?
Let be an open set and let be a function. Fix . The first-order partial derivatives of , when they exist, are the functions
If and exist throughout a neighborhood of , we may attempt to differentiate them again. The second-order mixed partial derivatives at are
i.e. means "differentiate with respect to first, then ," and means "differentiate with respect to first, then ." (Notation varies: some authors use for what we call — always check the convention in context.) These two numbers, and , are defined by entirely different limiting processes and there is no a priori reason for them to coincide.
Intuition
Think of as describing the height of a landscape. The partial derivative measures the slope walking in the -direction; measures the slope walking in the -direction. The mixed partial asks: "as I move slightly in the -direction, how does the -slope change?" The other mixed partial asks the mirror question: "as I move slightly in the -direction, how does the -slope change?" These sound like they should be measuring the same underlying "twist" in the surface, and generically they do — but each is built from a different order of limiting operations, so agreement is a genuine theorem, not a formality. The key combinatorial object in the proof is a second difference
built from the four corners of a small rectangle with vertices , , , . Dividing by and pushing estimates both mixed partials simultaneously, because can be analyzed as an iterated difference quotient in either order. The proof shows both orders converge to the same limit when the mixed partials are continuous.
Statement and Proof
Let be open and let . Suppose satisfies: 1. The partial derivatives and exist at every point of some open neighborhood of ; 2. The mixed second partial derivatives and exist at every point of ; 3. Both and are continuous at the point . Then
Setup. Since is open, choose so that the closed square . For with and , define the second difference
We will compute in two different ways — one that produces and one that produces — and show both limits equal the same value. This will force .
Step 1: A single-variable auxiliary function. Fix as above. Define by
By hypothesis (1), exists throughout , so is differentiable on with
Observe that
Since is differentiable (hence continuous) on the closed interval between and , the Mean Value Theorem applies: there exists strictly between and (so depends on ) such that
Step 2: A second application of the Mean Value Theorem. Fix this and define by
By hypothesis (2), exists throughout (in particular at every point with between and , since the relevant slice of ), so is differentiable with . Applying the Mean Value Theorem again, there is strictly between and such that
Combining with Step 1:
where lies strictly between and , and lies strictly between and . In particular, as , we have .
Step 3: Taking the limit using continuity of . By hypothesis (3), is continuous at . Since as (squeezed because and ), continuity gives
This limit is over jointly tending to (with ), and the value does not depend on the path of approach — this is precisely what we must exploit next by comparing with the other iterated computation.
Step 4: The symmetric computation, in the other order. Now redo Steps 1–3 with the roles of and swapped: define , note , apply the Mean Value Theorem to get some between with
then apply the Mean Value Theorem to — wait, more precisely to — obtaining some between with
Hence
with as . By continuity of at (hypothesis 3),
Step 5: Conclusion. Both Step 3 and Step 4 compute — the same quantity, since was defined independently of any differentiation order. A limit of a function of as , when it exists, is unique. Therefore
∎
Proof technique remark. This is the classical double mean value theorem argument (sometimes attributed to Schwarz). It is non-circular: it uses only the single-variable Mean Value Theorem (a one-variable result about differentiable functions on an interval, requiring no prior multivariable machinery) and the definition of continuity, never any fact equivalent to or built on top of the symmetry we are proving.
Worked examples
Example 1: Verifying Clairaut's Theorem directly on an asymmetric function. Let
We compute both mixed partials at the point and confirm they agree — chosen with asymmetric exponents and mixed transcendental terms so no shortcut hides an error. Compute then :
Now differentiate with respect to :
(Using the product rule on : ; and .) At : , , so
So
Compute then :
Now differentiate with respect to :
(Using the product rule on : ; and .) At , this is identical term-by-term to the expression for above:
Indeed as functions here (both equal everywhere), consistent with the theorem since is built from polynomials, exponentials, and trigonometric functions — all of whose partial derivatives of every order are continuous everywhere on . The hypotheses of Clairaut's Theorem are satisfied at every point, not just , which is why equality holds identically rather than coincidentally at one point.
Example 2: Using symmetry to shortcut a computation. Suppose we are told and asked for , but computing first (which involves the and terms interacting) is more work than computing first. Since is a composition/product/quotient of functions with continuous partial derivatives of all orders on the region (the quotient has denominator never zero), Clairaut's Theorem guarantees everywhere, so we may instead compute .
Differentiating with respect to :
At : ; ; ; .
By Clairaut's Theorem, as well, with no need to redo the (messier) direct computation through .
The counterexample: why continuity of the mixed partials is essential
Define by
We show and exist everywhere (satisfying hypothesis 1 of the theorem globally), and exist everywhere including at the origin (satisfying hypothesis 2), yet
This shows the conclusion fails at — exactly the point where, as we verify, and fail to be continuous, isolating hypothesis 3 as indispensable.
Away from the origin, is a quotient of polynomials with nonvanishing denominator , so it is smooth (all partial derivatives of all orders exist and are continuous) there by the standard quotient and product rules.
At the origin, compute directly from the definition:
since . Similarly .
Computing for (needed to then differentiate in ): for fixed ,
so by the quotient rule,
At : numerator , denominator , so
So in fact for all (including , checked separately above). Therefore
Computing for by the symmetric quotient rule computation (swap roles of ; note , i.e. is antisymmetric under swapping its arguments, which we can exploit): since , we get by symmetry considerations, or directly:
At : numerator , denominator , so
so for all . Therefore
Conclusion of the computation:
Where continuity fails. One can show (by converting to polar coordinates away from the origin and computing the general formula for , for ) that along the path , tends to a value different from ; the function oscillates in sign depending on the direction of approach to the origin and hence is discontinuous at — likewise for . This is exactly the failure of hypothesis 3, and precisely at the point where the conclusion fails. All other hypotheses (existence of everywhere; existence of everywhere) hold, isolating continuity of the mixed partials at the point in question as the indispensable assumption.
Scope, edge cases & common traps
| Situation | What happens |
|---|---|
| both exist near and are continuous at | Equal: (theorem applies). |
| exist but are not continuous at | May disagree — see the counterexample above. |
| (all second partials continuous on an open set) | Equality holds at every point of that set; this is the most common sufficient hypothesis cited in practice. |
| Only exists near , and is continuous at ; is known a priori to exist | A stronger classical variant (due to Young) shows exists and equals from continuity of just alone plus differentiability assumptions — a genuinely different, more delicate theorem, beyond our scope here. |
| Functions of variables | Apply the theorem to each pair of variables holding the others fixed; symmetry of the full Hessian follows entry by entry. |
| Higher-order mixed partials (e.g. vs vs ) | All equal under iterated continuity hypotheses, by repeated application of Clairaut's Theorem to appropriate partial derivatives. |
The mathematician behind it
Origins · 1 minAlexis Clairaut and how this was discovered
Alexis Claude Clairaut was a prodigy of the French Enlightenment mathematical tradition, presenting a paper on space curves to the French Academy of Sciences at age thirteen and being elected to the Academy at eighteen — the youngest member ever admitted at that time. He worked extensively on differential equations, the shape of the Earth (confirming Newton's prediction of an oblate spheroid via the 1736 Lapland expedition), and celestial mechanics, notably producing an accurate prediction of the return of Halley's Comet in 1759. His 1740 memoir on the calculus of several variables contains the symmetry-of-mixed-partials result now bearing his name, though the fully general and rigorous formulation with explicit continuity hypotheses is often credited jointly to the later, more careful analysis of Hermann Schwarz in the nineteenth century — hence the theorem's alternate name, Schwarz's Theorem.
Is Clairaut's Theorem the same as saying "partial derivatives commute"?
Informally yes, but the precise statement requires care about which partial derivatives and where. The theorem says that at a given point, if the mixed partials and both exist in a neighborhood and are continuous at that point, then their values agree there. It does not claim that the operators and are identical as operators on all functions — only that they agree when applied to sufficiently regular functions and evaluated at points of continuity. For functions lacking the continuity hypothesis, as the counterexample shows, the two "orders of differentiation" genuinely disagree, so commutativity is a conditional fact, not an algebraic identity.
Do I need to check continuity of the mixed partials every time I compute a derivative in calculus homework?
In practice, no — almost every function built from polynomials, exponentials, logarithms, trigonometric functions, and their compositions, sums, products, and quotients (away from singularities of the quotient) has continuous partial derivatives of all orders on its natural domain. Such functions are called or smooth, and Clairaut's Theorem applies automatically and everywhere on the domain. You only need to worry about checking the hypothesis explicitly when a function is defined piecewise, has an isolated exceptional point (like in a quotient), or is constructed abstractly without an explicit closed form guaranteeing smoothness.
What is the relationship between Clairaut's Theorem and Young's Theorem?
Young's Theorem is a refinement requiring a weaker hypothesis: it assumes that and exist near a point and that is differentiable in the total-derivative sense at nearby points, together with existence of just one mixed partial (say ) continuous at the point, and concludes exists there too and equals . This is more delicate to prove and is typically presented after mastering the Clairaut/Schwarz version with both mixed partials assumed to exist and be continuous. The version in this article (Schwarz's form) is the standard workhorse in undergraduate multivariable calculus.
Why does the proof need two separate applications of the Mean Value Theorem rather than one?
The quantity is a difference of differences — a genuinely two-dimensional object — so a single one-dimensional Mean Value Theorem application cannot fully linearize it. The first application (in the -direction) reduces to a difference of values in the -slot; this is still a difference, not a derivative, so a second application (in the -direction) is needed to extract at an intermediate point. Only after both applications do we obtain a clean expression that can be compared, via continuity, to the value at .
Does Clairaut's Theorem extend to functions of more than two variables?
Yes. For , fix any two coordinate directions and hold all other variables constant; the two-variable theorem applies directly to the resulting function of , giving at any point where the relevant hypotheses hold. Applying this to every pair shows the full Hessian matrix is symmetric under the analogous continuity hypotheses, which is the form of the theorem most often used in optimization theory and differential geometry.
What is the connection to conservative vector fields and curl?
If is a vector field that is the gradient of some scalar potential , so and , then Clairaut's Theorem applied to gives (assuming continuity of the second partials), which is exactly the statement that the two-dimensional curl of vanishes. This necessary condition for a vector field to be a gradient (conservative) field is a direct corollary of the symmetry of mixed partials, and it underlies exactness tests for differential equations and path-independence results in vector calculus.
Can the two mixed partials be equal even when the continuity hypothesis fails?
Yes — the continuity hypothesis is sufficient, not necessary. It is entirely possible for to hold at a point where neither mixed partial is continuous; the counterexample in this article only shows that equality can fail without continuity, not that it must. Determining equality without the continuity hypothesis generally requires a direct, case-by-case computation, since the general theorem no longer guarantees the outcome.