Showing that a function on a connected set is constant if its square is equal to its conjugate Let $V$ be a connected set in $\mathbb{C}$, and $f$ holomorphic on $V$ such that $$f(z)^2=\overline{f(z)}$$ on $V$.
I want to show that $f$ must be constant on $V$. 
My attempt: As $$|f(z)|^2=f(z)\overline{f(z)}=|f(z)||\overline{f(z)}|=|\overline{f(z)}|,$$
it follows that the $\overline{f(z)}\equiv 1$ on $V$. Then it would follow that the imaginary part of $f$ must also be constant since it must be harmonically conjugate to $1$.
Is this ok?
 A: Why isn't anyone taking my hint from the comments? 


*

*If $z^2=\overline z$ then $z=0,1,e^{2\pi i/3}{\rm\ or\ }e^{4\pi i/3}$. 

*If a continuous function takes on only finitely many values on a connected set, it's constant. 
A: Since $f(z)$ is holomorphic, if $f=u+iv$, its real and imaginary parts satisfy Cauchy-Riemann equation, i.e. 
$$\tag{1}u_x=v_y\mbox{ and }u_y=-v_x.$$
Since $f(z)$ is holomorphic, $\overline{f(z)}=f(z)^2$ is also holomorphic. Since $\overline{f}=u-iv$, Cauchy-Riemann equation implies that
$$\tag{2}u_x=-v_y\mbox{ and }u_y=v_x.$$
Combining $(1)$ and $(2)$, we have $v_y=0$ and $v_x=0$ on the connected set $V$, which implies that $v$ is constant on $V$. Since $v_y=0$ and $v_x=0$, we have $u_y=0$ and $u_x=0$ on $V$, which implies that $u$ is constant on $V$. Therefore, $f=u+iv$ is constant. 
A: Here is a proof that only requires $f$ to be continuous.
Since $|f(z)^2 |= |f(z) |^2=|f(z)|$ it follows that $|f(z)| \in \{0,1\}$ for all $z \in V$. Since $V$ is connected and $f$ is continuous, it follows that either $|f(z)| = 0$ on $V$ or $|f(z)| = 1$ on $V$.
If $|f(z)| = 0$ on $V$, then clearly $f$ is constant on $V$, so assume that $|f(z)| = 1$ on $V$.
Consider $f(z)^3 = |f(z)|^2$. Since $|f(z)| = 1$,  we have $f(z)^3 = 1$ for $z \in V$. Since the cube roots of unity form a disconnected set, it follows that $f(z)$ is constant (equal to one of the cube roots of unity, of course) for $z \in V$.
