I think this is related to the Hermite-Biehler theorem from control theory. Are you familiar with this theorem?
I can't figure out where to start on this one.
Let p(z) = an*z^n+...+a1*z+a0 be a polynomial of degree n with complex coefficients and suppose there exists {z1,...,zn} distinct complex numbers each having Imaginary(zj)>0 such that p(zj)=0 for j∈{1,...,n}. Set q(z)=Real(an)·z^n+...+Real(a1)·z+Real(a0). Prove that if q(w) = 0 then w must be real.
(Here, Imaginary(zj) denotes the imaginary part of zj and Real(aj) denotes the real part of aj.)
The key to this is to think in terms of the winding number. Let denote a D-shaped contour consisting of a long interval [–R,R] on the real axis together with a semicircle of radius R around the upper half-plane. If R is large enough then all the zeros of p(z) will be inside . It follows that as z goes round , p(z) will go n times round the origin (in other words, its winding number is n). Thus will go from positive to negative and back again n times, and will therefore take the value 0 2n times. As z goes round the semicircle (so that |z|=R, which is large), p(z) will be dominated by its first term , and so its real part will take the value 0 n times. Therefore the other n zeros of must occur as z goes along the real axis. Thus q(z) has n real zeros. Since it is a polynomial of degree n, it cannot have any other zeros.
[Notice that if z is real, but not otherwise.]