$f(z)$ is analytic on $\{ |z| \leq 1\}$, and $f(z)$ is real on $\{|z| = 1\}$, show $f(z)$ is a constant. Let $f(z)$ be analytic on $\{|z| < 1\}$ that extends to $\{|z| \leq 1\}$. Assume $f(z)$ is real on $|z| = 1$. Prove that $f(z)$ is a constant.
Here is my attempt,
define $g(z) = e^{if(z)}$, for $|z| = 1$, we have $|g(z)| = 1$. Then $|\frac{1}{g(z)}| = 1$ as well. So that $|g(z)| = 1$ for $|z| = 1$.
(1) Is there any theorem I can use to show that this leads to $g(z)$ is constant on $|z| \leq 1$?
(2) If $g(z)$ is constant, can I show that $f(z)$ is constant?
 A: Note that your function $g$ is analytic on $U = \{z : |z| < 1\}$ as well. By the Maximum Modulus Theorem, we know that $|g| \le 1$ on $U$.
Consider the Cayley transform $$\phi(z) = \frac{z - i}{z + i}$$
defined on the closed upper half plane $\{z : \Im z \ge 0\}.$ This maps the open upper half plane $\Bbb H$ onto the open unit circle bihilomorphically and the real line on to the boundary.
Thus, we may consider the function $\tilde g = g \circ \phi$ on $\overline{\Bbb H}$. Note that $\tilde g$ is real on the real line. (It is in fact equal to $1$.)
Now, by the Schwarz reflection principle, $\tilde g$ extends to $G$ on $\Bbb C$ defined by $$G(z) = \begin{cases}\tilde g(z) & z \in \overline{\Bbb H},\\ \overline{\tilde g(\bar z)} & z \notin \overline{\Bbb H}, \end{cases}$$
holomorphically.
However, $|\tilde g| \le 1$ on $\overline{\Bbb H}$ and thus, the above formula shows that $|G| \le 1$ on $\Bbb C$ as well. Since $G$ is entire, $G$ is constant, by Liouville's theorem.
Thus, $\tilde g$ is constant and in turn, $g$ is constant. ($\phi$ is bijective.)
Thus, $z \mapsto e^{i f(z)}$ is constant. This means that $e^{i f(z)} = e^{i f(0)}$ for all $z \in U$. This means that $f(z) - f(0) = 2\pi k_z$ for some integer $k_z \in \Bbb Z$. A priori, it is possible that $z \mapsto k_z$ is not constant. However, $k_z$ is a continuous function of $z$ and takes value in the discrete set $\Bbb Z$. Since $U$ is connected, it follows that $z \mapsto k_z$ is constant.
Since $k_0 = 0$, it follows that $$f(z) = f(0),$$
for all $z \in U$.
A: The imaginary part of your function is a harmonic function equal zero on the boundary. By uniqueness for the Dirichlet problem, it is identically zero. The real part is the harmonic conjugate which, using Cauchy-Riemann conditions, has zero partial derivatives and hence is a constant. Your function is a real constant.
A: Hint: As you noticed, $|g|=1 =|1/g|$ on the unit circle. What does the maximum modulus theorem tell you about $g,1/g$ in the open unit disc?
