# A qualifying exam question concerning compactness

Here is a qualifying exam question which I hope someone can help me with. I have done all of it except having problem to "visualize" $\partial S$ and hence have no idea, is the intersection of $K \cap \partial S$ empty or not?

Here is the question

Assume $f: \mathbb{R}^n \rightarrow \mathbb{R}$ is a continuous function such that

(a) there exist points $x_0$ and $x_1\in \mathbb{R}^n$ with $f(x_0)=0$ and $f(x_1)=3$,

(b) there exist positive constants $C_1$ and $C_2$ such that $f(x)\geq C_1|x|-C_2$ for all $x\in \mathbb{R}^n$.

Let $S:=\{ x\in\mathbb{R}^n : f(x)<2 \}$ and let $K:=\{ x\in\mathbb{R}^n : f(x)\leq 1 \}$. Define the distance from $K$ to $\partial S$ (the boundary of $S$) by the formula

$$\text{dist} (K, \partial S) := \inf_{p\in K, q\in \partial S} |p-q|.$$

Prove that the dist$(K,\partial S) >0$. Then give an example of a continuous function $f$ satisfying (a) but dist$(K,\partial S) =0$.

End of question.

As you can see $K=f^{-1}((-\infty, 1])$ and $K\subset \{ x\in \mathbb{R}^n : ||x||\leq \frac{1+C_2}{C_1} \}$ is closed and bounded, surely $\partial S$ is closed, hence I just needed the empty intersection to draw the final conclusion.

Also is there any easy counterexample that needed to satisfied (a)?

Thanks

-
The reason $(a)$ was required is to guarantee that $S$ and $K$ are nontrivial-neither empty nor all of $\mathbb{R}^n$. –  Kevin Carlson Aug 7 '12 at 2:32
Thanks, agreed. –  KWO Aug 7 '12 at 10:12
First, observe that $S$ is open. Next, use the continuity of $f$ to show that $f \le 2$ on the closure of $S$. Using the definition of $\partial S$, conclude that $f = 2$ on $\partial S$. In particular, $\partial S$ is disjoint from $K$.
@KWO Notice that $\partial S$ being disjoint from $K$ does not imply that $\text{dist} (K, \partial S)>0$. You still have work to do! –  Byron Schmuland Aug 7 '12 at 1:57