Should the distance between $\{x: f(x)=0\}$ and $\{x:f(x)<0\}$ be $0$ ($f$ may not be continuous, $x$ in some metric space)?

71 Views Asked by At

Suppose I have a function (which may or may not be continuous) $$f: X\rightarrow\mathbb{R}$$

where $X$ is a metric space, with distance $d: X\times X\rightarrow \mathbb{R}$. By abuse of notation, we also define the distance between a point in $X$ and a subset $X'\subset X$. As usual, $$d(x,X')\overset{\text{def}}{=} \inf\{d(x,x')\mid x'\in X'\}$$

Let $x\in X$ be a zero of $f$, i.e., $f(x)=0$, and we define the set $A$ as $$A\overset{\text{def}}=\{x\in X\mid f(x)< 0 \}$$ We assume $A\neq \emptyset$. Then, is it correct to claim that $d(x, A)=0$ (so x is in the closure of $A$)? Any counter-example?

2

There are 2 best solutions below

1
On BEST ANSWER

A continuous counterexample is $f(x)=x^2(1-x^2)$. We have $f(0)=0$ but $f(x)\geq 0$ in $[-1,1]$.

1
On

Suppose $f$ is a real valued function of a real variable that's $0$ at $0$, $1$ everywhere else in $(-1, 1)$ and $-1$ everywhere else ...