Multivariable calculus
Second partial derivatives of e^x sin y
For f(x,y) = e^x sin y the second partials are f_xx = e^x sin y, f_yy = -e^x sin y, and the mixed partial f_xy = f_yx = e^x cos y. Because f_xx + f_yy = 0 the function is harmonic, and the discriminant f_xx f_yy - f_xy^2 equals -e^(2x), which is negative at every point.
Second and mixed partials
Differentiate once, then differentiate again
The two factors depend on different variables, so no product rule is needed. Freeze and is just a constant multiplier sitting in front of , which is its own derivative.
Freeze instead and becomes the constant, while differentiates to .
Each first partial is again an factor times a factor, so the second round works the same way. Differentiating in reproduces it, differentiating it in swaps sine for cosine, and differentiating in brings out a minus sign.
The mistake: losing the sign on the second y derivative
Sine goes to cosine, but cosine goes to negative sine. Anyone who writes has differentiated once and then copied the answer instead of differentiating again. The four step cycle is the check: two derivatives always flip the sign.
The second slip is reaching for the product rule. Using it is not wrong, just wasteful, because the derivative of with respect to is zero and the extra term dies. Spotting a separated product saves a line of algebra every time.
Clairaut symmetry and what the Laplacian says
Differentiating in then , and in then , both land on . That is Clairaut's theorem: when the second partials are continuous, and here they are continuous on the whole plane, the mixed partials agree and the order is yours to choose.
Adding the two pure second partials gives zero.
A function with zero Laplacian is called harmonic. The Hessian discriminant reads off as , which is negative everywhere, so this surface has no local maximum and no local minimum at any point.
Frequently asked questions
Does the order of differentiation change the mixed partial?
No. Both and equal . All second partials of are continuous on the whole plane, so Clairaut's theorem guarantees the two orders agree.
What does it mean that this function is harmonic?
It means , so at every point the upward curvature in one direction is cancelled by downward curvature in the other. A nonconstant harmonic function cannot have an interior local maximum or minimum, which matches the discriminant found here.