Higher-order derivatives and commutativity
Once you can find and for , the obvious next move is to differentiate again. Differentiate with respect to and you get ; differentiate it with respect to instead and you get the mixed partial . But you could equally have started from and differentiated with respect to , giving — a seemingly different route to a second derivative. Do the two mixed partials, and , always agree? For every function you will meet in MA10001 — polynomials, exponentials, logs, trig functions and their combinations — the answer is yes, and the precise reason is Clairaut's (Schwarz's) theorem. This node builds the four second-order partials, states the theorem carefully (continuity is the hidden hypothesis), and works through both a polynomial-exponential example and a harmonic-function example that previews Laplace's equation.
If and are continuous near a point, they are equal there, so for ordinary elementary functions the order of partial differentiation simply does not matter.
The core idea
For , differentiating the two first partials and each with respect to and again produces four second-order partials. The two "straight" ones repeat the same variable, and the two "mixed" ones switch variables:
where: reads "differentiate w.r.t. first, then " (left to right in the subscript), which matches the operator notation read right to left — the two notations describe the same order, so check which convention a given source is using rather than assuming. Two subscripted routes, -then- versus -then-, land on the same second derivative whenever the mixed partials are continuous. That equality is the content of Clairaut's theorem: if and both exist and are continuous in a neighborhood of , then
where: continuity of the mixed partials near the point is the hypothesis that actually does the work — it is not an automatic algebraic identity, only a near-universal one for the smooth, elementary functions built from polynomials, exponentials, logs and trig functions that dominate this course. Because of this, computing one of in practice and treating the other as a free check is standard technique, not a shortcut you have to justify each time. The result extends to third and higher orders: for a function with continuous partials of the relevant order, any mixed partial is independent of the order of differentiation, e.g. . Continuity is essential — dropping it is exactly how one can (outside routine syllabus computation) construct pathological functions with . It helps to keep the bookkeeping straight before diving into an example. There are always four second-order partials for a function of two variables — two "straight" () and two "mixed" () — and the mixed pair is the only place where order-of-operations is even a question, since and never involve switching variables. This is also where the topic connects forward: once you accept for well-behaved functions, quantities like (the two-dimensional Laplacian) become well-defined objects worth naming, which is exactly the bridge to harmonic functions and Euler's theorem later in this unit.
Derivation
The goal is to compute all four second-order partial derivatives of directly from the two different orders of differentiation and confirm by explicit algebra, not by invoking the theorem alone, that the two mixed partials and come out identical term for term, which is exactly what Clairaut's theorem guarantees for a function built entirely from polynomials and an exponential.
Step 1. Find the first partials by treating the other variable as constant. Differentiating with respect to gives , and differentiating with respect to uses the chain rule with inner derivative , giving ; so . Symmetrically, .
Step 2. Differentiate with respect to to get . The term differentiates to . The term is now a product of and , so the product rule applies: . Adding, .
Step 3. Differentiate with respect to to get , following the mirror-image route. The term differentiates to . The term is a product of and , so . Adding, .
Step 4. Compare the two results term by term. Both and equal exactly, with no sign or coefficient mismatch anywhere. This is not a coincidence of this particular ; it holds because is a sum of a polynomial and an exponential, both of which have continuous partial derivatives of every order everywhere, so Clairaut's theorem's hypothesis is satisfied at every point and the equality is guaranteed in advance.
Worked example
Take , defined for , and find .
Step 1. Compute the first partials using the chain rule on : and .
Step 2. Differentiate again with respect to using the quotient rule: .
Step 3. Differentiate again with respect to , the same way: .
Step 4. Add the two results. The numerators are exact negatives of each other, , so for every . Answer: away from the origin — is a harmonic function, a preview of Laplace's equation that follows this topic.
Common traps
- Reading the subscript order backwards. means differentiate w.r.t. first, then ; the operator form applies the rightmost symbol first, so the two notations agree — but only if you read each one in its own correct direction.
- Skipping the product rule inside a mixed partial. The first partial you differentiate again is often already a product (like ), so the second differentiation needs the product rule, not a mechanical repeat of the first step's pattern.
- Assuming with no justification. For the smooth functions in this course it always holds, but the reason is Clairaut's theorem and its continuity hypothesis, not an algebraic law — say so if asked to justify it.
- Arithmetic slips in quotient-rule second derivatives. Cancellations like are common and a sign error while expanding terms is the usual cause of a wrong nonzero answer.
Ask the tutor: if a mixed-partial computation with a product or quotient buried inside isn't simplifying cleanly, ask the AI tutor to walk through and side by side with you.
Why does the order of differentiation not matter for the functions I meet in this course?
Because Clairaut's theorem says whenever both mixed partials are continuous near the point, and every function built from polynomials, exponentials, logs and trig functions — sums, products, quotients, compositions of these — has continuous partial derivatives of every order everywhere it is defined. So the hypothesis is satisfied automatically, and the equality follows every time without you needing to prove continuity by hand.
Do I need to compute both f sub xy and f sub yx on an exam, or is one enough?
Computing one is enough to answer a typical question, and computing the other is a good self-check rather than a required step — since the theorem guarantees they agree for standard functions, a mismatch almost always signals an arithmetic slip rather than a genuinely different value. If a question explicitly asks you to verify , then of course compute both and show they match.
What goes wrong if continuity of the mixed partials fails at a point?
Then Clairaut's theorem simply does not apply there, and and can genuinely differ at that one point — this is how the classic pathological counterexamples are built, with a function that behaves normally everywhere except at a single point like the origin where its mixed partials disagree. This situation is outside the routine computations of this course, which use elementary functions with continuous derivatives everywhere they are defined, but it explains why the theorem states a continuity hypothesis rather than claiming the equality unconditionally.