Multivariable calculus

Partial Derivatives of xyz e^z

For f(x,y,z) = xyz e^z, the partial with respect to x is yz e^z, the partial with respect to y is xz e^z, and the partial with respect to z is xy(z + 1)e^z. Only the z-partial needs the product rule, since z is the only variable appearing in two factors at once.

f(x,y,z)=xyzezf(x,y,z) = xyz\,e^{z}
fx=yzez\frac{\partial f}{\partial x} = yz\,e^{z}
fy=xzez\frac{\partial f}{\partial y} = xz\,e^{z}
fz=xy(z+1)ez\frac{\partial f}{\partial z} = xy(z+1)e^{z}

Find the variable that appears twice

With three variables the bookkeeping matters more, so start by asking which variable shows up in more than one factor. Here xx appears once, yy appears once, and zz appears twice: as the bare factor zz and inside eze^{z}. Only zz can trigger the product rule.

For the xx-partial, everything except xx is frozen, so ff is the constant yzezyz\,e^{z} times xx. The same reasoning gives the yy-partial.

fx=yzez,fy=xzez\frac{\partial f}{\partial x} = yz\,e^{z}, \qquad \frac{\partial f}{\partial y} = xz\,e^{z}

For the zz-partial, freeze xx and yy so the constant xyxy multiplies the genuine product zezz\,e^{z}. Now apply the product rule and factor the common exponential.

fz=xy(1ez+zez)=xy(z+1)ez\frac{\partial f}{\partial z} = xy\left(1 \cdot e^{z} + z\,e^{z}\right) = xy(z+1)e^{z}

The mistake: assuming every variable behaves the same way

In a symmetric looking expression like xyzxyz, it is tempting to write all three partials by the same pattern and produce xyezxy\,e^{z} for the zz-partial. That answer misses the term where the exponential is differentiated. It happens to agree with the truth where z=0z = 0, and also wherever xy=0xy = 0 makes both versions vanish, but it is wrong everywhere else.

  • Only zz appears in two zz-dependent factors, so only the zz-partial gets a product rule.
  • The factored form xy(z+1)ezxy(z+1)e^{z} shows the zz-partial vanishes when z=1z = -1, or when x=0x = 0, or when y=0y = 0.
  • The exponential never contributes a zero, since ez>0e^{z} > 0 for every real zz.

A structural check: the xx-partial should contain no xx, and the yy-partial should contain no yy, because ff is degree one in each of those variables. The zz-partial does still contain zz, which is the visible fingerprint of the product rule.

The gradient at a point on the plane z = 0

Take (1,1,0)(1,1,0). Both the xx-partial and the yy-partial carry a factor of zz, so they vanish. The zz-partial does not, because of the +1+1 produced by the product rule.

f(1,1,0)=0,  0,  1\nabla f(1,1,0) = \langle 0,\; 0,\; 1 \rangle

Near (1,1,0)(1,1,0) the set where ff vanishes is exactly the plane z=0z=0, since xx and yy are nowhere near zero there. A gradient is perpendicular to its level set, so 0,0,1\langle 0,0,1\rangle is the only direction it could point. That agreement is a strong check on the algebra.

Frequently asked questions

Why does the z-partial have a (z + 1) factor?

The product rule on zezz\,e^{z} gives ez+zeze^{z} + z\,e^{z}. Both terms share eze^{z}, so factoring it out leaves 1+z1 + z. That factored form is more useful than the expanded one, because it shows immediately where the derivative is zero.

Do the mixed partials commute for this function?

Yes. For example, differentiating fx=yzez\frac{\partial f}{\partial x} = yz\,e^{z} with respect to zz gives y(z+1)ezy(z+1)e^{z}, and differentiating fz=xy(z+1)ez\frac{\partial f}{\partial z} = xy(z+1)e^{z} with respect to xx gives y(z+1)ezy(z+1)e^{z} as well. The function is smooth on all of space, so Clairaut's theorem applies.