Determine all entire functions $f$ with the property that if $|z|=1$, then $|f(z)|=1$. My question is how to solve: Determine all entire functions $f$ with the property that if $|z|=1$, then $|f(z)|=1$.
I was thinking that I could solve this by first show that $f$ has to be a polynomial. Then I can use the formula 
\begin{align*}
f(z)=z^{n}(a_{n}+a_{n-1}/z+...+a_{1}/z^{n-1+a_{0}/z^{n}})
\end{align*}
where $a_{n}\neq 0$.
And then somehow show that 
\begin{align*}
f(z)=z^{n}a_{n},
\end{align*}
with $|a_{n}|=1$. (I think that this is the answer.) 
Could someone help me? What are the steps I should to? 
Some theorems that my book covers and I think will be needed are Liouville's theorem, Maximum principle, fundamental theorem of algebra. Thanks! 
 A: Disclaimer: Wrong proof, see commments. I will leave it up for discussion purposes and edit it later.
Think this is more about the maximum modulus principle. By that we have that $|f(z)|\leq 1$ within the unit disk. Also, similarly, by the minimum modulus principle, we have that the function either has a zero or we have $|f(z)|\geq1$.
 So lets assume the function has no zero. Then we can conclude that $|f(z)|=1$ for all $z \in D$. Since $|f|$ is constant, so is $f$. So any function with $f(z)=w$, $|w|=1$ is a suitable candidate.
Lets assume the function has a zero of order n, lets say in $z_0$. Then we have 
$$
f(z)=(z-z_0)^nh(z)
$$ 
Since $h(z)$ is zero-free within $D$, we can apply the min/max principle again. In absolute values, this will lead to:
$$
\frac{1}{|z-z_0|^n} \leq|h(z)| \leq \frac{1}{|z-z_0|^n}
$$
But that means that our function $f(z)$ statisfies the estimate for $z \in D$:
$$
1 \leq |f(z)|\leq 1
$$
As above, $f(z)$ has to be constant, but it has a zero. A contradiction.
A: Hint: For $a\in \mathbb D,$ the open unit disc, define
$$g_a(z) = \frac{a-z}{1-\bar a z}.$$
Then $g_a$ is holomorphic on a neighborhood of the closed unit disc, and $|g|=1$ on $\partial \mathbb D.$ Any finite product of such functions is a candidate here.
A: Here's a complete classification: such functions are exactly those of the form $\lambda z^k$ for $k \geq 0$ and $|\lambda| = 1$. We get this out of a classification for all such meromorphic functions, which is obtained by using the maximum principle and knowledge of enough examples:

Proposition. If $f$ is meromorphic on $\mathbb{C}$ and $|f(z)| = 1$ whenever $|z| =1$, then for some finite $l$, there are $a_1, ..., a_n \in \mathbb{C} - S^1$, integers $k_0, ..., k_n$, and a complex number $\lambda$ with $|\lambda| =1$ so that $$f(z) = \lambda z^{k_0} \prod_{l=1}^n \left(\frac{z - a_l}{ 1 - \overline{a_l} z} \right)^{k_l}.$$

Note that this immediately yields our result, since the only entire functions of this form are $\lambda z^k$, for $k \geq 0$. Note also that our proof only uses that $f$ is meromorphic on $\mathbb{D}$ and continuous on $\overline{\mathbb{D}}$, which actually allows us to conclude a version of the Schwarz reflection principle using the symmetries of this expansion.
So let's prove the proposition by induction on the total number of zeros and poles $f$ has in $\mathbb{D}$ with multiplicity. If $f$ has no zeros, the maximum principle applied to $f$ and $1/f$ shows that $f$ must be constant, proving this case. Otherwise, let $a$ be a zero or pole of $f$.
If $a = 0$, we can write $f(z) = zh(z)$ or $f(z) = h(z)/z$ for some meromorphic $h$ which has fewer total zeros and poles on $\mathbb{D}$ and still satisfies our boundary condition. Otherwise if $a$ is a zero, $\varphi_a(z) = \frac{z-a}{1-\bar{a} z} $ is meromorphic, has exactly one simple zero at $a$, no poles in $\mathbb{D}$, and has $|\varphi_a(z)| = 1$ whenever $z = 1$. So $f(z) = \varphi_a(z) h(z) $ with $h(z)$ meromorphic with strictly fewer zeros in $\mathbb{D}$ and $|h(z)| = 1$ when $|z| = 1$. If $a$ is a pole, then $f(z) = \varphi_{1/\bar{a}}(z) h(z)$ is a similar decomposition. Applying the induction hypothesis to $h$ then yields the desired decomposition of $f$.
