A holomorphic function that only takes real values on an interval takes only real values on the entire real axis I have issues finishing the proof of an exercise concerned with an application of the Schwarz reflection principle. 

Let $f: \mathbb{C} \to \mathbb{C}$ be a holomorphic function and
  $(a,b) \subset \mathbb{R}$. a real nonempty interval such that $f$
  only takes real values on $(a,b)$. Show that $f$ only takes real
  values on all of $\mathbb{R}$.

My idea is to solve this using the following two theorems. 

$\text{Theorem 1 (Schwarz reflection principle):}$ Suppose $G \subset
 H^{+}$ where $H^{+}$ denotes the upper half plane. Suppose that $K
 \subset \partial G$ where $K$ denotes an interval of the real axis.
   Let $f: G \to \mathbb{C}$ be holomorphic extendable to a continous
  function $f: \bar{G} \to \mathbb{C}$ where $\bar{G}$ denotes the
  topological closure of $G$. Suppose that $f(K) \subset \mathbb{R}$.
  Let $\tau$ denote the complex conjugation such that $\tau(G)$ is the
  reflection of $G$ across the real axis. Define 
$$ F: G \cup K \cup \tau(G), \ F(z)=\begin{cases} f(z) & , \ z \in G
 \\ \overline{f(\bar{z})} &  , \ z \in \tau(G) \\
 f(z)=\overline{f(\bar{z})} & , \ z \in K     \end{cases} $$ 
  Then $F$ is holomorphic.

and

$\text{Theorem 2 (Uniqueness theorem):}$ Let $D \subset \mathbb{C}$ be
  a domain (an open, connected set). Let $J$ be a subset of $D$ having
  an accumulation point $a \in D$. Let $h_1,h_2: D \to \mathbb{C}$ be
  holomorphic. If $h_1=h_2$ on $J$ then $h_1=h_2$ on $D$.

Consider the upper half plane $H^{+}$ and $f|_{H^{+}} : H^{+} \to \mathbb{C}$. Then $f|_{H^{+}}$ is holomorphic because $f$ is holomorphic. This function can be continously extended to a function $f|_{\bar{H^{+}}}: \bar{H^{+}} \to \mathbb{C}$. Then I may define $K:=(a,b) \subset \partial H^{+}$. Let $H^{-}$ denote the lower half plane. By the Schwarz reflection principle there is a holomorphic function $F: H^{+} \cup K \cup H^{-} \to \mathbb{C}$ which is a holomorphic extension of $f|_{H^{+}}$. 
I wanted to proceed as follows: 
1) Show that $F$ extends to an entire function $\tilde{F}$, such that  $\tilde{F}$ only takes real values on all of $\mathbb{R}$.
2) Use the uniqueness theorem to show $\tilde{F}=f$. 
My issue is that I do not see how to prove 1).    
 A: As per my comment, a direct solution to the problem follows noting that if $f$ is a holomorphic function and there is a real interval $(a,b)$ for which the restriction of $f$ to it is real, all the derivatives of $f$ are real on $(a,b)$ - this is clear since we can take $f'(c)=\lim_{h \to 0} \frac{f(c+h)-f(c)}{h}$ with $h$ small real so $f'$ is real on $(a,b)$ and we can use induction on the order of the derivative (or simply noting that $f$ restricted to $(a,b)$ is real analytic and its derivatives as a real analytic function of $1$ variable are the same as the ones as a complex function by analytic continuation).
But then picking $c \in (a,b)$ (for example $c =\frac{a+b}{2}$) the Taylor series of $f$ at $c$ is 
$\sum \frac{f^{(n)}(c)}{n!}(x-c)^n$ which is obviously real for any real $x$ for which the series converges; since $f$ is entire, the Taylor series sums to $f(x)$ for all real $x$ so we are done!
A: Let $S:=(a,b)\times \Bbb R$ and $S^+=(a,b)\times (0,\infty)$ and $S^-=(a,b)\times (-\infty,0)$. Now, go through the the proof of Schwarz's reflection principal, for example, see page 211 of Conway's Complex analysis. 
Now, $f\big|S^+$ is holomorphic and  $f\big|(a,b)\times \{0\}$ is real valued continuous. So, the proof actually gives $$g:z\longmapsto \begin{cases}\overline {f(\overline z)} &\text{ if }z\in S^-\\ f(z) & \text{ if }z\in S^+\cup \big((a,b)\times \{0\}\big)\end{cases}$$ is a homlomorphic extension of $f\big|S^+$ on $S$. But, $f\big| S$ already is an extension, so indentity theorem gives $f(z)=g(z)=\overline{f(\overline z)}$ for all $z\in S^-$.
Now, the map $\widetilde f:H^-\ni z\mapsto \overline{f(\overline z)}$ is also holomorphic, and coincide with $f$ on $S^-$. So, $\widetilde f=f\big|H^-$, by identity theorem. So, $f(z)=\overline{f(\overline z)}$ for all $z\in H^-$. Hence, by continuity of $f$ we have $f\big|\Bbb R\subseteq\Bbb R$.
A: Another proof: Let $u = \text{Re } f, v= \text{Im }f.$ Then $v$ is a real analytic function on $\mathbb R$ that vanishes in $(a,b).$ By the identity principle for real analytic functions, $v=0$ on $\mathbb R.$ Thus $f=u$ on $\mathbb R$ as desired.
