Multivariable calculus

Partial Derivatives of e^x/(1 + e^y)

For f(x, y) = e^x/(1 + e^y), the partial with respect to x is e^x/(1 + e^y), the function itself, and the partial with respect to y is -e^x e^y/(1 + e^y)^2. Only the denominator depends on y, so the x partial needs no quotient rule at all.

ex1+ey\frac{e^{x}}{1+e^{y}}
ex1+ey\frac{e^{x}}{1+e^{y}}
exey(1+ey)2-\frac{e^{x}e^{y}}{\left(1+e^{y}\right)^{2}}

Only one variable sits in the denominator

The variable xx appears only in the numerator, so when xx moves the denominator is a fixed number and you divide its derivative straight through. No quotient rule is needed.

fx=11+eyddxex=ex1+ey=f(x,y)\frac{\partial f}{\partial x} = \frac{1}{1+e^{y}}\cdot\frac{d}{dx}e^{x} = \frac{e^{x}}{1+e^{y}} = f(x,y)

For yy, rewrite the function as ex(1+ey)1e^{x}\left(1+e^{y}\right)^{-1} and use the power rule with the chain rule. The outside gives (1+ey)2-\left(1+e^{y}\right)^{-2} and the inside gives eye^{y}.

fy=ex(1)(1+ey)2ey=exey(1+ey)2\frac{\partial f}{\partial y} = e^{x}\cdot\left(-1\right)\left(1+e^{y}\right)^{-2}\cdot e^{y} = -\frac{e^{x}e^{y}}{\left(1+e^{y}\right)^{2}}

At the origin the height is 12\frac{1}{2}, the xx slope is 12\frac{1}{2}, and the yy slope is 14-\frac{1}{4}.

The mistake: quotient rule where there is nothing to differentiate

  • Running the full quotient rule for the xx partial adds a term containing x(1+ey)\frac{\partial}{\partial x}\left(1+e^{y}\right). That derivative is 00, so the extra term is not wrong so much as wasted, and it is where sign errors creep in.
  • Writing ex(1+ey)2-\frac{e^{x}}{\left(1+e^{y}\right)^{2}} for the yy partial forgets the inside derivative eye^{y} from the chain rule.
  • Writing exey(1+ey)2\frac{e^{x}e^{y}}{\left(1+e^{y}\right)^{2}} loses the minus sign that the power 1-1 produces.

The sign is checkable without any algebra. Raising yy makes the denominator larger and the fraction smaller, so fy\frac{\partial f}{\partial y} must be negative at every point. The correct formula is a negative number over a positive square, so it is.

A logistic curve in disguise

The factor 11+ey\frac{1}{1+e^{y}} is 1σ(y)1-\sigma(y), where σ\sigma is the logistic function, so this surface is an exponential in xx scaled by a logistic decay in yy. Its yy derivative is minus exe^{x} times the logistic derivative σ(y)=ey(1+ey)2\sigma'(y) = \frac{e^{y}}{\left(1+e^{y}\right)^{2}}.

fy=exσ(y),σ(y)=11+ey\frac{\partial f}{\partial y} = -e^{x}\,\sigma'(y), \qquad \sigma(y) = \frac{1}{1+e^{-y}}

Because σ\sigma' peaks at y=0y = 0 and decays in both directions, the surface is most sensitive to yy near the xx-axis and nearly flat in yy far from it, while it keeps growing without bound in xx. The function is positive everywhere and has no critical points.

Frequently asked questions

Why does the x partial equal the function itself?

Because x appears only in the factor e^x, which is its own derivative, and the denominator 1 + e^y is a constant while x moves, so the whole expression comes back unchanged.

Can the denominator ever be zero?

No. Since e^y is always positive, 1 + e^y is greater than 1, so the function and both partial derivatives are defined at every point of the plane.