Tutorials › Calculus III › Clairaut’s Theorem and Its Rectangular-Increment Proof

Computing Partial Derivatives · Tutorial 319 of 999

Clairaut's Theorem and Its Rectangular-Increment Proof

State when mixed partials agree, compute them in examples, and understand why a rectangular increment proves the result.

Beginner 10 min read

What You'll Learn

  • Define the two orders of mixed partial differentiation
  • State the local continuity conditions in Clairaut’s theorem
  • Compute and compare mixed partials at a specified point
  • Express a rectangular increment using each mixed partial
  • See why the proof applies the fundamental theorem of calculus to differences
  • Identify a gap in an unjustified direct application of the fundamental theorem

Why the Order of Differentiation Matters

For a function of two variables, a mixed second partial derivative is formed by differentiating once with respect to each variable. The order is recorded in the subscripts: \(f_{xy}\) means differentiate \(f\) first with respect to \(x\), then with respect to \(y\); \(f_{yx}\) means differentiate first with respect to \(y\), then with respect to \(x\).

These two calculations often give the same result for familiar smooth functions. But that observation alone does not establish a general rule. Clairaut’s theorem gives a useful condition that guarantees equality: continuity of both mixed partial derivatives in a neighborhood of the point in question.

Definition: If the relevant derivatives exist, \(f_{xy}\) is the partial derivative with respect to \(y\) of \(f_x\), and \(f_{yx}\) is the partial derivative with respect to \(x\) of \(f_y\). The subscripts record the order of differentiation from left to right.

Thus the notation can be expanded as

$$ f_{xy}(x,y)=\frac{\partial}{\partial y}\bigl(f_x(x,y)\bigr), \qquad f_{yx}(x,y)=\frac{\partial}{\partial x}\bigl(f_y(x,y)\bigr). $$

The theorem is a sufficient condition for equality, not a definition that makes the two orders identical. Its hypotheses concern what happens in a neighborhood, not merely at one point.

Clairaut’s Theorem

Theorem (Clairaut): Suppose \(f_x\) and \(f_y\) exist in an open neighborhood \(U\) of \((a,b)\), and both mixed partial derivatives \(f_{xy}\) and \(f_{yx}\) exist and are continuous in \(U\). Then $$ f_{xy}(a,b)=f_{yx}(a,b). $$

Continuity in an open neighborhood means continuity at all points sufficiently close to \((a,b)\), not just existence or continuity at \((a,b)\) itself. The proof uses small rectangles around the point, so take their sides short enough that the whole rectangle lies in \(U\).

The key idea is to calculate the same change in \(f\) around the four corners of a rectangle in two ways. One calculation uses \(f_{xy}\); the other uses \(f_{yx}\). After dividing by the rectangle’s area and shrinking the rectangle toward the point, continuity identifies the two limiting values.

Worked Example: Comparing Mixed Partials of a Polynomial

Worked Example: Comparing Mixed Partials of a Polynomial

Let \(f(x,y)=x^2y^3+3x-y\). Compute both mixed partials and evaluate them at \((1,-1)\).

First differentiate with respect to \(x\), holding \(y\) fixed:

$$ f_x(x,y)=2xy^3+3. $$

Now differentiate this result with respect to \(y\):

$$ f_{xy}(x,y)=6xy^2. $$

For the other order, differentiate the original function with respect to \(y\):

$$ f_y(x,y)=3x^2y^2-1. $$

Then differentiate with respect to \(x\):

$$ f_{yx}(x,y)=6xy^2. $$

At \((1,-1)\), the value is

$$ f_{xy}(1,-1)=6(1)(-1)^2=6, \qquad f_{yx}(1,-1)=6(1)(-1)^2=6. $$

Both mixed partials are polynomials, so they are continuous everywhere. Clairaut’s theorem applies, and the computed values agree as required. Substituting \((1,-1)\) into the common formula \(6xy^2\) also gives \(6\), checking both evaluations.

Rectangular Increments

Choose nonzero, sufficiently small increments \(h\) and \(k\). The four relevant corners are \((a,b)\), \((a+h,b)\), \((a,b+k)\), and \((a+h,b+k)\). Define the rectangular increment by

$$ \Delta = f(a+h,b+k)-f(a,b+k)-f(a+h,b)+f(a,b). $$

This expression measures the change across one side of the rectangle minus the change across the opposite side. The signs are important, especially if \(h\) or \(k\) is negative. Integrals with reversed limits automatically account for those signs.

