Continuity on a Domain and Local Connectedness Let $f$ be continuous on a domain (open and connected), $D$. Now suppose that for every $z_0 \in D$, there exists $B_\delta (z_0)$ such that $f(z)$ is constant in $B_\delta (z_0)$. Show that $f$ is constant in $D$.
I don't know if this is correct, but allow me to share my thoughts. If  $f$ is continuous on $D$, then $f$ is continuous on every $z_0 \in D$. Define an open ball, $B_\delta (z_0)$, such that $f(z) = K$, for all $z \in B_\delta (z_0)$. 
Since $D$ is a region, it is connected, then $D\ne S_1 \cup S_2$, where $S_1 \cap S_2 = \emptyset$. Then, $D$ is the union of open balls that are not disjoint. Hence $f(z)$ is constant in $D$.
 A: Let $z_0 \in O$ and define $c = f(z_0)$. 
Then define $U = \{x \in O: f(x) = c\}$.
Then:


*

*$U \neq \emptyset$, as witnessed by $z_0$.

*$U$ is open: if $z \in U$, then we have $\delta > 0$ such that $f$ is constant on $B(z,\delta)$. As $z \in U$ already tells us that $f(z) = c$ all values of $f$ on this ball $B(z,\delta)$ are $c$ too. So $B(z,\delta) \subset U$ and so $z$ is an interior point of $U$.

*$U$ is closed in $O$: suppose we have $z \in O$ such that $z \in \overline{U}$. Let $\delta>0$ again be such that $f$ restricted to $B(z,\delta)$ is constant. Then as $z \in \overline{U}$, there is some $p \in U$ with $p \in B(z,\delta)$. So $f(p) = c$ and as $f$ has all the same values for any point of $B(z,\delta)$, we know that $f(z) = c$ as well. So by definition, $z \in U$, so $\overline{U} \subseteq U$ so $U$ is closed (every limit point of $U$ is already in $U$).
As $O$ is connected we knwo that any closed and open set that is non-empty must equal $O$. So $O = U$, and $f$ only assumes the value $c$. Done.
A: By the assumptions, $D$ must be path connected. So let $x,y \in D$ and $\gamma : [0,1] \to D$ be a path connecting them. Then the image of $\gamma$ is compact and hence there are $x_1,\cdots,x_n \in D$ such that 
$$
\mathrm{Im}(\gamma) \subset \bigcup_{i=1}^n B(x_i,\delta_i),
$$
where $f$ is constant on each of the $B(x_i,\delta_i)$. Now you see that $f(x) = f(y)$.
