Let $U\subset \mathbb{C}$ be a nonempty connected open set such that for every $z\in U$, $\overline z\in U$.
Let $f$ be analytic on $U$. Suppose $f(x)\in\mathbb R$ for every $x\in U\cap\mathbb R$. Prove that $f(\overline{z})=\overline{f(z)}$ for any $z \in U$.
By definition, I know that $f$ analytic on $U$ means that for every $z_0 \in U$, there exists $r>0$ and a sequence of complex numbers $\left(a_n\right)_{n=0}^\infty$ such that $f(z)=\sum_{n=0}^\infty a_n\left(z-z_0\right)^n$ on the disc $D(z_0,r)\subseteq U$. I see that $f$ takes points without imaginary components to other points without imaginary components. But I don't see how this implies a symmetry that $f(\overline{z})=\overline{f(z)}$ for $z \in \mathbb C \setminus \mathbb R$. It seems like a very strong conclusion and I'm not sure how I would prove it.
I have also shown in the preceding question that $U\cap\mathbb R$ contains an open interval, however I am not sure if that detail is meant to be helpful to this question.