Proof Using the Rectangular Increment

The proof must be careful about which functions the fundamental theorem of calculus is applied to. Continuity of the mixed partials does not, by itself, assert continuity of \(f_x\) or \(f_y\) along every side of a rectangle. Instead, apply the one-variable theorem to differences whose derivatives are continuous because the mixed partials are continuous.

1
Form a difference across the vertical sides.
For fixed \(k\), define \(G(u)=f(u,b+k)-f(u,b)\). Differentiating with respect to \(u\) gives \(G'(u)=f_x(u,b+k)-f_x(u,b)\).
2
Express that derivative using \(f_{xy}\).
For each fixed \(u\), the function \(v\mapsto f_x(u,v)\) has continuous derivative \(f_{xy}(u,v)\) on the interval between \(b\) and \(b+k\). The one-variable fundamental theorem of calculus therefore gives \(G'(u)=\int_b^{b+k}f_{xy}(u,v)\,dv\).
3
Apply the theorem to \(G\).
Continuity of \(f_{xy}\) makes the displayed integral continuous as a function of \(u\). Thus \(G'\) is continuous, so applying the fundamental theorem to \(G\) from \(a\) to \(a+h\) gives one expression for \(\Delta\).
4
Reverse the roles of the variables.
Set \(H(v)=f(a+h,v)-f(a,v)\). The same reasoning, now using the continuous mixed partial \(f_{yx}\), gives a second expression for the same \(\Delta\).

Writing out the first expression, the difference \(G(a+h)-G(a)\) is exactly \(\Delta\). Consequently,

$$ \Delta = \int_a^{a+h}G'(u)\,du = \int_a^{a+h}\int_b^{b+k}f_{xy}(u,v)\,dv\,du. $$

For the other order, \(H'(v)=f_y(a+h,v)-f_y(a,v)\). For each fixed \(v\), apply the fundamental theorem to \(u\mapsto f_y(u,v)\), whose derivative \(f_{yx}(u,v)\) is continuous. This gives

$$ H'(v)=\int_a^{a+h}f_{yx}(u,v)\,du. $$

The right side is continuous in \(v\). Applying the fundamental theorem to \(H\) from \(b\) to \(b+k\) yields the second expression:

$$ \Delta = \int_b^{b+k}H'(v)\,dv = \int_b^{b+k}\int_a^{a+h}f_{yx}(u,v)\,du\,dv. $$

Now assume \(h\ne0\) and \(k\ne0\). Dividing both expressions by \(hk\) shows that each mixed partial has the same rectangular average:

$$ \frac{\Delta}{hk} = \frac{1}{hk}\int_a^{a+h}\int_b^{b+k}f_{xy}(u,v)\,dv\,du = \frac{1}{hk}\int_b^{b+k}\int_a^{a+h}f_{yx}(u,v)\,du\,dv. $$

As \((h,k)\) tends to \((0,0)\), the first average tends to \(f_{xy}(a,b)\), and the second tends to \(f_{yx}(a,b)\). To see why, for either continuous function \(q\) among these mixed partials, the absolute difference between its rectangular average and \(q(a,b)\) is at most the largest value of \(|q(u,v)-q(a,b)|\) on the rectangle. Continuity makes that bound tend to zero as the rectangle shrinks. The two averages are equal for every sufficiently small nonzero \(h\) and \(k\), so their limits are equal. Therefore \(f_{xy}(a,b)=f_{yx}(a,b)\), proving the theorem.

Worked Example: Checking a Rectangular Increment

Worked Example: Checking a Rectangular Increment

Let \(f(x,y)=x^2y\), and use \(a=1\), \(b=2\), \(h=1\), and \(k=-1\). Compute the rectangular increment and the two iterated integrals.

The corners are \((1,2)\), \((2,2)\), \((1,1)\), and \((2,1)\). Their function values are

$$ f(1,2)=2,\qquad f(2,2)=8,\qquad f(1,1)=1,\qquad f(2,1)=4. $$

Using the definition of \(\Delta\),

$$ \Delta=f(2,1)-f(1,1)-f(2,2)+f(1,2) =4-1-8+2=-3. $$

Next, \(f_x=2xy\), so \(f_{xy}=2x\). Its iterated integral is

$$ \int_1^2\int_2^1 2x\,dy\,dx = \int_1^2 2x(1-2)\,dx = -\int_1^2 2x\,dx = -(4-1) = -3. $$

Also, \(f_y=x^2\), so \(f_{yx}=2x\). The other iterated integral is

$$ \int_2^1\int_1^2 2x\,dx\,dy = \int_2^1(4-1)\,dy = 3(1-2) = -3. $$

Both integrals equal the corner calculation, \(\Delta=-3\). The negative sign is correct because \(k=-1\) reverses the direction of integration in \(y\).

Worked Example: Applying the Theorem to an Exponential

Worked Example: Applying the Theorem to an Exponential

Let \(f(x,y)=e^{xy}\). Find the two mixed partials and evaluate them at \((0,2)\).

Differentiate first with respect to \(x\):

$$ f_x(x,y)=y e^{xy}. $$

Differentiate this with respect to \(y\), using the product rule:

$$ f_{xy}(x,y)=e^{xy}+y(xe^{xy})=(1+xy)e^{xy}. $$

In the other order,

$$ f_y(x,y)=x e^{xy}, \qquad f_{yx}(x,y)=e^{xy}+x(ye^{xy})=(1+xy)e^{xy}. $$

At \((0,2)\), \(xy=0\), so

$$ f_{xy}(0,2)=(1+0)e^0=1, \qquad f_{yx}(0,2)=(1+0)e^0=1. $$

The formulas agree everywhere, and substituting the point into either formula gives \(1\). Both mixed partials are continuous, since they are built from products and compositions of continuous functions. Thus the theorem applies at \((0,2)\).

A Common Proof Error

A tempting but unjustified step is to apply the fundamental theorem directly to \(f\) along every horizontal and vertical side, as if continuity of the mixed partials guaranteed continuity of \(f_x\) and \(f_y\) on those sides. It does not. Here is a concrete illustration of the gap in that argument.

Define \(g(0)=0\), \(g(x)=x^2\sin(1/x^2)\) for \(x\ne0\), and \(F(x,y)=g(x)+y^2\). The derivative \(g'(0)\) exists because

$$ \lim_{t\to0}\frac{g(t)-g(0)}{t} = \lim_{t\to0}t\sin(1/t^2)=0. $$

For \(x\ne0\), differentiation gives

$$ g'(x)=2x\sin(1/x^2)-\frac{2}{x}\cos(1/x^2). $$

This derivative is unbounded near zero. Yet \(F_x=g'(x)\) is independent of \(y\), and \(F_y=2y\) is independent of \(x\), so both mixed partials exist and are identically zero. On a horizontal side through \(x=0\), \(F_x\) is not continuous. Therefore the usual fundamental-theorem argument that requires a continuous derivative cannot simply be applied to \(F\) along that side.

Proof pitfall: Do not infer that \(f_x\) and \(f_y\) are continuous on rectangle sides from continuity of \(f_{xy}\) and \(f_{yx}\). In the rectangular-increment proof, apply the fundamental theorem to \(G(u)=f(u,b+k)-f(u,b)\) and \(H(v)=f(a+h,v)-f(a,v)\). Their derivatives are continuous because they are integrals of the continuous mixed partials.

Why the Theorem Is Useful

For many familiar functions, the two orders can be computed and compared directly, as in the examples. Clairaut’s theorem explains when equality is guaranteed without treating each pair of calculations as an isolated coincidence. It also makes clear what must be checked: the mixed partials should exist and be continuous in a neighborhood of the point.

The neighborhood condition is substantive. Knowing only that both mixed partials exist at a point does not meet the stated theorem’s hypotheses. Likewise, checking equality in a few examples does not prove equality for an entire class of functions. The rectangular-increment argument supplies the reason the continuity condition works: it makes both descriptions of a shrinking rectangle’s average approach the respective mixed partial at the corner.

Check Your Understanding

Use the definitions and the hypotheses of the theorem to answer these questions.

  1. In \(f_{xy}\), which variable is differentiated first, and which is differentiated second?
  2. State the neighborhood continuity condition in Clairaut’s theorem.
  3. Why does the rectangular-increment proof use differences \(G\) and \(H\) instead of applying the fundamental theorem directly to \(f\) on the rectangle’s sides?
  4. For \(f(x,y)=x^2y\), compute \(f_{xy}\) and \(f_{yx}\).
  5. When \(k\) is negative, what accounts for the sign of an integral from \(b\) to \(b+k\)?