Multivariable calculus

Gradient of x e^(yz): Chain Rule in the Exponent

For f(x, y, z) = x e^(yz) the gradient is (e^(yz), xz e^(yz), xy e^(yz)). The x component is simple because the exponential is a constant multiplier there, while the y and z components each pick up an inner factor from differentiating the exponent yz. At (2, 1, 0) the gradient is (1, 0, 2).

f(x,y,z)=xeyzf(x,y,z) = x e^{yz}
f=eyz,  xzeyz,  xyeyz\nabla f = \left\langle e^{yz},\; xz e^{yz},\; xy e^{yz} \right\rangle
fx=eyz\frac{\partial f}{\partial x} = e^{yz}
fy=xzeyz\frac{\partial f}{\partial y} = xz e^{yz}
fz=xyeyz\frac{\partial f}{\partial z} = xy e^{yz}

Three different jobs for three variables

Each variable plays a different role, so each partial uses a different rule. With yy and zz frozen, eyze^{yz} is one fixed number multiplying xx, and differentiating a constant times xx returns the constant.

fx=eyz\frac{\partial f}{\partial x} = e^{yz}

For yy, the outer function is the exponential and the inner function is the exponent yzyz. The chain rule says to copy the exponential and multiply by the derivative of the exponent, which is zz when zz is held fixed.

fy=xeyzy(yz)=xzeyz\frac{\partial f}{\partial y} = x \cdot e^{yz} \cdot \frac{\partial}{\partial y}\left(yz\right) = xz e^{yz}

The zz partial is the mirror image, with inner derivative yy.

fz=xyeyz\frac{\partial f}{\partial z} = xy e^{yz}

The mistake: dropping the inner factor

The classic wrong answer is fy=xeyz\frac{\partial f}{\partial y} = x e^{yz}. It looks reasonable because eue^u differentiates to eue^u, but that rule applies only when uu is the variable itself. Here u=yzu = yz, and the chain rule demands the extra factor uy=z\frac{\partial u}{\partial y} = z.

  • Structure check: the exponent yzyz changes at rate zz when yy moves, so a zz has to appear in the yy partial. At z=0z = 0 the exponent does not move at all as yy changes, and the yy partial is correctly zero there.
  • The forgotten factor is invisible when z=1z = 1, which is why testing at z=1z = 1 hides the error. Test at z=2z = 2 instead.
  • A second slip is copying the same inner factor into both components. The yy partial gets zz, the zz partial gets yy, never the same one twice.

If you are unsure, rename the exponent. Write u=yzu = yz and f=xeuf = xe^u, then fy=xeuuy\frac{\partial f}{\partial y} = xe^u \frac{\partial u}{\partial y}. The structure becomes hard to misread.

A check, and why this surface has no critical points

At (2,1,0)(2, 1, 0) the exponent is yz=0yz = 0, so eyz=1e^{yz} = 1 and f=2f = 2.

f(2,1,0)=1,  201,  211=1,  0,  2\nabla f(2,1,0) = \left\langle 1,\; 2 \cdot 0 \cdot 1,\; 2 \cdot 1 \cdot 1 \right\rangle = \left\langle 1,\; 0,\; 2 \right\rangle

The yy component is zero here because z=0z = 0: with zz pinned at zero, changing yy does not change the exponent, so ff is momentarily flat in that direction. This is a genuine feature of the function, not an arithmetic accident.

The xx component is eyze^{yz}, and an exponential is never zero. So f\nabla f is never the zero vector and ff has no critical points anywhere in space. Any maximum or minimum of ff on a bounded region must therefore occur on the boundary.

Frequently asked questions

Why does the xx partial have no exponential factor multiplying it?

It does have one: fx=eyz\frac{\partial f}{\partial x} = e^{yz} is entirely that factor. Since ff is linear in xx, differentiating removes the xx and leaves the coefficient, which is eyze^{yz}.

What is the direction of steepest increase at (1,1,1)(1,1,1)?

There eyz=ee^{yz} = e, so f=e,e,e\nabla f = \left\langle e, e, e \right\rangle, which points along 1,1,1\left\langle 1,1,1 \right\rangle. The steepest ascent direction is the unit vector 131,1,1\frac{1}{\sqrt{3}}\left\langle 1,1,1 \right\rangle and the maximum rate is e34.71e\sqrt{3} \approx 4.71.