Multivariable calculus

Partial Derivatives of e^(-x^2 - y^2 - z^2)

For f(x,y,z) = e^(-x^2 - y^2 - z^2), the partial derivative with respect to x is negative 2x times f, and the y and z partials replace x with y and z. Every partial derivative keeps the whole exponential factor, so the gradient is negative 2f times the position vector and points back toward the origin.

f(x,y,z)=ex2y2z2f(x,y,z) = e^{-x^2 - y^2 - z^2}
fx=2xex2y2z2\frac{\partial f}{\partial x} = -2x\,e^{-x^2 - y^2 - z^2}
fy=2yex2y2z2\frac{\partial f}{\partial y} = -2y\,e^{-x^2 - y^2 - z^2}
fz=2zex2y2z2\frac{\partial f}{\partial z} = -2z\,e^{-x^2 - y^2 - z^2}

Differentiate the exponent, keep the exponential

Write f=euf = e^{u} with u=x2y2z2u = -x^2 - y^2 - z^2. The exponential is its own derivative, so every partial derivative is eue^u times the corresponding partial derivative of the exponent.

Holding yy and zz still makes y2z2-y^2 - z^2 a constant, so ux=2x\frac{\partial u}{\partial x} = -2x. That factor is the entire difference between ff and its xx partial.

fx=2xex2y2z2=2xf\frac{\partial f}{\partial x} = -2x\,e^{-x^2 - y^2 - z^2} = -2x f

Because uu treats the three variables identically, the other two answers follow by replacing xx with yy or zz. Writing each partial derivative as 2xf-2x f rather than spelling out the exponential keeps later work, such as second derivatives, much shorter.

The mistake: dropping or dividing by the exponential

Two errors dominate here. The first is writing 2x-2x alone, having differentiated the exponent and forgotten that the chain rule multiplies rather than replaces. The second is losing the minus sign, since the exponent already carries one and it is easy to count it twice or not at all.

A related confusion is treating ex2e^{-x^2} as 1ex2\frac{1}{e^{x^2}} and then reaching for the quotient rule. That rewriting is correct but pointless: it produces the same answer with more steps and one more chance to mislay a sign.

  • The exponential factor ex2y2z2e^{-x^2-y^2-z^2} appears in every partial derivative.
  • The sign is negative wherever the matching coordinate is positive.
  • The exponential is never zero, so the sign of each partial derivative is decided entirely by 2x-2x, 2y-2y or 2z-2z.

What the gradient tells you about the bump

Collecting the three partial derivatives into a vector shows the geometry immediately. The gradient is a negative multiple of the position vector, so at every point other than the origin it points straight back toward the origin, which is where the function is largest.

f=2ex2y2z2x,y,z\nabla f = -2e^{-x^2 - y^2 - z^2}\,\langle x, y, z \rangle

Since the exponential never vanishes, all three partial derivatives are zero only when x=y=z=0x = y = z = 0. The origin is therefore the sole critical point, and it is the global maximum with f=1f = 1. Everywhere else the function is strictly decreasing as you move outward.

At (1,0,0)(1,0,0) the xx partial is 2e1-2e^{-1}, about 0.736-0.736, while the yy and zz partials are zero. That fits: from that point, moving along yy or zz starts you off along the ridge of the bump, where the surface is momentarily level.

Frequently asked questions

What is the second partial derivative with respect to x?

Apply the product rule to 2xf-2xf, using fx=2xf\frac{\partial f}{\partial x} = -2xf again. You get 2fx2=(4x22)f\frac{\partial^2 f}{\partial x^2} = (4x^2 - 2)f, which is negative near the origin and positive once x>12|x| > \frac{1}{\sqrt2}, marking where the bump changes concavity.

Why do the level surfaces make the gradient radial?

The function depends only on x2+y2+z2x^2+y^2+z^2, so its level surfaces are spheres centred at the origin. A gradient is always perpendicular to the level surface through the point, and the perpendicular to a sphere is the radial direction.