Multivariable calculus
Partial Derivatives of e^(-x^2-y^2)
For f(x, y) = e^(-x^2 - y^2), the partial with respect to x is -2x e^(-x^2 - y^2) and the partial with respect to y is -2y e^(-x^2 - y^2). The exponential factor is the same in both; only the inside derivative changes, from -2x to -2y.
Differentiate the exponent, keep the exponential
Write the exponent as . Holding fixed makes a constant, so , and the chain rule multiplies the untouched exponential by that.
At the height is and both partials equal . The two slopes match there because the point sits on the diagonal, where and play identical roles.
The mistake: losing the sign or differentiating both terms
- Writing drops the minus sign that comes from . That reverses the direction of steepest ascent, which is a real error on any gradient or directional derivative question.
- Writing differentiates the whole exponent, including the term that is frozen. When moves, contributes nothing.
- Writing alone forgets that the outer exponential survives the chain rule as a factor.
The shape settles the sign question. This surface is a bell peaking at the origin, so for the height falls as grows and must be negative there. The correct formula does exactly that, since the exponential is positive and .
Where the bell is flat and where it is steepest
The exponential is never zero, so both partials vanish only at the origin, the peak, where . Everywhere else the gradient points straight back toward the origin, since is a negative multiple of the position vector.
That magnitude is at the peak, grows, then decays. It is largest at , where it equals about . The steepest part of a Gaussian bump is not at its top but partway down the side, which is why the top of the bell looks flat.
Frequently asked questions
Why do both partials share the same exponential factor?
Because the chain rule leaves the outer exponential untouched. Only the derivative of the exponent changes, giving -2x when x moves and -2y when y moves.
Where is the gradient of e^(-x^2-y^2) zero?
Only at the origin. The exponential is never zero, so -2x and -2y must both vanish, which happens at the single point (0, 0), the peak of the bell, where the height is 1.