Complex Analysis:Show that $a \in \mathbb{Z}$ and that there is $\theta \in \mathbb{R}$ so that $f(z)=e^{i\theta}z^{a}$. Let $f$ be analytical on ann $A(0;r,R)$ and suppose there is $a \in \mathbb{R}$ such that $|f(z)|=|z|^{a}$, $\forall z \in A$. Show that $a \in \mathbb{Z}$ and that there is $\theta \in \mathbb{R}$ so that $f(z)=e^{i\theta}z^{a}$.
I have the impression that using Schwarz's lemma forms $ f(z)=e^{i\theta}z^{a} $, but I cannot develop it. I can't think of results that prove  $  a \in \mathbb{Z} $. Could you help me with ideas?
 A: The principal branch of $g(z)=z^a$ is holomorphic in $\mathbb C\setminus (-\infty,0].$ We then have both $f,g$ holomorphic in $U=A(r,R)\setminus (-\infty,0],$ an open connected set. Note both $f,g$ are nonzero in $U.$ Thus in $U$ we have $f/g$ holomorphic, with $|f/g|=1.$ It follows that $(f/g)(U)$ is not open. By the open mapping theorem, $f/g = C$ in $U,$ where $C$ is a constant of modulus $1.$ Therefore $f(z)/C = z^a$ in $U.$ It follows that $z^a$ extends to be holomorphic in $A(r,R).$ But we know for that to happen $a$ must be an integer.
A: (I use $r$ for $\vert z\vert$, so I will change the domain to $A(0;R_1,R_2)$)
Write $f(re^{i\phi})=R(r,\phi)e^{i\psi(r,\phi)}$. By assumption $R(r,\phi)=r^a$. Thus the Cauchy-Riemann equations give us \begin{align*}
\frac{\partial\psi}{\partial\phi}(r,\phi)&=a\\
\frac{\partial\psi}{\partial r}(r,\phi)&=0\\
\end{align*}
Hence $\psi(r,\phi)=a\phi+\theta$ for some constant $\theta\in\Bbb R$. We then get for $z=re^{i\phi}$: $$f(z)=f(re^{i\phi})=r^ae^{i(a\phi+\theta)}=e^{i\theta}z^a$$ in $A(0,R_1,R_2)\setminus\{x\in \Bbb R\mid R_1<x<R_2\}$. We know that $f$ is actually defined on the whole annulus $A(0;R_1,R_2)$ which is not possible if $a\notin\Bbb Z$.
Edit: The Cauchy-Riemann equations for the function in polar coordinates as above are:\begin{align*}
r\frac{\partial R}{\partial r}&=R\frac{\partial\psi}{\partial\phi}\\
\frac{\partial R}{\partial \phi}&=-rR\frac{\partial\psi}{\partial\phi}
\end{align*}
Now plug in $R(r,\phi)=r^a$.
