Multivariable calculus

Second Partials of the Gaussian e^(-x^2 - y^2)

Write E = e^(-x^2 - y^2). For the Gaussian bump f(x,y) = E the second partials are f_xx = (4x^2 - 2)E, f_yy = (4y^2 - 2)E, and the mixed partial f_xy = 4xyE. At the only critical point, the origin, the Hessian determinant is 4 and f_xx = -2, so the origin is a local maximum with value 1.

f(x,y)=e(x2+y2)f(x,y) = e^{-\left(x^{2} + y^{2}\right)}
fx=2xe(x2+y2)\frac{\partial f}{\partial x} = -2x\,e^{-\left(x^{2} + y^{2}\right)}
fy=2ye(x2+y2)\frac{\partial f}{\partial y} = -2y\,e^{-\left(x^{2} + y^{2}\right)}

Second and mixed partials

2fx2=(4x22)e(x2+y2)\frac{\partial^{2} f}{\partial x^{2}} = \left(4x^{2} - 2\right)e^{-\left(x^{2} + y^{2}\right)}
2fyx=4xye(x2+y2)\frac{\partial^{2} f}{\partial y\,\partial x} = 4xy\,e^{-\left(x^{2} + y^{2}\right)}
2fy2=(4y22)e(x2+y2)\frac{\partial^{2} f}{\partial y^{2}} = \left(4y^{2} - 2\right)e^{-\left(x^{2} + y^{2}\right)}

Differentiating the bump twice

Abbreviate E=e(x2+y2)E = e^{-(x^{2} + y^{2})}, and note that Ex=2xE\frac{\partial E}{\partial x} = -2xE. That one fact drives every computation on this page.

fx=2xE,fy=2yE\frac{\partial f}{\partial x} = -2xE, \qquad \frac{\partial f}{\partial y} = -2yE

For fxxf_{xx}, differentiate the product 2xE-2x \cdot E in xx. The first factor gives 2E-2E and the second contributes (2x)(2xE)(-2x)(-2xE).

2fx2=2E+4x2E=(4x22)E\frac{\partial^{2} f}{\partial x^{2}} = -2E + 4x^{2}E = \left(4x^{2} - 2\right)E

For the mixed partial, differentiate 2xE-2xE in yy. The factor 2x-2x is now constant, so only EE moves and no extra term appears.

2fyx=2x(2yE)=4xyE\frac{\partial^{2} f}{\partial y\,\partial x} = -2x \cdot (-2yE) = 4xyE

The second derivative test at the peak

Since EE is never zero, the equations 2xE=0-2xE = 0 and 2yE=0-2yE = 0 force x=y=0x = y = 0. The origin is the only critical point.

Evaluate the three second partials there. With E(0,0)=1E(0,0) = 1 you get fxx=2f_{xx} = -2, fyy=2f_{yy} = -2, and fxy=0f_{xy} = 0.

D=fxxfyy(fxy)2=(2)(2)0=4>0D = f_{xx}f_{yy} - \left(f_{xy}\right)^{2} = (-2)(-2) - 0 = 4 > 0

Positive DD with negative fxxf_{xx} means a local maximum, and here it is the global maximum, f(0,0)=1f(0,0) = 1. Away from the origin fxxf_{xx} changes sign at x=12|x| = \frac{1}{\sqrt{2}}, which is where the profile switches from concave down at the peak to concave up in the tails. Those are the inflection points of the bell curve.

The mistake students make

The usual error is fxx=4x2Ef_{xx} = 4x^{2}E, which comes from chaining through the exponential twice but forgetting the product rule on the factor 2x-2x that the first derivative produced. The missing 2E-2E is exactly the term that makes the origin a maximum, and without it D=0D = 0 there and the test says nothing.

A second slip is a sign error on the mixed partial. Two negatives multiply, so fxy=4xyEf_{xy} = 4xyE is positive in the first quadrant, not negative.

Clairaut symmetry is easy to verify here: differentiating fy=2yEf_y = -2yE in xx gives 2y(2xE)=4xyE-2y(-2xE) = 4xyE, the same expression. Every partial of this function is a polynomial times EE, so all of them are continuous everywhere and the two orders can never disagree.

Frequently asked questions

Where is f_xx zero for the Gaussian bump?

Where 4x2=24x^{2} = 2, that is x=±12±0.707x = \pm\frac{1}{\sqrt{2}} \approx \pm 0.707, for any yy. Those lines separate the concave down cap of the bump from the concave up tails.

Why is the mixed partial zero on the axes?

Because fxy=4xyEf_{xy} = 4xyE contains both xx and yy as factors, so it vanishes whenever x=0x = 0 or y=0y = 0. The bump is symmetric about both axes, so there is no twist along them.