0

We say that $f:\mathbb{R}\to\mathbb{R}$ has a local minimum at every point, if for any point $x_0$ we can find an open interval containing $x_0$ such that $f(x)\ge f(x_0)$ for every point in the interval. Suppose $f$ is any function $\mathbb{R}\to\mathbb{R}$ satisfying this condition (so, in particular, it is not necessarily continuous).

It does not follow that $f$ is constant. For example, take $f$ to be 0 on the integers and 1 elsewhere.

So the question is prove that $f$ is constant except at (at most) countably many points, or find a counter-example.

almagest
  • 18,380
  • Does this answer your question? https://math.stackexchange.com/a/1402176/42969 – Martin R Jan 23 '21 at 11:32
  • @MartinR You are correct. This is essentially a duplicate. I will delete it. Many thanks. I searched on local minimum before posting, but failed to search on local maximum! Grrr. The systems seems to be against deleting answered questions, so I will modify it. – almagest Jan 23 '21 at 15:35
  • I guess I don't understand the rules any more. I read @MartinR's comment and realised he was correct, the question was a duplicate. I tried to close it, but the system told me not to close it, because it already had an answer. It suggested modifying the question. Whilst I am doing that, someone else closed it and the system doesn't even tell me who. There is much good stuff on MSE but I find its closure rules increasingly irritating. – almagest Jan 23 '21 at 16:00
  • I closed your question because you confirmed that it is a duplicate. (You could have closed it yourself as a duplicate, you just cannot delete it if there are two or more answers.) I can reopen the question now that you modified it. Just note that modifying question after receiving answers may invalidate existing answers, so often it is better to ask a new question. – Martin R Jan 23 '21 at 16:07
  • @MartinR Ah, thanks. Yes, I see the distinction between closing and deleting. I should have closed it! I also take the point about better not to invalidate existing answers. – almagest Jan 23 '21 at 16:11

2 Answers2

1

How about $f(x) = -\lfloor x \rfloor$. (see definition .) This function has a local minimum at every point, but $\lim_{x \to +\infty} f(x) = -\infty$.

So the function is not "constant" except at countably many points. It is "locally constant" except at countably many points.


As maritsm remarked, a "closed set" will do, instead of the countable set of the OP. Let $C$ be the Cantor set, and let $f(x) = 0$ on $C$ and, for each interval of the complement $\mathbb R \setminus C$, let $f(x)$ be a negative constant; possibly different constants for each such interval. Now we could have $\inf f = -\infty$ and $f$ is locally constant except on the uncountable set $C$.

GEdgar
  • 111,679
0

Hint: Your example where $f$ is $0$ on the integers and $1$ elsewhere does not use the fact that the integers are a countable set, only that they are a closed set (i.e. that its complement is open)

maritsm
  • 607