For every analytic function $f$ on $G$ (simply connected,open) s.t $f(z) \neq 0, \forall z \in G$, then $\exists$ g analytic in $G$ s.t $g^2 = f$ I have to show that for every analytic function $f$ on $G \subseteq \mathbb{C}$ (Simply connected open set) such that $f(z) \neq 0, \forall z \in G$, then $\exists$ a function g analytic in $G$ such that $g^2 = f$. 
Also, I need to give an example of an open set $G$ which is not simply connected and an analytic function $f$ on $G$ with $f(z) \neq 0, \forall z \in G$ such that $f \neq g^2$ for every analytic function $g \in G$.
I do not see how to approach this problem. If I get the first part, maybe the example will be easier. 
 A: Since $f(z)$ is analytic and doesn't vanish on a simply connected set $G$ we can conclude that ${{f'\left( z \right)} \over {f\left( z \right)}}$ is analytic on $G$ and therefore has a primitive there (because $G$ is simply connected).
Let $h(z)$ be the primitive of ${{f'\left( z \right)} \over {f\left( z \right)}}$. Then, by the the definition of a primitive function: $$h'\left( z \right) = {{f'\left( z \right)} \over {f\left( z \right)}}$$
Notice that
$$\eqalign{
  & {d \over {dz}}\left( {f\left( z \right){e^{ - h\left( z \right)}}} \right) = f'\left( z \right){e^{ - h\left( z \right)}} - f\left( z \right){e^{ - h\left( z \right)}}h'\left( z \right)  \cr 
  & {\rm{                        }} = f'\left( z \right){e^{ - h\left( z \right)}} - f\left( z \right){e^{ - h\left( z \right)}}{{f'\left( z \right)} \over {f\left( z \right)}}  \cr 
  & {\rm{                        }} = f'\left( z \right){e^{ - h\left( z \right)}} - f'\left( z \right){e^{ - h\left( z \right)}} \equiv 0 \cr} $$
Therefore the function ${f\left( z \right){e^{ - h\left( z \right)}}}$ is constant:$$\eqalign{
  & f\left( z \right){e^{ - h\left( z \right)}} \equiv c  \cr 
  & f\left( z \right) \equiv c \cdot {e^{h\left( z \right)}} \cr} $$
Since $c \ne 0$  (as $f(z)$ cannot vanish) we can define $$\alpha  = \log \left( c \right)$$ for some branch of log.
Now we define $$k\left( z \right) = h\left( z \right) + \alpha $$ and notice that:
$${e^{k\left( z \right)}} = {e^{h\left( z \right) + \alpha }} = {e^\alpha }{e^{h\left( z \right)}} = c \cdot {e^{h\left( z \right)}} = f\left( z \right)$$
$k(z)$ is an analytic function because $h(z)$ is.
Last, we define $$g\left( z \right) = {e^{{1 \over 2}k\left( z \right)}}$$ which is also analytic as a composition of analytic functions and the following holds:
$${g^2}\left( z \right) = {\left( {{e^{{1 \over 2}k\left( z \right)}}} \right)^2} = {e^{k\left( z \right)}} = f\left( z \right)$$
as required.
A: Let $G= \mathbb{C}\setminus \{0\}$ and $f(z) = z$.
Suppose $g$ is continuous on $G$ and $g^2 = f$.
We see that we must have $e^{- i{t \over 2}} g(e^{it}) \in \{\pm 1\}$
and by continuity we have $g(e^{it}) = e^{ i{t \over 2}}$
or $g(e^{it}) = -e^{ i{t \over 2}}$. Evaluating $g(0), g(2 \pi)$ yields
a contradiction in either case.
