Multivariable calculus

Partial Derivatives of e^(x y^2)

The partials of e^(x y^2) are f_x = y^2 e^(x y^2) and f_y = 2xy e^(x y^2). The exponential reproduces itself, so all the work is in the inner function x y^2. Holding y fixed makes it a constant multiple of x, giving y^2, while holding x fixed leaves x times the derivative of y^2, giving 2xy.

f(x,y)=exy2f(x,y) = e^{xy^2}
fx=y2exy2\frac{\partial f}{\partial x} = y^2\,e^{xy^2}
fy=2xyexy2\frac{\partial f}{\partial y} = 2xy\,e^{xy^2}

The exponential comes along unchanged

Set u=xy2u = xy^2. Because ddueu=eu\frac{d}{du}e^u = e^u, the outer factor of both partials is exy2e^{xy^2} again. Everything that separates the two answers happens inside, in ux\frac{\partial u}{\partial x} and uy\frac{\partial u}{\partial y}.

fx=exy2x(xy2)=y2exy2\frac{\partial f}{\partial x} = e^{xy^2}\cdot\frac{\partial}{\partial x}(xy^2) = y^2\,e^{xy^2}

Holding yy fixed makes xy2xy^2 a constant multiple of xx, and the constant is y2y^2. No product rule is needed, because only one factor is moving.

fy=exy2y(xy2)=2xyexy2\frac{\partial f}{\partial y} = e^{xy^2}\cdot\frac{\partial}{\partial y}(xy^2) = 2xy\,e^{xy^2}

For yy the frozen constant is xx, and it multiplies the 2y2y that the power rule produces from y2y^2. That is where 2xy2xy comes from: the xx is carried through, not created.

Two ways the inner partial gets truncated

The first error is dropping the frozen variable and writing fy=2yexy2\frac{\partial f}{\partial y} = 2y\,e^{xy^2}. Test it at (2,1)(2,1): the true value is 4e229.5564e^2 \approx 29.556 and the truncated one gives 2e214.7782e^2 \approx 14.778, short by exactly the factor x=2x = 2.

The second is swapping the two inner partials. Unlike exye^{xy}, this function is not symmetric in xx and yy, so the swap shows up at almost any test point: at (2,1)(2,1) the xx partial is 1e27.3891\cdot e^2 \approx 7.389 while the yy partial is about 29.55629.556, four times larger.

  • Name the inner function u=xy2u = xy^2 before differentiating anything.
  • Freeze one variable and read off exactly what multiplies the other.
  • Attach the untouched exy2e^{xy^2} last, so it cannot absorb a lost factor.

A whole line of critical points

The exponential is never zero, so fx=y2exy2f_x = y^2e^{xy^2} vanishes only when y=0y = 0, and at those points fy=2xyexy2f_y = 2xy\,e^{xy^2} is zero too. The critical set is therefore the entire xx axis, and along it f=e0=1f = e^0 = 1.

None of those points is a maximum or a minimum. Step off the axis at x=1x = 1 and the value rises to ey2>1e^{y^2} > 1; do the same at x=1x = -1 and it falls to ey2<1e^{-y^2} < 1. At (1,0.1)(1,\,0.1) the value is about 1.01011.0101 and at (1,0.1)(-1,\,0.1) it is about 0.990.99, so the axis is a watershed rather than a ridge or a trough.

One more shape check comes free: y2y^2 is never negative, so fx0f_x \ge 0 everywhere and ff never decreases as you move right. Any candidate xx partial carrying an odd power of yy out front would change sign with yy and is wrong on that ground alone.

Frequently asked questions

Why is there no x in the x partial?

Because u=xy2u = xy^2 is linear in xx, so ux=y2\frac{\partial u}{\partial x} = y^2 with no xx left in it. The variable has not left the problem: it is still sitting inside the factor exy2e^{xy^2}, which is why the xx partial still changes value as you move along a horizontal line.

Do the mixed second partials agree?

Yes, and checking that is a free test of both first partials. Differentiating fx=y2exy2f_x = y^2e^{xy^2} with respect to yy gives (2y+2xy3)exy2(2y + 2xy^3)e^{xy^2}, and differentiating fy=2xyexy2f_y = 2xy\,e^{xy^2} with respect to xx gives the same expression. If yours disagree, one of the first partials is wrong.