I have some difficulties with a question I have come across. The question goes as follows:
Let $\Omega$ be an open set with $z_0 \in \Omega \cap \mathbb{R}$. Let $f: \Omega \to \mathbb{C}$ be holomorphic with the property that $$f^{(k)}(z_0) \in \mathbb{R} \qquad \text{ for every } k = 0, 1, 2,...$$ (a) Let $r > 0$ be such that the open interval $(z_0 - r, z_0 +r)$ is contained in the domain $\Omega$. Prove that $f(x) \in \mathbb{R}$ for every $x \in (z_0 - r, z_0 + r)$.
(b) Suppose in addition that $\Omega$ is connected. Does it follow that $f(x) \in \mathbb{R}$ for every $x \in \Omega \cap \mathbb{R}$? Prove or give a counterexample.
With (a) I know that i probably have to use the fact that, because $f$ is holomorphic in $\Omega$, there exists a disc $D_R(z_0)$ such that
$$f(z) = \sum_{n=0}^\infty \frac{f^{(n)}(z_0)}{n!} (z-z_0)^n$$
for every $z \in D_R(z_0)$.
This solves the question for $r \leq R$, because $f^{(n)}(z_0) \in \mathbb{R}$ and for $z \in D_R(z_0) \cap \mathbb{R}$ we have $(z - z_0) \in \mathbb{R}$. But I don't know what to do when $r > R$.
And for (b) I have actually no clue.
Thanks in advance for the help.
We can go as follows, starting from where you left at:
Let $r_0$ be the largest $r > 0$ such that $(z_0, r_0)$, and let $U$ be an open connected subset of $\Omega$ such that $z \in U$ iff $\bar{z} \in U$ and such that $U$ contains $(z_0 - r_0, z_0 + r_0)$. Such a $U$ exists by taking the union of discs centered at each $z \in (z_0 - r_0, z_0 + r_0)$.
The idea is that $f$ taking real values on a subset of $\mathbb{R}$ is equivalent to $f$ and $g : z \mapsto \overline{f(\bar{z})}$ being equal on said subset.
Now, $f$ and $g$ are holomorphic (see for example $f(z)$ is holomorphic, prove that $g(z) = \overline{f(\overline{z})}$ is holomorphic.) on $U$ open connected and equal on $(z_0 - R, z_0 + R)$ which has accumulation points in $U$, hence they are equal everywhere on $U$, but that implies that they are equal on the interval $(z_0 - r_0, z_0 + r_0)$, hence $(a)$ holds.
This is not (anymore) in contradiction with jjagmath's counterexample for $(b)$ because of the constraint of stability by conjugation on $U$.