I am working through the proof that the fundamental group of $S^1$ is isomorphic to $\mathbb{Z}$ from the book Basic Topology by Armstrong. There they are defining a map $\pi: \mathbb{R} \to S^1$ by $x \mapsto e^{2\pi i x}$. What bothers me is the following claim :
If $n \in \mathbb{Z}$, then then the restriction of $\pi$ to $(n-\frac{1}{2}, n+\frac{1}{2})$ is a homeomorphism from $(n-\frac{1}{2}, n+\frac{1}{2})$ to $U=S^1 \setminus \{-1\}$. i.e the map $\pi|_{(n-\frac{1}{2}, n+\frac{1}{2})}: (n-\frac{1}{2}, n+\frac{1}{2}) \to U$ is a homeomorphism.
I have proved that this is injective but I can't deal with the surjectivity part and also with the inverse of $\pi|_{(n-\frac{1}{2}, n+\frac{1}{2})}$. My guess is that the inverse will look something like $u \mapsto \frac{1}{2\pi i}\ln{u}$, but I can't handle it rigourously. Any help regarding this problem will be appreciated. Thank you.