Show that the function $H(x, y) = x^2 + y^2 + |x − y|^{-1}$ achieves its global minimum somewhere on the set $\{(x, y) \in \mathbb{R}^2 : x \ne y\}$. Show that the function $H(x, y) = x^2 + y^2 + |x − y|^{-1}$ achieves its global minimum somewhere on the set $\{(x, y) \in \mathbb{R}^2 : x \ne y\}$.
I kind of understand the minimum cannot be $x=y$ since $1/(x-y)=1/0$, which is infinity. I am trying to prove it via contradiction, but I am confused about how to find the minimum of a function with two variables. 
Any advice or hints will be appreciated. Thank you!
 A: What this question is really asking is if the function has a global minimum at all, as it isn't even defined on the set $x=y$ as you mentioned.
The set $\{(x,y)\in R^2:x\ne y\}$ is open, and therefore ay local (and thus the global) minimum must have the partial derivatives equal $0$. The function is symmetric, so we assume WLOG $x>y$ and the function is now $H(x,y)=x^2+y^2+\frac{1}{x-y}$. Thus $H_x(x,y)=2x-\frac{1}{(x-y)^2}$, $H_y(x,y)=2y+\frac{1}{(x-y)^2}$. These must both be $0$, so the sum of them must be $0$, so $2x+2y=0$ so $x=-y$.
Plugging this back into $H_x$ and setting equal to $0$ gives $2x=\frac{1}{(2x)^2}$ so $8x^3=1$, so $x=\frac12$, and thus $y=-\frac12$. To see if this is actually a minimum, we find the Hessian at this point to be 
$$
\begin{bmatrix}
    2.5       & -.5  \\
    -.5       & 2.5  \\
\end{bmatrix}
$$
which has eigenvalues $2$ and $3$ so is positive definite, thus this is a local minimum. As they are the only local minima, the global minimum is achieved at $H(\frac12,-\frac12)=\frac32$, and by symmetry at $H(-\frac12,\frac12)=\frac32$ as well.
A: You don't actually need to find the minimum to prove that there is in fact a global minimum. You can set the stage to use the Weierstrass theorem (any continuous function reaches a maximum and a minimum value over a compact—i.e., closed and bounded—set).
Here, a sketch of the proof, based on the idea that the minimum won't be very close to the line $x=y$ (where the values go to $+\infty$) nor very far from the origin (for the same reason).
So let's take any point in the domain, say $(1,0)$. Since $f(1,0)=2$, we know that if there is a minimum is not greater than $2$. 
Now, let's define a compact set such that on it's complement the function always takes values greater than $2$.
Define
$$A=\left\{(x,y)\colon |x-y|\ge\frac12\right\}$$
and
$$B=\left\{(x,y)\colon x^2+y^2\le2\right\}.$$
Is easy to see that the set $A\cap B$ is closed and bounded, that is, is compact, and since $f$ is continuous, reaches a minimum in this set. Also, this minimum value is no more than $2$.
And if $(x,y)$ is not in $A$ (that is $|x-y|<\frac12$) or if is not in $B$ (and so $x^2+y^2>2$), then is easy to prove that $f(x,y)>2$, and so the minimum reached in $A\cap B$ is a global minimum.
A: Consider the set 
$$
   S = \left\{(x,y) \in \mathbb R^2 : |x| \le 10, |y| \le 10, |x-y| \ge \frac{1}{100}\right\}.
$$
This set $S$ is closed and bounded, and therefore (by the extreme value theorem) $H$ has a global minimum on $S$.
Points outside $S$ are guaranteed to be worse than that minimum. If $(x,y) \notin S$, then one of three things must be true:


*

*$|x| > 10$, in which case $H(x,y) \ge x^2 > 100$.

*$|y| > 10$, in which case $H(x,y) \ge y^2 > 100$.

*$|x-y| < \frac{1}{100}$, in which case $H(x,y) \ge \frac{1}{|x-y|} > 100$.


Therefore $H(x,y) > 100$ everywhere outside $S$, which can't beat for example $H(0,1) = 2$. 
This means that the global minimum of $H$ on $S$ is actually the global minimum of $H$ on its entire domain $\{(x,y) \in \mathbb R^2 : x \ne y\}$.
