TITLE: Find $f : [0,1] \to \mathbb R$ s.t. $\{x \in [0,1]$, for all neighborhood of $x$, there exist $y$ and $z$ in it s.t. $f(y)f(z)<0 \}\ $ is uncountable
QUESTION [2 upvotes]: I am looking for a continuous function $f : [0,1] \to \mathbb R$ such that $\{x \in [0,1]$,  for all neighborhood of $x$ in $[0,1]$, there exist $y$ and $z$ in it such that $f(y)f(z)<0 \}\ $ is uncountable.
I am thinking about something like that: $x \mapsto \int_0^1(x-u)\sin (\frac{1}{x-u})du$. Would it work?

REPLY [2 votes]: Let $E$ be the Cantor set.  Let $f(x) = 0$ for $x \in E$.  On each "middle third" $(a, b)$ removed in the $n$'th stage of the set's construction, let $f(x) = (-1)^n (x-a)(b-x)$.
With a bit more work, you can even get an $f$ that is $C^\infty$.
{"set_name": "stack_exchange", "score": 2, "question_id": 2693358}