An entire function which is real on the real axis and map upper half plane to upper half plane Suppose that $f$ is an entire function that satisfies $f(z)$ is real when $z$ is real and if $Imz>0$ then $Imf(z)>0$. Prove that $f$ can have at most one zero and that the zero, if it occurs, is real. Show also that if $f$ has no zero then $f$ is constant.
By the open mapping theorem the zeros can not be in the upper half plane and I think that I will also need to use Lioiville's theorem at some point but I couldn't achieve. Thanks for any help.
 A: Well, zhw has given a simpler proof that there's at most one zero. But to clarify how this follows from the Argument Principle:
Say $r>0$ annd let $\gamma(t)=re^{it}$ for $0\le t\le 1\pi$. Choose $r$ so $f$ has no zero on $\gamma$. Let $$\Gamma = f\circ \gamma.$$
Now $\Im\Gamma(t)>0$ for $0<t<\pi$ and $\Im\Gamma(t)<0$ for $\pi<t<2\pi$. Hence the index, or winding number, of $\Gamma$ about the origin is at most $1$. But this index is exactly $\int_\gamma f'/f$. So $f$ has at most one zero in the disk $|z|<r$. Let $r\to\infty$: $f$ has at most one zero.
And now for what I said about showing that $f$ is constant if it has no zero: Suppose $f$ has no zero. There exists an entire function $g$ such that $$f=e^g=e^{u+iv}.$$ Now if $\Im z>0$ then $\Im f(z)>0$, hence $$v(z)\in\bigcup_{n\in\Bbb Z}(2\pi n,2\pi(n+1))\quad(\Im z>0).$$By continuity (noting the upper half-plane is connected) there exists $n$ so $$v(z)\in(2\pi n,2\pi(n+1))\quad(\Im z>0).$$So $v$ is bounded in the upper half plane. Similarly $v$ is bounded in the lower half plane. And $v$ is constant on $\Bbb R$, so $v$ is bounded. Hence $g(\Bbb C)$ is not dense in $\Bbb C$; now a simple corollary of Liouville shows that $g$ is constant.
A: One way to see $f$ has at most one zero: If $f'(a) = 0$ for any real $a,$ the power series of $f$ at $a$ looks like $ f(a) +  c(z-a)^n(1 + O(z-a)),$ with $c\ne 0$ and $n>1.$ It follows that there is $t\in (0,\pi)$ such that $\text {Im}\, f(a+re^{it})<0$ for small $r>0,$ contradiction. So $f$ restricted to $\mathbb {R}$ is real with $f'$ nonzero on $\mathbb {R}.$ Hence $f$ is either strictly increasing or strictly decreasing on $\mathbb {R}.$ Therefore $f$ has at most one zero in $\mathbb {R},$ and hence in $\mathbb {C}.$
From Poisson integral theory, we can conclude more in this problem: the only solutions are of the form $f(z)=a+bz,$ where $a\in \mathbb R ,b>0.$ Proof sketch: Suppose $u$ is positive and harmonic in the open unit disc $D$ with $u\in C(\overline D \setminus \{1\})$ and $u = 0$ on $\partial D \setminus \{1\}.$ Then $u$ is the Poisson integral of a positive Borel measure on $\partial D,$ and because of the boundary hypothesis, that measure is a point mass at $1.$ That implies $u$ is a constant times the Poisson kernel itself (based at $1$). You can then transfer this result to the upper half plane via a standard conformal map. The Poisson kernel above will magically transform into the function $y$ (or a constant times it). So in our problem, $\text {Im}\,f(x+iy) = by$ for some $b>0,$ and the rest follows.
