2
$\begingroup$

Let $V$ be a non-empty open set of real numbers , then how to prove that there is a continuous function $f:\mathbb R\to \mathbb R$ such that $V=\{x\in \mathbb R:f(x)>0\}$

$\endgroup$
  • 4
    $\begingroup$ Take $f(x)$ to be the distance of $x$ to the complement of $V$. $\endgroup$ – Etienne May 31 '14 at 8:16
  • 1
    $\begingroup$ @Etienne Would it also work to take the convolution of the characteristic function of $V$ with a bump function? $\endgroup$ – Rudy the Reindeer May 31 '14 at 19:43
  • $\begingroup$ @MattN. I'm afraid your convolution will be positive at some points outside $V$. $\endgroup$ – Etienne May 31 '14 at 21:53
  • $\begingroup$ @Etienne Too bad : ) Thank you for your comment! $\endgroup$ – Rudy the Reindeer Jun 1 '14 at 5:26
1
$\begingroup$

Etienne's comment is a canonical construction of such a function: $$f(x) = \inf\{ |x-y| : y\in \mathbb R\setminus V\} $$ The key points are:

  1. $f(x)=0 $ when $x\notin V$ (easy)
  2. $f(x)>0$ when $x\in V$ (use the fact that $V$ contains a neighborhood of $x$ to give a lower bound for the set $\{ |x-y| : y\in \mathbb R\setminus V\}$
  3. $f(x) \le f(x')+ |x-x'|$ for all $x,x'\in \mathbb R$ (use the triangle inequality)
  4. $|f(x) - f(x')| \le |x-x'|$ (use item 3 twice)

As an aside: it is also possible to construct a smooth function $f$ with this property, see Every closed subset $E\subseteq \mathbb{R}^n$ is the zero point set of a smooth function.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy