Let $P$ be a complex polynomial such that $z \in \mathbb{R} \iff P(z) \in \mathbb{R}$. Show that $deg P = 1$ I need some help with the following question:
Let $P$ be a complex polynomial such that $z \in \mathbb{R} \iff P(z) \in \mathbb{R}$. Show that $deg P = 1$
There's also a hint:
Define $P = u+iv$ and show that either $v_y \le 0$ or $v_y \ge 0$ on the real axis.
I've managed to prove that. Then using CR equations I deduced that $u$ is monotone on the real axis which proves that $deg P$ is odd. I'm not sure what to do next.
Any help will be greatly appreciated
Thank you 
 A: This is how I would prove that $P$ is of degree $1$:
Say $P = a_nz^n + \cdots + a_0$, let $s > 0$ be a real number large enough that on the circle $\gamma$ with radius $s$ centered at the origin, the $n$-th degree term of $P$ dominates all the other terms together. Now parametrize $\gamma$ by $z(t) = se^{it}$, for $0\leq t < 2\pi$.
As $t$ goes from $0$ to $2\pi$, we have that $z(t)$ goes around $\gamma$, and $P(z(t))$ goes around the origin $n$ times. That means it hits the positive real axis at least $n$ times, and the negative real axis at least $n$ times. But $z(t)$ only hits the real axis twice (once on the positive side, and once on the negative side), so we must have $n = 1$, otherwise we have a value for which $P(z)$ is real, but $z$ is not.
A: Let $n$ be the degree of $P$.
The hypothesis implies that all $n$ zeros of $P$ are real because $0$ is real. This implies that $P$ has real coefficients because $P(x)=a(x-a_1)\cdots(x-a_n)$ implies $a$ is real by taking $x$ any real number that is not a root of $P$.
Now consider the equations $P(x)=c$ with $c$ real. The solutions must all be real, for every $c$. This means that the line $y=c$ cuts the graph of $P$ exactly $n$ times, counted with multiplicity. But this cannot happen if $n>1$ because $P$ goes monotonically to $\pm \infty$ as $x \to \infty$.
A: As you and lhf both noted, $P(z)$ has real coefficients; from the hypothesis the $v$ vanishes exactly on the real axis, we know that (possibly after replacing $P$ with $-P$) $v$ is strictly positive (say) on the upper half plane and strictly negative on the lower half plane. Therefore $v_y\ge0$ on the real axis. By $CR$, we know that $u_x \ge 0$ on the real axis, as you said. Hence, viewing $P$ as a polynomial function from the reals to the reals, we know that $P$ is nowhere decreasing.  $P$ is not constant (otherwise the entire complex plane is mapped into the reals, contrary to hypothesis), so there is a $a\in {\mathbb R}$ such that $P'(a)$ is not zero. Let 
$c = P(a).$
Then, the polynomial $P(z) - c $ does not have a repeated root at $a$.
Hence, if $P$ is not of degree one, there is a  $b  \not=a$ (which must also be real, by the premise of the question) such that 
$$c = P(b) = P(a).$$      
But this is not possible  (as $P$ is nowhere decreasing, and $P'(a)\not= 0.$)
Hence $P$ is of degree one.
