Multivariable calculus
Partial Derivatives of y^2 cos(xy)
For f(x, y) = y squared times cos(xy), the partial derivative with respect to x is negative y cubed times sin(xy), and the partial derivative with respect to y is 2y cos(xy) minus x y squared times sin(xy). The x partial needs only the chain rule; the y partial needs the product rule and the chain rule together.
The easy partial and the hard one
With fixed, the factor is a constant and only the cosine moves. The chain rule gives times the inside derivative , and the leading multiplies through.
With fixed, both factors contain , so the product rule is unavoidable. Differentiate to get , keep , then keep and differentiate by , which brings out times the inside derivative .
At the inside is zero, so and .
The mistake: using the same rule for both variables
Because the partial needs a product rule, students often add a spurious product rule term to the partial, tacking an extra piece onto . There is nothing to add: has zero derivative with respect to , so that branch of the product rule contributes zero.
- The number of terms in a partial derivative depends on how many factors carry the moving variable, not on how the function looks overall.
- Here appears in one factor, so has one term. appears in two factors, so has two.
- Watch the exponent: times the inside derivative gives , not .
Checking with Clairaut's theorem
A good way to catch an error in either partial is to compute the mixed second derivative both ways and see whether they match. Starting from and differentiating by , the product rule gives .
Starting instead from and differentiating by , you get , and the first two terms combine to .
They agree, as they must for a smooth function. If your two routes had disagreed, one of the first partials would have been wrong.
Frequently asked questions
Why is the x partial zero along the whole x axis?
On the line the factor is zero, so there. That matches the function itself, which is identically zero along and therefore flat in the direction.
Where do both partials vanish at once?
Setting makes both zero, so the entire axis consists of critical points. Away from that line, forces , and substituting into the second partial leaves .