Multivariable calculus

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

For f(x,y) = (x + y)/(1 + e^x), the partial with respect to x is (1 + e^x - (x + y)e^x) divided by (1 + e^x) squared, and the partial with respect to y is 1/(1 + e^x). The denominator is always at least 1, so both partials exist everywhere.

f(x,y)=x+y1+exf(x,y) = \frac{x + y}{1 + e^{x}}
fx=1+ex(x+y)ex(1+ex)2\frac{\partial f}{\partial x} = \frac{1 + e^{x} - (x+y)e^{x}}{\left(1+e^{x}\right)^{2}}
fy=11+ex\frac{\partial f}{\partial y} = \frac{1}{1 + e^{x}}

One variable sits only in the numerator

Look at where each variable lives. The variable yy appears only in the numerator, and only to the first power, so the yy-partial is the reciprocal of the denominator with nothing else attached.

fy=11+ex\frac{\partial f}{\partial y} = \frac{1}{1 + e^{x}}

The variable xx appears in both places, so the xx-partial is a real quotient rule problem. The numerator x+yx+y has xx-derivative 1, and the denominator 1+ex1+e^{x} has xx-derivative exe^{x}.

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

You can factor the exe^{x} terms if you want a compact form: the numerator is 1+ex(1xy)1 + e^{x}\left(1 - x - y\right). Both versions are correct, and the factored one makes the sign change easier to locate.

fx=1+ex(1xy)(1+ex)2\frac{\partial f}{\partial x} = \frac{1 + e^{x}\left(1 - x - y\right)}{\left(1+e^{x}\right)^{2}}

The mistake: differentiating the exponential in the wrong variable

Because exe^{x} has no yy in it, its yy-derivative is zero. Students who run the full quotient rule for fy\frac{\partial f}{\partial y} sometimes still write a (x+y)ex-\left(x+y\right)e^{x} term, which does not belong: nothing in the denominator responds to yy.

  • y(1+ex)=0\frac{\partial}{\partial y}\left(1+e^{x}\right) = 0, so the second quotient rule term vanishes and one factor of 1+ex1+e^{x} cancels.
  • x(x+y)=1\frac{\partial}{\partial x}\left(x+y\right) = 1, not 1+y1+y. The yy is a constant when xx moves.
  • 1+ex1+e^{x} is never zero, since ex>0e^{x}>0. The function is smooth on the whole plane.

Notice also that fy\frac{\partial f}{\partial y} is strictly positive everywhere. That says the surface always rises as yy increases, which you can see directly in the original formula: increasing yy increases the numerator while leaving the positive denominator alone.

Checking at the origin

At (0,0)(0,0) we have e0=1e^{0}=1, so the denominator is 2 and its square is 4. The xx-partial numerator is 1+10=21 + 1 - 0 = 2.

f(0,0)=12,  12\nabla f(0,0) = \left\langle \tfrac{1}{2},\; \tfrac{1}{2} \right\rangle

Equal components mean the tangent plane at the origin rises at the same rate in both coordinate directions, and the steepest ascent from there points along the diagonal 1,1\langle 1, 1 \rangle.

Frequently asked questions

Is there a shortcut for the y-partial?

Yes. Split the fraction as x1+ex+y1+ex\frac{x}{1+e^{x}} + \frac{y}{1+e^{x}}. The first piece has no yy in it, so its yy-derivative is zero, and the second is yy times a constant, giving 11+ex\frac{1}{1+e^{x}} immediately with no quotient rule at all.

Where is the x-partial zero?

Set the numerator 1+ex(1xy)1 + e^{x}(1 - x - y) to zero, which rearranges to x+y=1+exx + y = 1 + e^{-x}. That is a curve in the plane, not isolated points, and along it the surface is momentarily flat in the xx direction.