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
 A: $$\frac{\partial^2f}{\partial x^2}=\frac{2(y+z)}{x^3}>0.$$
Similarly, $\frac{\partial^2f}{\partial y^2}>0$ and $\frac{\partial^2f}{\partial z^2}>0.$
Thus, $f$ is a convex function of $x$, of $y$ and of $z$, which says: $$\max_{(x,y,z)\in[a,b]^3}f=\max_{\{x,y,z\}\subset\{a,b\}}f=f(a,a,b)=$$
$$=9+\frac{(a-a)^2}{a\cdot a}+\frac{(a-b)^2}{ab}+\frac{(a-b)^2}{ab}=9+\frac{2(a-b)^2}{ab}.$$
A local maximum does not exist. 
A local minimum is equal to $9$.
A: At $x=y=z$ you have a minimum. You can see this by plugging in these into the equation for $f$ and you get $9$. For any positive values, as long as at least two are distinct, you have $f(x,y,z)>9$. What you want to do is look at the points on the boundary of the cube. Due to symmetry, just look at the $x=a$ and $x=b$ planes.
A: 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.
