8

Let $f$ be continuous in $[a,b]$ and $f(a)<0,\ f(b)>0$.

Then by the intermediate value theorem, $\exists c\in(a,b)$ such that $f(c)=0$.

I was wondering if it is also true that there exists $d\in(a,b)$ such that $f(d)=0$ and $f$ changes sign of the function at $d$. (there is some $>0$ such that $()<0$ when $\in(−,)$ and that $()>0$ when $\in(,+)$ It seems clear but I am not sure how to prove if it is true.

  • It could be that you have a plateau where the function is zero, but that is the only obstruction to your claim. – Severin Schraven Oct 02 '21 at 11:07
  • 3
    What do you mean when you say that “$f$ changes sign ($−$ to $+$) of the function at $d$”? Do you mean that there is some $r>0$ such that $f(x)<0$ when $x\in(d-r,d)$ and that $f(x)>0$ when $x\in(d,d+r)$? Or do you mean that there is some $r>0$ such that $f(x)\leqslant0$ when $x\in(d-r,d)$ and that $f(x)\geqslant0$ when $x\in(d,d+r)$? Or something else? – José Carlos Santos Oct 02 '21 at 11:08
  • @JoséCarlosSantos Yes, I just edited the question. –  Oct 02 '21 at 11:12
  • @SeverinSchraven: that is not the only obstruction $-$ see the answer from José Carlos Santos. – TonyK Oct 02 '21 at 11:34
  • 3
    @TonyK Good thing that this site exists, then I can properly learn calculus :) – Severin Schraven Oct 02 '21 at 11:40

2 Answers2

11

It is not true. Take, for instance,$$\begin{array}{rccc}f\colon&[-1,1]&\longrightarrow&\Bbb R\\&x&\mapsto&\begin{cases}x\left(1+\sin\left(\frac1x\right)\right)&\text{ if }x\ne0\\0&\text{ otherwise.}\end{cases}\end{array}$$Then no such $d$ exists. See its graph below.

enter image description here

2

As mentioned, some plateau functions can do this, but they satisfy your condition if it is made a little weaker, requiring one side to have a neighborhood of nonnegativity and the other to have a neighborhood of nonpositivity. In fact, the $\sin(1/x)$ example also has that property, as commented.

Below is a sketch of a Cantor-set based function that I believe fails to have even the weaker version of that property. The idea is to add alternating peaks above and below gaps of the Cantor set of various sizes. I'm afraid I'm feeling rushed, but hopefully it gets the idea across.

It also inspires a conjecture: any such function which fails to have even this weak property, must obtain the value zero uncountably many times. I am not at all confident in this, but it seems worthy of some thought.

Forgive me