Multivariable calculus
Second partial derivatives of sin x cos y
For f(x,y) = sin x cos y the second partials are f_xx = -sin x cos y, f_yy = -sin x cos y, and f_xy = f_yx = -cos x sin y. Both pure second partials return the original function with a minus sign, so f_xx + f_yy = -2f. At the point (pi/2, 0) the Hessian gives a local maximum.
Second and mixed partials
One variable at a time
Treat as a constant to differentiate in , and treat as a constant to differentiate in . That gives the two first partials.
Differentiate each of those again. In the derivative turns into , and the derivative turns into . In the derivative turns into , restoring the original shape with a minus sign.
Running the mixed partial the other way, starting from and differentiating in , gives again. The two routes agree, exactly as Clairaut's theorem promises for a function this smooth.
The mistake: assuming f_xx and f_yy must look different
Here and come out identical, and students who expect two different answers go back and hunt for an error that is not there. The reason they match is structural: each pure second derivative sends its own trig factor through two steps of the cycle, and two steps always produce the factor back times .
The genuine error to guard against is a sign. already carries a minus sign, so differentiating it in means differentiating , not . Dropping that leading minus gives , which has the curvature pointing the wrong way and reverses every conclusion you draw from the Hessian.
Reading the Hessian at a critical point
Both first partials vanish at , since and . Evaluate the second partials there: , , and .
With and , the second derivative test calls this a local maximum, and indeed is the largest value a product of a sine and a cosine can reach.
Adding the pure second partials gives . A function whose Laplacian is a constant multiple of itself is an eigenfunction of the Laplacian, and this particular one is the shape of a standing wave on a rectangular membrane.
Frequently asked questions
Why do f_xx and f_yy come out equal for this function?
Because each pure second derivative differentiates one trig factor twice, and two derivatives of a sine or a cosine return the same function times . Both routes therefore rebuild with a minus sign in front.
What is the mixed partial of sin x cos y?
It is , and you get the same expression whichever order you differentiate in. It vanishes wherever or , which is exactly where the critical points of the surface sit.