6

Let $f:[a,b]\rightarrow\mathbb{R}$ be a continuous real function and assume $f(a)<0<f(b)$. Does $f$ necessarily have a point $c\in (a,b)$ such that $f\leq 0$ on a left neighborhood of $c$ and $f\geq 0$ on a right neighborhood of $c$ (a "switching point", for that matter)?

This is a seemingly simple question, but it took me longer than I expected to answer it. The answer turns out to be negative; however the counterexample I found it a bit "exotic" and I wondered if simpler examples can be found.

My counterexample is based on the Cantor set, and it actually produces a smooth $f$. First, for a closed interval $I$, let $g_I$ be a smooth bump function whose support is $I$. Specifically, $g_I(x)>0$ for $x\in I$ and $g_I(x)=0$ otherwise. Let $\mathcal{I}_n$ be the set of intervals removed at the $n$-th stage of the construction of the Cantor set (of which there are $2^{n-1}$). Define $f:[0,1]\rightarrow\mathbb R$ by $$f(x)=\sum_{n=1}^\infty \sum_{I\in\cal{I}_n}(-1)^ng_{I}(x).$$Note that all the removed intervals are pairwise disjoint, so $f$ is well-defined.

Now, it's not to hard to prove that:

  • $f$ is smooth.
  • The set $\left\{x:f(x)=0\right\}$ is the Cantor set $C$. Therefore any $x\not\in C$ can't be a switching point of $f$.
  • For every $c\in C$, there's a negative point and a positive point in every right and every left neighborhood of $c$. Therefore $f$ has no switching points.

Now it only remains to choose $0<a<b<1$ such that $f(a)<0<f(b)$.

This turned out to be more involved than I expected; are any simpler counterexamples, preferably ones that would appear more "familiar" to a standard Calculus course major?

35T41
  • 3,377
  • Does $x\sin(1/x)$ meet your requirements? In this case, you have to specify $0$, so it may not be what you’re looking for exactly. – Clayton Oct 11 '21 at 15:07
  • No, because any (non-trivial) interval containing $0$ contains a switching point; infinitely many, actually. – 35T41 Oct 11 '21 at 15:17
  • I figured it wasn’t what you were looking for but wanted to ask on the off-chance choosing a particular value satisfied your inquiry. – Clayton Oct 11 '21 at 21:02
  • 1
    Nice example! I guess you can show in a similar way that if $U$, $V$ are open disjoint subsets of $[0,1]$, then there exists a smooth function with $U$ the positive set, and $V$ the negative set. Now, it's all about choosing a convenient pair $U$, $V$. – orangeskid Oct 11 '21 at 21:03
  • See related : https://mathoverflow.net/q/24034/15540 – Paramanand Singh Oct 12 '21 at 02:39
  • 1
    +1. You cannot really get simpler. If $f$ has no switching point and $f(c)=0$ then $c$ is in the closure of both $f^{-1}\Bbb R^+$ and $f^{-1}\Bbb R^-$ which leads us to require $f^{-1}{0}$ to be the Cantor set or something like it. – DanielWainfleet Oct 12 '21 at 02:49
  • To add to my previous comment, $f^{-1}{0}$ will have to a be a (non-empty) closed nowhere-dense set with no isolated points. – DanielWainfleet Oct 12 '21 at 02:53
  • It seems to me you need to impose some conditions on the $g_I$ to conclude $f$ is smooth, or even continuous. For instance, since every neighborhood of a point in $C$ contains infinitely many intervals that got removed, you'll need something like $\mathrm{sup}, g_I\to 0$ as $\mu(I)\to 0$ in order to get continuity on points in $C$. – Julian Rosen Oct 14 '21 at 15:07
  • Perhaps a slightly easier function, using notation from the question: Send $x \in \mathcal{I}n$ to $(-1)^n \cdot d(x,C)$, and map any other $x$ to $0$. Here $d(x,C) = \inf{c \in C} d(x,c)$ is a continuous function (a quick proof). – Kamil Mar 09 '23 at 14:22

0 Answers0