Multivariable calculus

Gradient of e^(xy): Components and Saddle Point

For f(x, y) = e^(xy) the gradient is (y e^(xy), x e^(xy)), that is e^(xy) times the vector (y, x). Differentiate the exponential, which reproduces itself, then multiply by the partial derivative of the exponent xy. The only point where this gradient vanishes is the origin, and that point is a saddle.

f(x,y)=exyf(x,y) = e^{xy}
f=exyy,  x\nabla f = e^{xy}\left\langle y,\; x \right\rangle
fx=yexy\frac{\partial f}{\partial x} = y\,e^{xy}
fy=xexy\frac{\partial f}{\partial y} = x\,e^{xy}

The exponential survives, the exponent supplies the factor

With u=xyu = xy and f=euf = e^{u}, the chain rule gives fx=euux\frac{\partial f}{\partial x} = e^{u}\frac{\partial u}{\partial x}. Differentiating the exponential changes nothing about it, so the entire difference between the two components is the derivative of the exponent.

fx=exyx(xy)=yexy\frac{\partial f}{\partial x} = e^{xy}\cdot\frac{\partial}{\partial x}(xy) = y\,e^{xy}
fy=exyy(xy)=xexy\frac{\partial f}{\partial y} = e^{xy}\cdot\frac{\partial}{\partial y}(xy) = x\,e^{xy}

The factor that appears is the other variable, which surprises people at first. Along a horizontal line, f=exyf = e^{xy} is an exponential in xx with growth rate yy, so the slope is proportional to yy. That is precisely what yexyy\,e^{xy} says.

One critical point, and it is a saddle

Since exye^{xy} is never zero, f=0,0\nabla f = \left\langle 0,0\right\rangle requires y=0y = 0 and x=0x = 0 at the same time. The origin is the only candidate for a maximum or minimum, and f(0,0)=1f(0,0) = 1.

Walk away from it along two lines to see what kind of point it is.

  • Along y=xy = x: f=ex21f = e^{x^{2}} \geq 1, so the origin looks like a minimum from this direction.
  • Along y=xy = -x: f=ex21f = e^{-x^{2}} \leq 1, so it looks like a maximum from that one.

Higher one way and lower the other is the definition of a saddle. The level curves make the same point: exy=ce^{xy} = c means xy=lncxy = \ln c, a family of hyperbolas whose degenerate member is the pair of axes crossing at the origin.

Away from the origin the vector grows fast. At (1,1)(1,1), f=e,e2.7183,2.7183\nabla f = \left\langle e, e\right\rangle \approx \left\langle 2.7183, 2.7183\right\rangle, pointing outward along the line y=xy = x, which is the direction in which xyxy increases fastest.

The mistake: treating e^(xy) like e^x

The usual wrong answer is fx=exy\frac{\partial f}{\partial x} = e^{xy}, from a reflex that the derivative of an exponential is itself. That rule applies to exe^{x}; the moment the exponent is anything else, the chain rule attaches its derivative.

A second wrong answer, xyexyxy\,e^{xy}, multiplies by the whole exponent instead of by its derivative.

One test point will not catch both, so use two.

  • At (2,0)(2,0) the function is constant in xx, since f(x,0)=e0=1f(x,0) = e^{0} = 1 for every xx, so the true xx partial is 00. The answer exye^{xy} gives 11 there and is exposed, while xyexyxy\,e^{xy} gives 00 and slips through.
  • At (2,1)(2,1) the true xx partial is yexy=e27.389y\,e^{xy} = e^{2} \approx 7.389, while xyexyxy\,e^{xy} gives 2e214.7782e^{2} \approx 14.778. Avoid (1,1)(1,1) as a test point: there xx and yy are both 11, every stray factor equals 11, and the true answer and both wrong ones all return ee.

Frequently asked questions

Why does the xx partial of exye^{xy} contain yy and not xx?

Because with yy held fixed the function is e(constant)xe^{(\text{constant})x}, an exponential whose growth rate is that constant. The derivative of ekxe^{kx} is kekxk e^{kx}, and here k=yk = y, so the factor out front is yy.

Is the origin a maximum, minimum or saddle for exye^{xy}?

A saddle. Along the line y=xy = x the function is ex2e^{x^{2}}, which rises above f(0,0)=1f(0,0) = 1, and along y=xy = -x it is ex2e^{-x^{2}}, which falls below 11. The Hessian test agrees: fxxfyyfxy2=1f_{xx}f_{yy} - f_{xy}^{2} = -1 at the origin, which is negative.