Multivariable calculus
Second partials of x e^y + y e^x
For f(x,y) = x e^y + y e^x the second partials are f_xx = y e^x, f_yy = x e^y, and the mixed partial f_xy = f_yx = e^x + e^y. The two routes to the mixed partial look nothing alike on the way, but both finish at e^x + e^y, which is Clairaut symmetry made visible.
Second and mixed partials
Term by term, holding the other variable still
Differentiate in with frozen. In the first term , the factor is a constant, so the derivative is just . In the second term , the constant is and differentiates to itself.
Now take a second derivative of . The term is a constant in and dies, leaving only .
For the mixed partial, differentiate with respect to . Now the first term survives as and the second contributes , because is the variable and is the constant.
The mistake: keeping a term that should have vanished
Terms disappear and reappear as you switch variables, and that is where marks are lost. Going from to , the must vanish, because it is constant in . Going from the same to , that identical is the term that survives while nothing else does. Students who carry the same term through both steps get , which is the first partial written out again.
Before each step, ask which factors contain the variable you are differentiating in and cross out the rest. Here no term ever needs the product rule, since in the two factors depend on different variables, and the same is true of .
Clairaut symmetry, and the one critical point
Take the other route. Start from and differentiate in : the first term gives and the second gives , so the answer is again.
What makes this example worth remembering is that the surviving terms swap places. Going first, the in the answer comes from the term ; going first, it comes from the same term but through the opposite factor. The totals match because Clairaut's theorem says they must, given that both mixed partials are continuous everywhere.
The function is also symmetric under swapping and , so and are mirror images. The discriminant is worth evaluating only where both first partials vanish. Setting and , then substituting the first into the second, gives , with forced because has to come out positive. The one point meeting both conditions is .
So this surface has exactly one critical point, a saddle at of height . Everywhere else the discriminant tells you nothing, because the second derivative test only classifies points where the gradient is already zero.
Frequently asked questions
Why does f_xx have no e^y term?
Because the term is linear in . Its first derivative is the constant , and differentiating a constant in gives zero, so only from the other term survives to the second derivative.
Do both mixed partials really give the same thing here?
Yes, both equal . It is a good example because the two calculations pick up their terms in the opposite order, and the agreement is Clairaut's theorem rather than an algebraic coincidence.