I would like to prove that if $f(a+re^{it})\in \Bbb{R}$ for all $t\in \Bbb{R}$ then $f$ is constant. Of course $f$ is holomorphic on a domain $U$ and $r>0$ such that $\overline{D(a,r)}$ is included in $U$.
This question arose from another one witch is if $t\mapsto\vert f(a+re^{it}) \vert$ is constant and doesn't vanish on $U$ (domain) then $f$ is constant.
I am stuck here, It's cleary related to the maximum principle but how can I use it here ?