Multivariable calculus

Partial Derivatives of sin(xyz): Chain Rule

The partials of sin(xyz) are f_x = yz cos(xyz), f_y = xz cos(xyz) and f_z = xy cos(xyz). The outer sine becomes a cosine of the same product each time, and the inner partial of xyz with respect to one variable is just the product of the other two.

f(x,y,z)=sin(xyz)f(x,y,z) = \sin(xyz)
fx=yzcos(xyz)\frac{\partial f}{\partial x} = yz\cos(xyz)
fy=xzcos(xyz)\frac{\partial f}{\partial y} = xz\cos(xyz)
fz=xycos(xyz)\frac{\partial f}{\partial z} = xy\cos(xyz)

A triple product, one variable at a time

Set u=xyzu = xyz. Holding yy and zz fixed makes uu a constant multiple of xx, so ux=yz\frac{\partial u}{\partial x} = yz. The same reasoning gives xzxz and xyxy for the other two variables.

fx=yzcos(xyz),fy=xzcos(xyz),fz=xycos(xyz)\frac{\partial f}{\partial x} = yz\cos(xyz), \qquad \frac{\partial f}{\partial y} = xz\cos(xyz), \qquad \frac{\partial f}{\partial z} = xy\cos(xyz)

The rule of thumb: the coefficient of each partial is the product of the variables you did not differentiate with respect to. That is the constant-multiple rule doing its job, not the product rule.

The mistake: using the product rule on xyz

A partial derivative freezes the other variables, so xyzxyz is not a product of three functions of xx. Applying the product rule anyway and writing yz+xz+xyyz + xz + xy for ux\frac{\partial u}{\partial x} answers a different question. That sum is the rate of change when all three variables increase together at the same rate, a directional derivative along (1,1,1)(1,1,1), not a partial derivative at all.

Test it at (1,2,3)(1, 2, 3), where u=6u = 6. The true fx=23cos6=6cos65.761f_x = 2\cdot 3\cos 6 = 6\cos 6 \approx 5.761. The product rule answer uses 23+13+12=112\cdot3 + 1\cdot3 + 1\cdot2 = 11 and gives about 10.56210.562, nearly double.

  • Freeze the other two variables and name their product.
  • Differentiate the outer sine, leaving xyzxyz intact inside the cosine.
  • Multiply by the frozen product, not by a sum of three terms.

Symmetry as a free check

The function is unchanged if you swap any two of its variables, so its partials must respect that too. Swap yy and zz in fx=yzcos(xyz)f_x = yz\cos(xyz) and the expression comes back identical. A candidate answer that breaks this symmetry is wrong before you test a single number.

On the plane x=0x = 0 the product xyzxyz is zero, so cos(xyz)=1\cos(xyz) = 1 and the three partials collapse to yzyz, 00 and 00. The gradient there points purely along the xx direction, which says the function changes only as you step off that plane.

Frequently asked questions

How many chain rule steps does sin(xyz) need?

One. There is a single outer sine wrapped around a single inner function, and the three partials differ only in what the inner partial evaluates to. You would chain twice only if the inner function were itself a composition.

Where does the gradient vanish?

Wherever all three of yzcos(xyz)yz\cos(xyz), xzcos(xyz)xz\cos(xyz) and xycos(xyz)xy\cos(xyz) are zero. That happens on the surfaces xyz=π2+kπxyz = \frac{\pi}{2} + k\pi, and also wherever two of the three variables are zero, for example along the whole zz axis.