Prove that the following complex-valued function is odd. I'm working on the following problem from the Texas A&M Fall 2013 graduate level qualifying exam:

Define $\Omega:=\mathbb{C}\setminus [-i,i]$, that is, the complex
  plane with a slit along the imaginary axis from $-i$ to $i$. Suppose
  that $f\in H(\Omega)$ is such that $(f(z))^2=z^2+1$ for every $z\in \Omega$. Prove that $f$ is odd, namely, $f(z)=-f(-z)$ for all $z\in\Omega$. 

I started by defining $g:\Omega\to\mathbb C$ by $g(z)=f(z)+f(-z)$; clearly, it suffices to show that $g\equiv 0$ on $\Omega$. By a simple computation, one can see that $[g(z)]^2=2f(z)g(z)$. I then tried to prove the claim by contradiction - supposing that there is some $c\in \Omega$ such that $g(z)\neq 0$, but things started to get messy, and I figured I was on the wrong track. 
Edit: changed brackets to parentheses. 
 A: Note that $\Omega$ is connected. Replacing $z$ by $-z$, we have $(f(z))^2=(f(-z))^2$, hence $(f(z)-f(-z))(f(z)+f(-z))=0$. As the ring of analytic functions over $\Omega$ is an integral domain, we must have $f(z)-f(-z)=0$ for all $z$, or $f(z)+f(-z)=0$ for all $z$. Suppose that $f(z)=f(-z)$, we want a contradiction.
Let $E=\{z; [z|>1\}$. Then $E\subset \Omega$, and on $E$, $f$ has a Laurent expansion: $\displaystyle f(z)=\sum_{k\in \mathbb{Z}} a_k z^k$. But $f$ is even; hence $a_{2m+1}=0$ for all $m$, and $\displaystyle  f(z)=\sum a_{2k}z^{2k}$. Put $\displaystyle g(z)=\sum a_{2k} z^{k}$. Then $g$ is analytic on $E$, and we have $g(z^2)=f(z)$. From the given functional relation, we get that $(g(z))^2=z+1$ for all $z\in E$. Let now $E_1=\{z; |z|>2\}$. If $z\in E_2$, then $z-1\in E_1$, and $h(z)=g(z-1)$ is analytic here. On $E_2$, we have $(h(z))^2=z$. Now let $E_3=\{z; 0<|z|<1/2\}$. Replacing $z$ by $1/z$, and putting $R(z)=h(1/z)$, then $R$ is analytic in $E_3$, and $(R(z))^2=1/z$ here.
This imply that $R$ cannot have an essential singularity at $0$, as $|R(z)|\to +\infty$ if $|z|\to 0$. Hence $R$ has a pole, say of order $m\geq 1$. We get that $R(z)=S(z)z^{-m}$, with $S$ analytic on $\{z, |z|<1/2\}$, and $S(0)\not =0$. Replacing, we get that $2m-1=0$, the final contradiction.   
A: For $z = it$ with $t > 1$ this implies $f(it)^2 = 1-t^2$ and therefore $f(it) = \pm i \sqrt{t^2-1}$. By continuity therefore either $f(it) = i \sqrt{t^2-1}$ or $f(it) = -i\sqrt{t^2-1}$ for all such $t$. Now use analytic continuation into all of $\Omega$.   
A: Consider the function
$$
f(z)=z\sqrt{1+\frac1{z^2}}
$$
with the main branch of the square root function. Outside the unit circle, $\pm f(z)$ are the only analytic solutions of the functional equation, as the radicand is then inside the disk $D(1,1)$ which does not contain any part of the negative half axis.
The continuation to the inside of the unit circle stays analytic as long as the radicand is not on the negative half-axis. This happens only when $Im(z^2)=0$ and $-1<Re(z^2)<0$ which implies $Re(z)=0$ and $Im(z)\in[-1,1]\setminus\{0\}$. These points are all part of the segment excluded from the domain.
Thus the functions $\pm f$ are defined on the given domain and are the only analytic solutions of the functional equation there. Obviously, both are odd functions.
