Let $S=\{ h:D \rightarrow D : h$ is analytic in $ D$ such that $h(z)^2=\overline {h(z)}$ for all $z\in D$}, Where $D=\{z \in \mathbb{C: \vert z \vert}<1\}$. Then the cardinality of $S?$
My work: let $f(z)=u+iv$ and using the given condition I find two relation
$$u^2-v^2=u$$
$$2uv+v=0$$ If suppose $v \neq0$ then $u=-1/2$ so $f$ is constant.Is the logic correct?
If $h$ is analytic, then so is $\,h^2=\overline h,\,$ and hence $\,h+\overline h,\,$ which is real valued, is also analytic. But, real valued and analytic, implies constant. Hence, $h$ is also constant.
So $h(z) \equiv w,\,$ with $\,w^2=\overline{w}.\,$ Thus $$\,|w|^2=|\overline w|=|w|,$$
and therefore, $\,|w|=0\,$ or $\,|w|=1.\,$
But $\,|w|=1\,$ is rejected, since it does not belong to $D$.
Hence $\,h\equiv 0\,$ and $\,|S|=1$.