Multivariable calculus
Second partial derivatives of sin(xy)
For f(x,y) = sin(xy) the second partials are f_xx = -y^2 sin(xy), f_yy = -x^2 sin(xy), and the mixed partial is f_xy = f_yx = cos(xy) - xy sin(xy). The mixed one needs the product rule, because the first partial y cos(xy) contains y in two places. At the origin the discriminant is -1, a saddle.
Second and mixed partials
Chain rule first, then decide whether you also need the product rule
The inside is . Differentiating in with held fixed, the inner derivative is , so . By symmetry .
For , differentiate in again. The factor out front is a constant here, so only the chain rule is in play and it contributes a second factor of .
The mixed partial is the interesting one. Differentiating in hits in two separate places, the leading factor and the inside of the cosine, so the product rule is required.
The mistake: dropping the cos(xy) term
By far the most common wrong answer is . It comes from differentiating the inside of the cosine and forgetting that the leading also depends on . The result fails an easy test: at the origin the correct mixed partial is , while the wrong version gives .
A quick way to stay honest is to ask, before differentiating, how many times the variable appears in the expression. In the variable appears twice, so the answer must have two terms. In the variable appears once, so has a single term and no product rule.
Check Clairaut symmetry by taking the other route. Starting from and differentiating in gives , the same expression.
What the Hessian says at the origin
Both first partials vanish at , so the origin is a critical point. Substituting there gives , and .
A negative discriminant means a saddle. That matches the picture: along the line the function is , which rises away from the origin, while along it is , which falls. The pure second partials being zero is what forces the classification onto the mixed partial.
Frequently asked questions
Why does the mixed partial of sin(xy) have two terms?
Because contains twice, once as the leading factor and once inside the cosine. Differentiating in therefore needs the product rule, giving from the first factor and from the second.
Do the two mixed partials of sin(xy) agree?
Yes, both equal . Every second partial of is continuous on the whole plane, so Clairaut's theorem applies and the order of differentiation makes no difference.