Constant analytic function inside the disk

$f$ is analytic in $\mathbb{D}$ and continuous on $\mathbb{D}$ closure. If $f(e^{i\theta})$ is a real number for $\theta$ in between $0$ to $2\pi$. Prove that $f$ is constant. Also I want to know what will happen if $\theta$ is in between $0$ to $\pi$?

-
@ZevChonoles, sorry I do not mean to be rude. Hope you like this better. I just started learning from this website. Thanks for the suggestion. – Deepak Dec 19 '12 at 18:12
@Deepak: Don't worry about it - there are always some things to get used to in a new community. Now you know for any future questions! :) – Zev Chonoles Dec 19 '12 at 18:13
@ZevChonoles Absolutely. – Deepak Dec 19 '12 at 18:18

One route is to use the Poisson kernel representation of $f$. This can be derived in may ways, eg, Derivation of the Poisson Kernel from the Cauchy Formula. (This formulation works for functions analytic on $B(0,R)$, but can be easily extended to deal with functions analytic on $B(0,R)$ and continuous on $\overline{B}(0,R)$.)

Let $B$ be the open unit ball. For $0\leq r < 1$, the Poisson kernel representation gives $f(r e^{i\theta}) = \frac{1}{2 \pi} \int_{-\pi}^\pi P_r(\theta -t) f(e^{it}) dt$, where $P_r(\theta) = \text{Re} \frac{1+re^{i \theta}}{1-re^{i \theta}}$. It follows from this that if $f(e^{i t})$ is real for all $t$, then $f(r e^{i\theta})$ is real for all $0\leq r < 1$. Hence $f(z)$ is real for all $z \in B$.

If $f(z)$ is real for all $z \in B$, it follows that $f'(z) = 0$ for $z \in B$ (if $f'(z_0) \neq 0$, then by looking at $\phi(t) = f(z_0+i t \overline{f'(z_0)})-f(z_0)$, it is straightforward to contradict $f(z)$ being real). Since $B$ is connected, it follows that $f$ is constant on $B$.

-

Hint: Since $f(e^{i\theta})\in \mathbb{R}$ then $f(z)\in \mathbb{R}$ for $z\in D$ (why?) . If $f=u+iv$ then $v\equiv 0$ and...

Proof of the first part. Remember that $z\in \partial D\iff z=e^{i\theta}$ for some $\theta\in [0,2\pi)$. Then $f(z)\in \mathbb{R}$ for $z\in \partial D$. Use the identity theorem...

-
At@Nameless Nameless. I still confuse. Can you prove more rigorously please? – Deepak Dec 19 '12 at 18:19
Which part do you want me to prove more rigorously? – Nameless Dec 19 '12 at 18:20
First part please. – Deepak Dec 19 '12 at 18:21
Try the Poisson kernel. – copper.hat Dec 19 '12 at 18:22
@Nameless: Are you using $D$ to be the unit disk or its boundary? – copper.hat Dec 19 '12 at 18:24

Extend $f$ to $|z| > 1$ by $f(z) = \overline{f(1/\overline{z})}$. Note that the extended function is analytic in $\{z: |z| > 1\}$ as well as $\{z: |z| < 1\}$ and continuous on all of $\mathbb C$. By Morera's theorem it is an entire function. Now use Liouville's theorem.

EDIT: for a nice example where $f(e^{i\theta})$ is real for $0 \le \theta \le \pi$, take $$f(z) = \left( \sqrt {{\frac {i-iz}{z+1}}}+1 \right) ^{-1}$$ (using the principal branch of the square root) with $f(-1) = 0$.

-