Find extremes of function $f(x,y,z) = x^2y + y^2z + x - z$ I am preparing for an exam tuesday morning and I would like to ask you, if someone could please review my solution for the following excercise. I don't have the correct answer so I am unable to check whether it is OK.
Find the extremes of polynomial function $f(x,y,z) = x^2y + y^2z + x - z$
So here is how i solved it:
$$
\begin{align*}
f'_x &= 2xy + 1 \hspace{10mm} f'_y = x^2 + 2yz \hspace{10mm}f'_z = y^2 - 1\\
\end{align*}
$$
$$
\begin{align*}
f''_{xx} = 2y \hspace{10mm} f''_{xy} = 2x \hspace{10mm} f''_{xz} = 2y\\
f''_yy = 2z \hspace{10mm} f''_{yz} = 2y \hspace{10mm} f''_{zz} = 0\\
\end{align*}
$$
So now I need to solve this system:
$$
\begin{align*}
2xy + 1 &= 0\\
x^2 + 2yz &= 0\\
y^2 -1 &= 0
\end{align*}
$$
So I get the points:
$A = [-\frac{1}{2}, 1, -\frac{1}{8}]$
$B = [\frac{1}{2}, -1, \frac{1}{8}]$
For point A:
$$
\begin{align*}
f''{xx}(-\frac{1}{2}, 1, -\frac{1}{8}) = 2 \hspace{10mm}
f''{xy}(-\frac{1}{2}, 1, -\frac{1}{8}) = -1 \hspace{10mm}
f''{xz}(-\frac{1}{2}, 1, -\frac{1}{8}) = 0\\
f''{yy}(-\frac{1}{2}, 1, -\frac{1}{8}) = -\frac{1}{4} \hspace{10mm}
f''{yz}(-\frac{1}{2}, 1, -\frac{1}{8}) = 2 \hspace{10mm}
f''{zz}(-\frac{1}{2}, 1, -\frac{1}{8}) = 0\\
\end{align*}
$$
$$
H = 
  \begin{pmatrix}
   2 & -1 & 0 \\
   -1 & -\frac{1}{4} & 2 \\
   0  & 2  & 0 
  \end{pmatrix}
$$
Subdeterminants are: $2, -\frac{3}{2}, -8$
Therefore we don't know whether point A is maxima or minima.
For point B:
$$
\begin{align*}
f''{xx}(-\frac{1}{2}, 1, -\frac{1}{8}) = -2 \hspace{10mm}
f''{xy}(-\frac{1}{2}, 1, -\frac{1}{8}) = 1 \hspace{10mm}
f''{xz}(-\frac{1}{2}, 1, -\frac{1}{8}) = 0\\
f''{yy}(-\frac{1}{2}, 1, -\frac{1}{8}) = \frac{1}{4} \hspace{10mm}
f''{yz}(-\frac{1}{2}, 1, -\frac{1}{8}) = -2 \hspace{10mm}
f''{zz}(-\frac{1}{2}, 1, -\frac{1}{8}) = 0\\
\end{align*}
$$
$$
H = 
  \begin{pmatrix}
   -2 & 1 & 0 \\
   1 & \frac{1}{4} & -2 \\
   0  & -2  & 0 
  \end{pmatrix}
$$
Subdeterminants are: $2, -\frac{3}{2}, 8$
Therefore point B is a local maximum.
So please - is it correct? Thanks in advance.

You wrote $f''_{xz} = 2y$, which is incorrect; it should be 0. However in your later calculations you correctly treat the term as zero.
For your second Hessian, the first subdeterminant is -2, not 2. Even if it were 2, H would not be negative-definite: Sylvester's Criterion states that a matrix is positive-definite (and the critical point a local minimum) if all of the subdeterminants are positive, and negative-definite (and the critical point a local maximum) if the subdeterminants alternate sign, starting with negative. Your second H satisfies neither criterion, and isn't singular (since the determinant is non-zero) so the critical point is neither a minimum nor a maximum.
