Multivariable calculus

Second Partial Derivatives of x^2 y z^3

For f(x,y,z) = x^2 y z^3 the pure second partials are f_xx = 2y z^3, f_yy = 0, and f_zz = 6x^2 y z. The mixed ones are f_xy = 2x z^3, f_xz = 6xy z^2, and f_yz = 3x^2 z^2. Clairaut's theorem makes the nine second partials collapse to these six, since order of differentiation does not matter for a polynomial.

f(x,y,z)=x2yz3f(x,y,z) = x^{2}yz^{3}
fx=2xyz3\frac{\partial f}{\partial x} = 2xyz^{3}
fy=x2z3\frac{\partial f}{\partial y} = x^{2}z^{3}
fz=3x2yz2\frac{\partial f}{\partial z} = 3x^{2}yz^{2}

Second and mixed partials

2fx2=2yz3\frac{\partial^{2} f}{\partial x^{2}} = 2yz^{3}
2fyx=2xz3\frac{\partial^{2} f}{\partial y\,\partial x} = 2xz^{3}
2fy2=0\frac{\partial^{2} f}{\partial y^{2}} = 0
2fzx=6xyz2\frac{\partial^{2} f}{\partial z\,\partial x} = 6xyz^{2}
2fzy=3x2z2\frac{\partial^{2} f}{\partial z\,\partial y} = 3x^{2}z^{2}
2fz2=6x2yz\frac{\partial^{2} f}{\partial z^{2}} = 6x^{2}yz

Three first partials, then nine seconds that collapse to six

With three variables, a partial derivative holds the other two fixed. Each first partial keeps the factors it does not touch.

fx=2xyz3,fy=x2z3,fz=3x2yz2\frac{\partial f}{\partial x} = 2xyz^{3}, \qquad \frac{\partial f}{\partial y} = x^{2}z^{3}, \qquad \frac{\partial f}{\partial z} = 3x^{2}yz^{2}

There are nine second partials in principle, one for each ordered pair of variables. Clairaut's theorem pairs them off, so only six are distinct: three pure and three mixed.

2fx2=2yz3,2fy2=0,2fz2=6x2yz\frac{\partial^{2} f}{\partial x^{2}} = 2yz^{3}, \qquad \frac{\partial^{2} f}{\partial y^{2}} = 0, \qquad \frac{\partial^{2} f}{\partial z^{2}} = 6x^{2}yz
2fyx=2xz3,2fzx=6xyz2,2fzy=3x2z2\frac{\partial^{2} f}{\partial y\,\partial x} = 2xz^{3}, \qquad \frac{\partial^{2} f}{\partial z\,\partial x} = 6xyz^{2}, \qquad \frac{\partial^{2} f}{\partial z\,\partial y} = 3x^{2}z^{2}

The pure yy partial is zero because ff is degree one in yy. Once you differentiate in yy the variable is gone, so a second yy derivative has nothing left to act on.

Clairaut symmetry with three variables

The theorem applies to any pair of variables at a time, with the third held fixed. Check the xx and zz pair in both orders.

z(2xyz3)=6xyz2,x(3x2yz2)=6xyz2\frac{\partial}{\partial z}\left(2xyz^{3}\right) = 6xyz^{2}, \qquad \frac{\partial}{\partial x}\left(3x^{2}yz^{2}\right) = 6xyz^{2}

The symmetry extends to higher order. The third mixed partial fxyzf_{xyz} is 6xz26xz^{2} no matter which of the six orders you differentiate in, because you can swap adjacent variables one at a time until the order matches.

For a function of three variables, the Hessian is the three by three matrix of second partials. Clairaut symmetry is what makes that matrix symmetric, and symmetry is why it has real eigenvalues, the fact the multivariable second derivative test rests on.

H=(2yz32xz36xyz22xz303x2z26xyz23x2z26x2yz)H = \begin{pmatrix} 2yz^{3} & 2xz^{3} & 6xyz^{2} \\ 2xz^{3} & 0 & 3x^{2}z^{2} \\ 6xyz^{2} & 3x^{2}z^{2} & 6x^{2}yz \end{pmatrix}

The mistake students make

The most common error in three variables is carrying a variable that should be frozen. Differentiating x2yz3x^{2}yz^{3} with respect to zz gives 3x2yz23x^{2}yz^{2}, and the x2yx^{2}y block is untouched. Students who apply a product rule across all three factors invent terms that do not exist.

The second error is stopping at three second partials out of habit from two variable problems. With nn variables there are nn pure and n(n1)2\frac{n(n-1)}{2} distinct mixed ones, so three variables give six, not three.

The third is reporting fyyf_{yy} as x2z3x^{2}z^{3}, which is the first partial rather than the second. Differentiating a term that is linear in yy twice in yy always gives zero.

Frequently asked questions

How many distinct second partials does a function of three variables have?

Six, when the mixed partials are continuous: fxxf_{xx}, fyyf_{yy}, fzzf_{zz}, fxyf_{xy}, fxzf_{xz}, and fyzf_{yz}. Clairaut's theorem pairs the nine ordered combinations into these six.

Does Clairaut's theorem work for third derivatives?

Yes, provided the derivatives involved are continuous. Any reordering can be built from swaps of adjacent pairs, and each swap is a two variable Clairaut step. Here fxyz=6xz2f_{xyz} = 6xz^{2} in every order.