Solution (source code)

= Solution

Let $\Gamma$ be any closed curve in $\mathbb C\setminus B$. Since the arc $B$ joins $-i$ to $i$ without meeting $\Gamma$, those two points lie in the same component of $\mathbb C\setminus\Gamma$. Their winding numbers about $\Gamma$ are therefore equal. The residue theorem gives
$$
\oint_\Gamma\frac{dt}{1+t^2}
=\pi\{\operatorname{wind}(\Gamma,i)-\operatorname{wind}(\Gamma,-i)\}=0.
$$
Thus every closed-path period vanishes. <Integrals> from $0$ to $z$ along any two paths avoiding $B$ agree, so $F_B$ is single-valued. Notice that this argument uses cancellation of the two residues; simple connectedness of the slit domain is not required.