0

Let $I$ be an interval, and $f \colon I → ℝ$ continuous on $I$ such that for any $x \in I$ there exists a real $\delta_x > 0$ such that for all $y \in (x -\delta_x, x + \delta_x ) \cap I$, $f(y) = f(x)$. Show that $f$ is a constant function on $I$.

k.stm
  • 18,539
ChiChi
  • 11

1 Answers1

3

Fix $x_{0}\in I$. Define $U:=\{x\in I: f(x)=f(x_{0})\}$. We have to show that $U=I$.

Note that $U$ is open in $I$: if $x\in U$ then the open neighborhood $(x-\delta_{x},x+\delta_{x})\cap I$ of $x$ is contained in $U$. Indeed, for all $y\in (x-\delta_{x},x+\delta_{x})\cap I$: $f(y)=f(x)=f(x_{0})$.

But $U$ is also closed in $I$: let $x\in I\setminus U$. Then $f(x)\neq f(x_{0})$. Take an open interval $J$ in $\mathbb{R}$ around $f(x)$ that does not contain $f(x_{0})$. Then $f^{-1}(J)$ is an open neighborhood of $x$ in $I$ that lies inside $I\setminus U$. Hence $I\setminus U$ is open in $I$, so $U$ is closed in $I$.

Since $I$ is connected, it follows that $U$ must be all of $I$. Hence $f$ is constant.

studiosus
  • 4,147