Re($f(z)$)$=$Im($f(z))$ implies $f$ is constant over connected domain of $\mathbb{C}$ Suppose
$$f: D \rightarrow \mathbb{C}$$
is holomorphic with $D \subseteq \mathbb{C}$ connected domain.
Show if Re$f(z)$$=$Im$f(z)$ for all $z \in D$ then $f$ is constant.
My thoughts so far. We can let $f(z) = a+ai$ if $z \in D$.
Then $f(z) = a(1+i)$ for this particular $z \in D$.
and in general say $f(z)=a_i(i+1)$
 A: The open mapping theorem is the appropriate result here.
Another approach would be to define $\phi(z) = \operatorname{re} z - \operatorname{im}z$ and note that $\phi(f(z)) = 0$ for $z \in D$.
If $f'(z_0) \neq 0$ and $t$ is real, note that $ { f(z_0+t {1 \over f'(z_0}) ) -f(z_0) \over t} \to 1$ which is a contradiction since $\phi({ f(z_0+t {1 \over f'(z_0}) ) -f(z_0) \over t}  ) = 0$ but $\phi(1) = 1$. Hence $f'(z) = 0$ for all $z \in D$.
Pick some $z_0 \in D$ and let $S = \{ z \in D | f(z) =f(z_0) \}$. Since $f$ is continuous, $S$ is clearly closed. The power series expansion of $f$ at any $z$ shows that $S$ is open, hence $S = D$.
A: The Open Mapping theorem gives this to you immediately. What is your level of knowledge?
A: Let $f(z)=u(z)+iu(z)$ be defined on a connected domain $D \subset \mathbb{C}$
By the C-R equations, we have that
$$u_x=u_y$$
$$u_y=-u_x$$
which forces $u$ to be constant and thus $f'(z)=0$ on the defined connected domain of $\mathbb{C}$
Lemma, if $f'(z)=0$ on open connected domain of $\mathbb{C}$, then its constant.
Since we have a connected subset of $\mathbb{C}$ its path connected, so let $z_0\in D$ and let $z \in \mathbb{C}$ then define the path between them to be $\gamma$, then
\begin{align}
f(z)-f(z_0)&= \int_\gamma f'(z)dz\\
&=\int_\gamma 0 dz\\
&= 0
\end{align}
Thus $f(z)=f(z_0)$ and $f$ is constant on $D$.
