Closed and exact forms, and functions $f : \mathbb{R}^2 \setminus \{ 0 \} \to S^1$ I have a simple question on the classic example of a closed form not being exact. It is well-known that the one-form
$$
\omega = \frac{x \mathrm{d}y - y \mathrm{d}x}{x^2 + y^2}
$$
is closed on $\mathbb{R}^2 \setminus \{ 0 \}$ (as can be verified by direct calculation), but is not exact. As a result, integrals of $\omega$ along non-homotopic paths can yield different results.
Of course, in the back of our heads, we know that $\omega$ is at least locally exact: it is the differential of $\arctan (y / x)$. Of course, I accept that this function is not well-defined on all of $\mathbb{R}^2 \setminus \{ 0 \}$; for example, it is clearly not well-defined at $x = 0$. This is closely related to the fact that $\arctan(y/x)$ has a branch cut, and cannot be continuously defined on all of $\mathbb{R}^2 \setminus \{ 0 \}$.
However, consider the following approach: instead of considering functions $f : \mathbb{R}^2 \setminus \{ 0 \} \to \mathbb{R}$, consider instead a function $\varphi : \mathbb{R}^2 \setminus \{ 0 \} \to S^1$, defined by
$$
e^{i \varphi(x,y)} = \frac{x+iy}{\sqrt{x^2 + y^2}}
$$
Here I'm considering $S^1$ as the unit circle in $\mathbb{C}$, for convenience. Clearly $\varphi(x,y)$ is a smooth $S^1$-valued function on all of $\mathbb{R}^2 \setminus \{ 0 \}$. On the other hand, whereas the original target space $\mathbb{R}$ was simply-connected, the new target space $S^1$ is not! As a result, $\varphi$ can "wind" by $2\pi n$ around the origin.
On the other hand, it's not at all clear that $d\varphi = \omega$ in the way I want it to. Indeed, it's not clear to me if one can even define the exterior derivative on a function $\varphi : M \to S^1$ the same way as for a function $f : M \to \mathbb{R}$. I suspect the reason that it 'seems' like it might work with $\varphi$ is because, whereas $\varphi$ is $S^1$-valued, its derivative is $\mathbb{R}$-valued. If I instead had an $S^2$-valued function (i.e., a function $\psi : M \to S^2$), I'm not sure how I'd generalize at all.
So, here is the final question: what is the mathematically precise way to describe the fact that $\omega$ has a well-defined antiderivative $\varphi(x,y)$ on all of $\mathbb{R}^2 / \{ 0 \}$, despite not being exact, by allowing the target space of $\varphi$ to be $S^1$ instead of $\mathbb{R}$?
EDIT: Just to be completely clear, in order to address some of the comments: I am considering here $S^1$ to be the set $\mathbb{R} / \sim$, where $x \sim x + 2\pi n$ for all $n \in \mathbb{Z}$. Then $\varphi : \mathbb{R}^2 \setminus \{ 0 \} \to S^1$, and $e^{i \varphi(x,y)}$ lies on the unit circle in $\mathbb{C}$. As a map between manifolds, $\varphi(x,y)$ is a smooth map; I'm certain that this could be verified by putting down coordinate charts, but it should be plainly obvious by noting that $\varphi$ is just the angular coordinate of the complex variable $z = x+iy$.
 A: I think you are correctly describing. Maybe we don't say that $\varphi$ is an antiderivative, since it is not defined as a $\it{function}$ over the whole space $\mathbb{R}^2 \setminus \{ 0 \}$ (a function is a map to $\mathbb{R}$). Mathematically, to regard your $\varphi$ as a function (at least locally), we need to compose it with local coordinates $\theta$ of $S^1$ in the sense of manifolds, $S^1\supset U\overset{\theta}{\rightarrow} V\subset\mathbb{R}$. These local coordinates are not defined over the whole circle, hence $\theta\circ\varphi$ cannot be seen as a function over $\mathbb{R}^2\setminus \{0\}$ again. For example, the standard angle coordinate $\theta$ on $S^1$ has an ambiguity of 2$\pi\mathbb{Z}$ under monodromy, and so the "function" $\theta\circ\varphi$ is only multi-valued (not a mathematical function). But, this ambiguity vanishes after taking derivative, so $d(\theta\circ \varphi)$ is a well-defined 1-form over the circle, as you observed.
EDIT: The fact that the integral $\int_{S^1} \omega=2\pi\neq 0$ shows that there are no (single-valued, mathematical) function $f$ with $df=\omega$, i.e., $\omega$ is not exact. Please try searching de Rham cohomology for the context. Anyway, in these discussions we exclusively consider functions to $\mathbb{R}$ which is single-valued. Those to $S^1$ or to some covering spaces (multi-valued functions) are, although sometimes called functions in fact, of importance in completely different aspects.
