holomorphic function $f: \mathbb{C}\setminus [-1,1]\longrightarrow \mathbb{C}$ such that $f^2(z)=z^2-1$. Prove there does not exist a holomorphic function $f: \mathbb{C}\setminus [-1,1]\longrightarrow \mathbb{C}$ such that $f^2(z)=z^2-1$ for all $z\in \mathbb{C}\setminus [-1,1]$. 
I really do not know how to solve... Thank you a lot.
 A: There does exist a branch of $\sqrt{z^2-1}$ on $\mathbb{C}\setminus [-1,1]$ (since that is connected, there are exactly two branches).
Firstly, $G_1 = \mathbb{C}\setminus (-\infty,1]$ is simply connected, and $z^2-1$ has no zeros in $G_1$, hence there are two branches of $\sqrt{z^2-1}$ on $G_1$. Let $f_1$ be the branch taking positive real values on $(1,\infty)$.
Secondly, on $D_1(0)$, let $h$ be the branch of $\sqrt{1-w^2}$ with $h(0) = 1$, i.e.
$$h(w) = \sum_{k=0}^\infty (-1)^k\binom{\frac{1}{2}}{k}w^{2k}.$$
On $G_2 = \mathbb{C}\setminus \overline{D_1(0)}$, let
$$f_2(z) = z\cdot h\left(z^{-1}\right).$$
Then $f_2(z)^2 = z^2\cdot h(z^{-1})^2 = z^2(1-z^{-2}) = z^2-1$, so $f_2$ is a branch of $\sqrt{z^2-1}$, and $f_2$ takes positive real values on $(1,\infty)$. Also, $G_1 \cap G_2$ is connected, hence $f_1 = f_2$ on $G_1 \cap G_2$ by the identity theorem. Therefore
$$f(z) = \begin{cases}f_1(z) &, z \in G_1 \\ f_2(z) &, z \in G_2 \end{cases}$$
is a holomorphic branch of $\sqrt{z^2-1}$ on $G_1 \cup G_2 = \mathbb{C}\setminus [-1,1]$.
A: EDIT: I made a mistake in my computations, and the map does factor through, and, as pointed out in Daniel Fischer's answer, a square root does exist.
You can use the fact that the map $p(z)=z^2$ is a covering map from $\mathbb C\setminus \{0\} \rightarrow \mathbb{C}\setminus{0}$ . Given a function $f(z)$, a square root of a function $f(z)$ is a lift of $f$ by the covering map. This layout  gives you topological obstructions for the existence of the square root as a lift; the induced map on the respective fundamental groups must satisfy that $\pi_*(\mathbb C-[-1,1])\subset \pi_*(\mathbb C)=0$, which is not satisfied here .
This  When does a complex function have a square root? gives an excellent extended answer from which I learnt a lot.
