Solution (source code)

= Solution

On $y=x$, the restricted function is $g(x)=2x^4-16x^2$. Its derivative is $g'(x)=8x(x^2-4)$, so the turning points are $x=-2,0,2$. The restricted second derivative is $g''=24x^2-32$, negative at zero and positive at $\pm2$. Thus
$$
\boxed{x=0:\text{local maximum }g=0;\qquad x=\pm2:\text{minima }g=-32.}
$$
The corresponding points in the plane are $(0,0)$ and $(\pm2,\pm2)$. Along the diagonal the derivative is $f_x+f_y$, not a single arbitrary partial derivative; here $f_x=f_y$, so their zeros and sign changes agree with the restricted-curve calculation.