Algebra Polynomial proble There is a problem about polynomial. Let $p$ be a complex polynomial with degree $m$. Suppose there exist $x_0,x_1,...,x_m$ distinct real numbers such that $p(x_i)$ are real numbers for $i=0,1,..,m$. Prove that all coefficients of $p$ are reals.
Is there any theoretical knowledge for this problem? I did not see such type of problem
 A: Hint: let $y_i=p(x_i) \in \mathbb{R}$. The $m+1$ equations:
$$a_0 + a_1 x+i + a_2 x_i^2 + \cdots + a_m x_i^m = y_i \quad \quad i = 0,1,\cdots,m$$
form a linear system with $m+1$ unknowns $a_0,a_1,\cdots,a_m$. The system is uniquely determined since its determinant is that of a Vandermond matrix with distinct entries $x_i \ne x_j$. Since all coefficients $x_i,y_i$ are real, the solution of the system is real as well, so all $a_j$ are real, thus so is $p(x)$. 
As a side comment, the solution obtained in this way is precisely the interpolating polynomial through the points $(x_i,y_i)$ as hinted by @Ben in a comment.
A: By CRT = Chinese Remainder the system $\, p \equiv r_i\pmod{x\!-x_i}$ has a unique solution $\, p\in \Bbb R[x]\,$ of degree $\,\le m.\,$ This persists as the unique such solution in $\,\Bbb C[x].$
A: Hint: Consider the case where $m=2$.  This this case, $p(x)=ax^2+bx+c$.  Suppose that $x_0$, $x_1$, and $x_2$ are distinct real numbers such that $p(x_i)$ is also real.
Then, 
$$
p(x_2)-p(x_1)=a(x_2^2-x_1^2)-b(x_2-x_1)=(x_2-x_1)(a(x_2+x_1)+b).
$$
Since $p(x_2)$, $p(x_1)$, and $x_2-x_1$ are real, $a(x_2+x_1)+b$ is also real.  Similarly, $a(x_1+x_0)+b$ is also real.
Since $a(x_2+x_1)+b$ and $a(x_1+x_0)+b$ are real,
$$
a(x_2+x_1)+b-(a(x_1+x_0)+b)=a(x_2-x_0)
$$
is also real.  Since $x_2-x_0$ is real, $a$ is also real.  Since $a$ is real and $a(x_2+x_1)+b$ is real, $b$ is real, since $ax_2^2+bx_2+c$ is real and $a$, $b$, and $x_2$ are real, then $c$ is also real.
