Let $C$ be the Cantor set. I can easily define a continuous function on $[0,1]$ whose set of zeros is exactly $C$, i.e. $x\mapsto d(x,C)$. In addition to being 0 on $C$, I'd like to build one that changes sign at each point of $C$. It seems intuitively feasible but I can't find one. Any help is appreciated.
Asked
Active
Viewed 254 times
1
-
What is your definition of "function $f$ changes sign at a point $x$"? Mine would be something like "there is a number $ \varepsilon\gt0$ such that $f(x)$ has one sign on $(x-\varepsilon,x)$ and the opposite sign on $(x,x+\varepsilon)$" but that would mean that the set of points where $f$ changes sign is necessarily discrete, and so could not be the Cantor set. – bof Dec 26 '14 at 01:39
-
I probably used the wrong word with "change". I would like a continuous function $f$ with the following. For all $c\in C$ and all $\varepsilon>0$, there exists $x,y \in B(c,\varepsilon)$ and $f(x)f(y)<0$, $f(c)=0$. – user203039 Dec 26 '14 at 01:56
1 Answers
2
Let $C$ be any nowhere dense closed subset of $\mathbb R$. Define $f:\mathbb R\to\mathbb R$ as follows: $$f(x)=\begin{cases} 0\text{ if }x\in C,\\ d(x,C)\cdot\sin\frac1{d(x,C)}\text{ if }x\notin C,\\ \end{cases}$$ where $d(x,C)$ is the distance from $x$ to $C$. The function $f$ is continuous, and it takes both positive and negative values in every neighborhood of each point of $C$.
bof
- 78,265