Multivariable calculus
Partial Derivatives of cos(x - y^2)
The partials of cos(x - y^2) are f_x = -sin(x - y^2) and f_y = 2y sin(x - y^2). The outer cosine differentiates to minus sine both times. For x the inner partial is 1, and for y it is -2y, whose minus cancels the one from the cosine, so f_y comes out positive.
Track the two minus signs separately
Let . The outer derivative is every time. The inner partials are and , and it is worth writing both down before multiplying.
Doing the two steps on paper rather than in your head is the whole technique. Sign errors here come from combining the outer and inner derivatives in one mental move.
The mistake: one minus sign instead of two
The usual wrong answer is , which applies the cosine's minus but forgets that already carries one of its own. Test it at , : there and , so the true while the wrong version gives .
A different error is pulling the subtraction outside and writing . The cosine of a difference is not the difference of cosines, and the two disagree almost everywhere: at , the true is while the split version gives .
Parabolic level curves and a degenerate critical set
The function is constant wherever is constant, so its level curves are the sideways parabolas . The gradient sits perpendicular to those parabolas.
Both partials vanish exactly when , that is on the whole family of parabolas . These are curves of critical points rather than isolated points, and the discriminant works out to zero along every one of them, so the second derivative test is degenerate and the shape of the cosine has to do the classifying.
Frequently asked questions
Why does the y partial contain a factor of y but the x partial does not?
Because enters through while enters linearly. The inner partial with respect to is the constant , so nothing extra appears, whereas with respect to it is , which carries the variable into the answer.
Are there any isolated critical points?
No. Both partials are zero exactly where , which is a family of parabolas, not a set of isolated points. Each parabola is a ridge or a trough of the surface, at height or .