Multivariable calculus
Second Partials of x sin(y) + y cos(x)
For f(x,y) = x sin(y) + y cos(x) the second partials are f_xx = -y cos(x), f_yy = -x sin(y), and the mixed partial f_xy = cos(y) - sin(x). Every term of f contributes to the mixed partial, one piece from each, while the pure second partials pick up only one term apiece. Both mixed orders agree.
Second and mixed partials
Handle the sum one term at a time
Differentiation is linear, so treat and separately and add. For the partial, is a constant multiplier on , and is a constant multiplier on .
For , the term has no and dies, leaving only the derivative of .
The mixed partial is where both original terms survive. Differentiating in keeps a piece from each.
Why this is a good Clairaut test case
The two orders take completely different routes here. Going first gives , and differentiating that in gives : the first term keeps its cosine and loses the , the second loses nothing but its sign.
Both routes land on the same expression because sines, cosines, and products of them with polynomials are continuous everywhere, which is the hypothesis Clairaut's theorem needs.
The mixed partial is also the entry that makes the Hessian symmetric, so the second derivative test only needs . That number classifies critical points only, and the origin is not one: , so the surface is still sloping in the direction there and classifies nothing.
The mistake students make
The usual error is deciding that a term which vanished from must also vanish from . The term contributes nothing to , since it is linear in , but it contributes the in the mixed partial. Each second partial has to be built from the correct first partial, not guessed from the others.
The second error is a sign slip on , and then again on . Two derivatives of cosine give one minus sign in total, not two.
Check at , . There , , and , which you can also read straight off the function: near the origin , whose only curvature is the twist term .
Frequently asked questions
Why does f_xx contain y but no x term from x sin y?
Because is linear in . Its first derivative is the constant , and the second is zero. Only survives two derivatives, giving .
How do I use these to build the quadratic approximation at a point?
The second order Taylor polynomial at uses , both first partials, and all three second partials: . The factor 2 on the cross term is exactly Clairaut symmetry, since and each contribute once.