Multivariable calculus

Partial Derivatives of x e^y + y e^x

For f(x, y) = x e^y + y e^x, the partial with respect to x is e^y + y e^x and the partial with respect to y is x e^y + e^x. In each term one factor is a frozen constant and the other is differentiated, and swapping x and y swaps the two answers.

xey+yexx e^{y} + y e^{x}
ey+yexe^{y} + y\,e^{x}
xey+exx\,e^{y} + e^{x}

Take the sum one term at a time

Differentiate term by term and, inside each term, ask which factor actually contains the moving variable. For fx\frac{\partial f}{\partial x}: in xeyx e^{y} the factor eye^{y} is a constant, so the term differentiates to eye^{y}; in yexy e^{x} the factor yy is a constant, so the term differentiates to yexy e^{x}.

fx=ey+yex\frac{\partial f}{\partial x} = e^{y} + y\,e^{x}

Now move yy instead. In xeyx e^{y} the constant is xx, leaving xeyx e^{y}; in yexy e^{x} the constant is exe^{x}, leaving exe^{x}.

fy=xey+ex\frac{\partial f}{\partial y} = x\,e^{y} + e^{x}

At (1,0)(1,0) the slopes are e0+0=1e^{0} + 0 = 1 in xx and 1+e3.7181 + e \approx 3.718 in yy.

The mistake: a product rule with nothing to differentiate

  • Writing x(xey)=ey+xey\frac{\partial}{\partial x}\left(x e^{y}\right) = e^{y} + x e^{y} runs the product rule on a factor that does not depend on xx. The derivative of eye^{y} with respect to xx is 00, so only the first term survives.
  • Writing x(yex)=ex\frac{\partial}{\partial x}\left(y e^{x}\right) = e^{x} drops the constant multiplier yy.
  • Reporting ey+exe^{y} + e^{x} as the xx partial, which is really the mixed second partial 2fxy\frac{\partial^{2} f}{\partial x \partial y}.

Symmetry gives a free check. Because f(x,y)=f(y,x)f(x,y) = f(y,x), the yy partial must be the xx partial with the letters exchanged. Compare ey+yexe^{y}+y e^{x} with xey+exx e^{y}+e^{x}: swap xx and yy in either and you get the other.

The one critical point

Set both partials to zero: ey+yex=0e^{y} + y\,e^{x} = 0 and xey+ex=0x\,e^{y} + e^{x} = 0. Multiply the first by xx and subtract the second. The xeyx\,e^{y} terms cancel and what is left factors.

x(ey+yex)(xey+ex)=ex(xy1)=0x\left(e^{y} + y\,e^{x}\right) - \left(x\,e^{y} + e^{x}\right) = e^{x}\left(xy - 1\right) = 0

Since exe^{x} is never zero, every critical point lies on the hyperbola xy=1xy = 1. Put y=1xy = \frac{1}{x} into the second equation and it becomes xe1/x+ex=0x\,e^{1/x} + e^{x} = 0, which needs x<0x < 0 because exe^{x} is positive. That left side has derivative e1/x(11x)+exe^{1/x}\left(1 - \frac{1}{x}\right) + e^{x}, and for x<0x < 0 the bracket exceeds 11, so the derivative is positive and the left side is strictly increasing. It can cross zero at most once, and it does cross at x=1x = -1. So (1,1)(-1,-1) is the only critical point, and the value there is 2e0.736-\frac{2}{e} \approx -0.736.

The second derivatives there are fxx=yex=e1f_{xx} = y e^{x} = -e^{-1}, fyy=xey=e1f_{yy} = x e^{y} = -e^{-1}, and fxy=ey+ex=2e1f_{xy} = e^{y}+e^{x} = 2e^{-1}, so the discriminant is negative.

D=fxxfyy(fxy)2=e24e2=3e20.406D = f_{xx}f_{yy} - \left(f_{xy}\right)^{2} = e^{-2} - 4e^{-2} = -3e^{-2} \approx -0.406

A negative discriminant means (1,1)(-1,-1) is a saddle point, so this surface has no local maximum or minimum anywhere.

Frequently asked questions

Why do the two partials look like mirror images?

Because the function is symmetric: swapping x and y gives back the same expression. So the partial in y is the partial in x with the letters exchanged, which is a quick way to check your work.

Does x e^y + y e^x have a critical point?

Yes, one, at (-1, -1), where both partials vanish and the value is -2/e, about -0.736. The discriminant there is about -0.406, so it is a saddle point, not a maximum or a minimum.