Extending a holomorphic function defined on a disc Suppose $f$ is a non-vanishing continous function on $\overline{D(0,1)} $ and holomorphic on ${D(0,1)} $ such that $$|f(z) | = 1$$ whenever $$|z | = 1$$
Then I have to prove that f is constant.
We can extend $f$ to all $\mathbb{C}$ by setting $$f(z) = \frac{1}{\overline{f(\frac{1}{\bar{z}})}}$$ and the resulting function is holomorphic on ${D(0,1)} \ $, $\mathbb{C} - \overline{D(0,1)}$ and continous on $\partial D(0,1)$.
But how can we say that the resulting function is holomorphic in $z \in \partial D(0,1)$ ?
 A: To prove that $f$ is identically constant, you'd better employ the maximum principle, according to which the maximum of $|f|$ on $\overline{D}$ equals 1. But $f$ is non-vanishing on $\overline{D}$, hence $\frac{1}{f}$ is holomorphic on $D$ while $\bigl|\frac{1}{f}\bigr|=1$  on $\partial{D}$. By the same maximum principle now follows that the minimum of $|f|$ on $\overline{D}$ also equals 1. Hence  $|f|=1$ on $\overline{D}$, whence readily follows the desired result.
A: Let $z$ be a point on the boundary. Consider a small rectangle around $z$. We would like to show that the contour integral of $f$ around that rectangle is $0$, to conclude by Morera's theorem that $f$ is holomorphic at $z$.
Cut the rectangle into two parts on either side of the boundary, where you make both parts (i.e. their boundary curves) to have some distance $\epsilon>0$ from the boundary of $D$. By Cauchy's theorem the contour integral around both of these individually is $0$, since the function is holomorphic on the complement of $\partial D$.
Now notice that you can write the contour integral around the rectangle as a limit of the sum of the two contour integrals as $\epsilon\rightarrow 0$. But each of these summands is $0$, therefore the contour integral is $0$ and the function is holomorphic at $z$.
This is a famous trick, which you can read up in greater detail e.g. in the book of S. Lang (it may even include a picture).
