Maximum point of a function I am looking to find the local maximum value of the function
$$f(x,y,z) = 9+ \frac{(x-y)^2}{xy} + \frac{(y-z)^2}{yz}+ \frac{(z-x)^2}{zx}$$
at a point within the cube $[a,b] \times [a,b] \times [a,b],$ where $0<a<b$. I took the partial derivative of f with respect to x, y, and z. I set those to zero. I used the second-derivative test for multi-variable functions. 
The second-derivative test requires the computation of a 3 by 3 matrix. (Because the function is a three-variable function)
$D= \det \pmatrix{f_{xx} & f_{xy} &f_{xz} \\
f_{yx} & f_{yy} &f_{yz}
\\
f_{zx} & f_{zy} &f_{zz}}$ 
I found that the first dervatives equal to zero at $x=y=z$. On the other hand, Wolfram Alpha confirms that the max for the $[1,3] \times [1,3] \times [1,3]$ is for $y=z=\frac{x}{3}$ and $x=\frac{y}{3}=\frac{z}{3}$. I got confused

We compute
\begin{align}
f_{xx} &= f_x\left(\frac1y-\frac y{x^2}\right) = \frac{2y}{x^3},\\\\
f_{xy} &= f_y \frac{(y+z) \left(x^2-y z\right)}{x^2 y z} =  \frac{-(x^2+y^2)}{x^2y^2}\\
f_{xz} &= f_x \frac{(x+y) \left(z^2-x y\right)}{x y z^2} = \frac{-(x^2-z^2)}{x^2 z^2}\\
f_{yz} &= f_y \frac{(x+y) \left(z^2-x y\right)}{x y z^2} = \frac{-(y^2+z^2)}{y^2 z^2}.
\end{align}
Since the mixed partials are continuous, by Clairaut's theorem we need only compute
\begin{align}
f_{yy} &= f_y\frac{(x+z) \left(z^2-x z\right)}{x y^2 z} = \frac{2 (x+z)}{y^3}\\
f_{zz} &= f_z\frac{(x+y) \left(z^-2x y\right)}{x y z^2} = \frac{2 (x+y)}{z^3}.
\end{align}
Hence the Hessian matrix is
$$
H = \begin{pmatrix}
\frac{2y}{x^3} & \frac{-(x^2+y^2)}{x^2y^2} & \frac{-(x^2-z^2)}{x^2 z^2}\\
\frac{-(x^2+y^2)}{x^2y^2} & \frac{2 (x+z)}{y^3} & \frac{-(y^2+z^2)}{y^2 z^2}\\
 \frac{-(x^2-z^2)}{x^2 z^2} & \frac{-(y^2+z^2)}{y^2 z^2} & \frac{2 (x+y)}{z^3}.
\end{pmatrix}
$$
We have $f_{xx} = \frac{2y}{x^3}>0$ on $[a,b]^3$ and 
$$
\begin{vmatrix}
f_{xx} & f_{xy}\\\ f_{xy}& f_{xz}
\end{vmatrix} = \begin{vmatrix}
\frac{2y}{x^3} &\frac{-(x^2+y^2)}{x^2y^2}\\\
\frac{-(x^2+y^2)}{x^2y^2} & \frac{-(x^2-z^2)}{x^2 z^2}
\end{vmatrix} = \frac{\left(x^2+y^2\right) \left(-x \left(x^2+y^2\right)-\frac{2 y^5}{z^2}\right)}{x^5 y^4},
$$
which takes negative values. So $F$ admits no global minimum. As shown in @Michael Rozenberg's answer, $9$ is a local minimum.
