TITLE: Polynomials such that $P(\mathbb{U})\subset \mathbb{U}$
QUESTION [6 upvotes]: Question

Let $\mathbb{U}$ be the unit circle.
Find all $P\in \mathbb{R}[X]$ such that $P(\mathbb{U})\subset \mathbb{U}$.

My attempt
My conjecture is that $P=\mu X^d$ for some $d\geqslant 0$ and $\mu \in \mathbb{U}$.
I tried to prove it by contradiction, making a recurrence on the number of monomials in the polynom. Unfortunately it doesn't lead to anything interesting.
Could someone help me ?
NB : It isn't the same the question as Which polynomials fix the unit circle?, since $P(x+iy)\neq P(x)+iP(y)$ in general.

REPLY [5 votes]: Let $P(X)= \sum_{j=k}^n a_j X^j$, with $a_k \neq 0$ and $a_n \neq 0$. Then
$$2\pi \overline{a_k}a_n=\int_{0}^{2\pi}P(e^{it})\overline{P(e^{it})}e^{i(n-k)}d=\int_{0}^{2\pi}|P(e^{it})|^2e^{i(n-k)}dt=\int_{0}^{2\pi}e^{i(n-k)}dt$$
since $|P(e^{it})|=1$ by hypothesis. Because $a_k \neq 0$ and $a_n \neq 0$, you get that necessarily, $n=k$ and $|a_n|=1$, which implies that
$$\boxed{P(X)=\pm X^n}$$