Rudin exercise: If $f$ is a diferentiable mapping on an open connected set $E$ and $f'(x) = 0$ for all $x \in E$, then $f$ is constant. Suppose $f: E \subseteq  \mathbb{R}^n \to \mathbb{R}^m$ is a differentiable map with $E$ open and connected. If $f'(x)=0$ for all $x \in E$, prove that $f$ is constant.
My attempt:
For all $x \in E$, choose an element $\epsilon_x >0$ such that the ball $B(x,\epsilon_x) \subseteq E$. Then it is obvious that
$$E= \bigcup_{x \in E} B(x, \epsilon_x)$$
Now, consider the corollary of theorem 9.19 in Rudin:

Suppose $f$ maps an open, convex set $E\subseteq \mathbb{R}^n$ into
  $\mathbb{R}^m$, $f$ is differentiable in $E$ and $f'(x) = 0$ for all
  $x\in E$, then $f$ is constant.

Applying this proposition to the map $f$ restricted to a ball $B(x, \epsilon_x)$ implies that $f$ is constant on every ball in the union written above.
Intuitively, I can see that the connectedness will imply that we can get from one ball to another balls using chains of "between-balls', or otherwise we will get a separation of $E$ as disjoint union of open sets.  I struggle to make this formal though.
Any help is much appreciated!

Let $p\in E$ and consider the set$$F=\{x\in E\mid f(x)=f(p)\}.$$Since $p\in E$, $E\neq\emptyset$. And $F$ is a closed set, since if $(x_n)_{n\in\mathbb N}$ is a convergent sequence of elements of $f$ and $x=\lim_{n\to\infty}x_n$, then it follows from the continuity of $f$ that$$f(x)=\lim_{n\to\infty}f(x_n)=f(p).$$Finally, $F$ is open, since if $x_0\in F$ then, since $f$ is constant in an open ball $B(x_0,\varepsilon)$ centered at $x_0$, $B(x_0,\varepsilon)\subset F$. So, since $E$ is connected, $F=E$. In other words,$$(\forall x\in E):f(x)=f(p).$$
