Help with weierstrass’ theorem Question: Use the Weierstrass Theorem to show that a solution exists to the expenditure minimization problem of subsection 2.3.2, as long as the utility function II is continuous on $\mathbb{R}$ and the price vector p satisfies p » O. What if one of these conditions fails?

$X(\bar u)$ = $\{x\in$ $\mathbb{R}$$^n$$_+$| $u(x)$ $\geq$ $\bar u$

The objective is to solve:

Minimize $p\cdot x$ Subject to $x\in X(\bar u)$. 

I do not understand how to actually apply the weierstrass theorem here. Can anyone solve this exercise?
This is the version of the theorem I will use: 

Weierstrass theorem: Every continuous function defined over a compact set attains a minimum. 

The function $p\mathbin{\cdot} x$ is continuous. The problem is that $X(\bar{u})$ is not compact. So, an additional trick is needed. Since we are working with a subset of $\mathbb{R}^n$ compact means the same as closed and bounded (Heine-Borel theorem). The continuity of $u$ is used to guarantee that $X(\bar{u})$ is closed. But it could be unbounded. 

This is where $p\gg 0$ becomes useful. Take an arbitrary point $x_0 \in X(\bar{u})$ and consider the set $Y$ defined by  $$Y = \{\,y\in X(\bar{u}) \mid p\cdot y\leq p\cdot x_0\,   \}.$$
Since $x_0\in Y$, we know that $Y$ is nonempty. Using the fact that $p\gg 0$, you can show that $Y$ is bounded (I'll let you figure out the details). Since $Y$ is the intersection of two closed sets, it is also closed. Hence, it is compact. Therefore, by Weierstrass theorem, $p\cdot x$ has a minimum in $Y$. 

I will also let you figure out the last step on your own, which is to show that the minimum of $p\cdot x$ in $Y$ is also a minimum in $X(\bar{u})$.