Multivariable calculus

Partial Derivatives of cos(x^2 y): Chain Rule

The partials of cos(x^2 y) are f_x = -2xy sin(x^2 y) and f_y = -x^2 sin(x^2 y). The outer cosine becomes minus sine of the same inner expression each time. The inner partial of x^2 y is 2xy with respect to x, since y is a constant multiplier, and x^2 with respect to y.

f(x,y)=cos(x2y)f(x,y) = \cos(x^2 y)
fx=2xysin(x2y)\frac{\partial f}{\partial x} = -2xy\sin(x^2 y)
fy=x2sin(x2y)\frac{\partial f}{\partial y} = -x^2\sin(x^2 y)

The inner function is a product, but only one factor varies

Put u=x2yu = x^2y. Differentiating uu with respect to xx treats yy as a constant coefficient and gives 2xy2xy. Differentiating with respect to yy treats x2x^2 as a constant coefficient and gives x2x^2. Neither step needs the product rule, because in each case one factor is frozen.

fx=sin(x2y)2xy=2xysin(x2y)\frac{\partial f}{\partial x} = -\sin(x^2 y)\cdot 2xy = -2xy\sin(x^2 y)
fy=sin(x2y)x2=x2sin(x2y)\frac{\partial f}{\partial y} = -\sin(x^2 y)\cdot x^2 = -x^2\sin(x^2 y)

Notice the outer factor sin(x2y)-\sin(x^2y) is identical in both. Only the inner partial distinguishes them, which is true of every chain rule problem with a single inner function.

Reaching for the product rule too early

Students often try to apply the product rule to cos(x2y)\cos(x^2y) itself, as if it were cos(x2)y\cos(x^2)\cdot y. It is not a product. It is a single cosine of a product, and the product lives entirely inside the argument where the constant-multiple rule handles it.

The other frequent error is losing the yy from the xx partial and writing 2xsin(x2y)-2x\sin(x^2y). At (1,3)(1, 3) that gives 2sin30.282-2\sin 3 \approx -0.282 instead of the true 6sin30.847-6\sin 3 \approx -0.847, a factor of 33 out, which is exactly the missing yy.

  • Identify the inner function first, in this case x2yx^2y.
  • Differentiate the outer cosine, keeping the inner expression intact.
  • Differentiate the inner function with respect to one variable only.

Where the surface is flat

Both partials vanish exactly where sin(x2y)=0\sin(x^2y) = 0, that is on the curves x2y=kπx^2y = k\pi for integer kk. Nothing extra comes from the factors xx and x2x^2 out front: fy=x2sin(x2y)f_y = -x^2\sin(x^2y) can only lose its x2x^2 at x=0x = 0, and there the argument x2yx^2y is 00, so the sine is zero anyway. The case k=0k = 0 is worth reading slowly, because x2y=0x^2y = 0 means x=0x = 0 or y=0y = 0: both coordinate axes are already in the family.

Along the yy axis the function is the constant cos0=1\cos 0 = 1. That is a ridge at the maximum height of a cosine, not an isolated extremum, so the second derivative test cannot classify it and the bound f1f \le 1 has to.

Frequently asked questions

Does the chain rule apply more than once here?

Once. The outer cosine is the only composition, and ordinary single variable differentiation handles the inner x2yx^2y. You would chain again only if the inner function were itself a composition, which x2yx^2y is not.

Why is there no y in the y partial?

Because u=x2yu = x^2y is linear in yy, so uy=x2\frac{\partial u}{\partial y} = x^2 with no yy remaining. The variable has not vanished from the problem though: it is still there inside sin(x2y)\sin(x^2y).