If $f$ is a uniformly continuous function on a metric vector space, is there a continuous $g$ with $f=e^{{\rm i}g}$? Let $E$ be a metric space and $$S^1:=\{z\in\mathbb C:|z|=1\}.$$ Say that $f\in C^0(E,S^1)$ is inessential if $$f=e^{{\rm i}g}\tag1$$ for some $g\in C^0(E,\mathbb R)$. We can show that

*

*If $f\in C^0(E,S^1)$ with $f(E)\ne S^1$, then $f$ is inessential.

*If $f_i\in C^0(E,S^1)$ with $$f_1(x)\ne-f_2(x)\;\;\;\text{for all }x\in E\tag2$$ and $f_1$ is inessential, then $f_2$ inessential.

In Appendix 2.5 of Treatise on Analysis the following corollary is shown:

If we take a look at the proof, we see that the compactness assumption is not needed as long as $f:E\times[0,1]\to S^1$ is uniformly continuous.
Now, the following is inferred from that corollary:


It seems like the only reason why the closed ball in $\mathbb R^d$ is considered
is that this is a compact metric vector space. Now I wonder, aren't we able to use precisely the same arguments to show that any uniformly continuous function $f:E\to S^1$ on a metric vector space is inessential?

EDIT
It was remarked that this can be solved by some facts about algebraic topology. However, I'm not familiar with algebraic topology. So, I'd really appreciate if someone could provide an elementary answer (maybe imposing suitable assumptions, which are satisfied in the special case of $\mathbb R^d$).
 A: $\newcommand{\R}{\mathbb{R}}$
$\newcommand{\Z}{\mathbb{Z}}$
$\renewcommand{\S}{\mathbb{S}}$
The answer to the main question is no - continuous maps from a compact metric space into $\S^1$ can be essential. See the example:

Example. Let $f \colon \S^1 \to \S^1$ be the identity: $f(z) = z$ for $x \in \S^1$. Then:

*

*$f$ is continuous and $\S^1$ is a compact metric space, so $f$ is uniformly continuous,

*there is no continuous map $g \colon \S^1 \to \R$ such that $f = e^{ig}$.


To see that the second statement is true, assume for the contrary that such a $g$ exists. Consider the continuous function $h \colon \R \to \R$ given by $h(t) = g(e^{it})$. Now for each $t \in \R$ we have
$$ e^{i h(t)} = e^{ig(e^{it})} = f(e^{it}) = e^{it}. $$
As in your Lemma 1, we see that $h(t)-t$ must be a multiple of $2\pi$. In other words, $t \mapsto h(t)-t$ is a continuous function from $\R$ to $2\pi \Z$, and as such has to be constant. Thus, $h(t) = t + 2k\pi$ for some fixed $k \in \Z$.
Coming back to our assumptions, we have $g(e^{it}) = t + 2k\pi$ for every $t \in \R$. But taking $t = 0$ and $t = 2\pi$ leads to a contradiction:
$$ 2k\pi = g(e^{0 \cdot i}) = g(1) = g(e^{2\pi \cdot i}) = (2k+1) \pi. $$

Let us dig a little deeper. You asked:

It seems like the only reason why the closed ball in $\R^d$ is considered is that this is a compact metric vector space. Now I wonder, aren't we able to use precisely the same arguments to show that any uniformly continuous function $f \colon E \to \S^1$ on a metric vector space is inessential?

Now, you already know the answer is no. But you're right that this reasoning is quite general. You should be able to check yourself that it gives us:

Theorem. Assume that the compact metric space $E$ admits a continuous function $r \colon E \times [0,1] \to E$ such that $r(\cdot,1)$ is the identity (i.e., $r(1,x) = x$), while $r(x,0)$ is constant (i.e., $r(0,x)=p$ for some fixed $p \in E$). Then every continuous map $f \colon E \to \S^1$ is inessential.

Such a map $r$ exists for the closed ball $E = \overline{B}^n$ (in fact, the proof of (Ap.2.6) relies on this) but not for the circle $E = \S^1$ (otherwise the example wouldn't work).

Finally, let me remark that there's no escaping from algebraic topology. This is algebraic topology, whether we like it or not. If you want to search for more, some vocabulary may be useful:

*

*A space $E$ is called simply connected if all continuous maps $f \colon E \to \S^1$ are inessential.

*The terms essential and inessential are usually replaced by homotopically nontrivial and homotopically trivial. These can be generalized to all possible target spaces.

*In (Ap.2.5), two maps $f(x,0)$ and $f(x,1)$ as are called homotopic and the map $f$ is called a homotopy.

*The map $g$ is called a lifting of $f$.

*For a general target space $X$ (in place of $\S^1$), one can consider a cover $\tilde{X} \to X$ (in place of $\R \to \S^1$, $t \mapsto e^{it}$) and talk about liftings in this more general context.

*Any space $E$ satisfying the assumptions of the theorem above is called contractible.

Of course, this is just vocabulary, in case you need it. Anyway, I strongly recommend A. Hatcher's brilliant and entertaining book.
A: Maybe I'm missing something, but I don't think that an algebraic topological argument is necessary to obtain the desired claim; at least under a suitable set of assumptions.

Lemma 1 Let $E$ be a metric space and $g_i\in C(E,\mathbb C)$ with $e^{g_1}=e^{g_2}$. Then $$\exists k\in\mathbb Z:g_1-g_2=2k\pi\tag1.$$

The proof easily follows from the continuity assumption and noting that $$e^{z_1}=e^{z_2}\Leftrightarrow\exists k\in\mathbb Z:2k\pi\tag2$$ for all $z_i\in\mathbb C$.

Theorem 2: Let $\mathbb K=\mathbb R$ or $\mathbb K=\mathbb C$, $E$ be a normed $\mathbb K$-vector space, $\tau$ be a vector topology on $E$ such that the closed unit ball $\overline B_1(0)$ around $0$ is $\tau$-compact and $f:E\to\mathbb C\setminus\{0\}$ be $\tau$-continuous and uniformly norm-continuous. Then there is an unique norm-continuous $g:E\to\mathbb C$ with $g(0)=0$ and $e^g=f$.

Fix $r>0$ for the moment. Since $\overline B_r(0)$ is $\tau$-compact and $f$ is $\tau$-continuous, $f(\overline B_r(0))$ is compact and hence (since $0\not\in f(E)$) $$\varepsilon:=\inf_{x\in\overline B_r(0)}|f(x)|>0\tag3.$$ Now, since $f$ is uniformly norm-continuous, there is a $\delta>0$ with $$|f(x)-f(y)|<\frac\varepsilon2\;\;\;\text{for all }x,y\in E\text{ with }\left\|x-y\right\|_E<\delta\tag4.$$ Let $k\in\mathbb N$ and $0=t_0<\cdots<t_k=1$ with $$\max_{1\le i\le k}|t_{i-1}-t_i|<\frac\delta r\tag5.$$ Then $$|f(t_{i-1}x)-f(t_ix)|<\frac\varepsilon2\;\;\;\text{for all }1\le i\le k\text{ and }x\in\overline B_r(0)\tag6.$$ Since $0\not\in f(E)$, this yields $$\left|1-\frac{f(t_ix)}{f(t_{i-1}x)}\right|<\frac\varepsilon{2|f(t_{i-1}x)|}\le\frac12\tag7$$ for all $1\le i\le k$ and $x\in\overline B_r(0)$. Let $\ln$ denote the principal branch of the complex algorithm and $$g(x):=\sum_{i=1}^k\ln\frac{f(t_ix)}{f(t_{i-1}x)}\;\;\;\text{or }x\in\overline B_r(0).$$ By $(7)$, $$\frac{f(t_ix)}{f(t_{i-1}x)}\in B_{\frac12}(1)\subseteq\mathbb C\setminus(-\infty,0]\;\;\;\text{for all }x\in\overline B_r(0)\tag8$$ and hence (since $\ln$ is continuous on $\mathbb C\setminus(-\infty,0]$) we conclude that $g$ is norm-continuous. Moreover, $g(0)=0$ and $$e^{g(x)}=f(x)\;\;\;\text{for all }x\in\overline B_r(0).\tag9$$ By
By Lemma 1, $g$ is unique. Now let's denote this $g$ by $g_r$. Then, by uniqueness, $$g_{r_1}=\left.g_{r_2}\right|_{\overline B_{r_1}(0)}\;\;\;\text{for all }0<r_1\le r_2\tag{10}$$ and hence $$g(x):=g_r(x)\;\;\;\text{for }x\in\overline B_r(0)\text{ and }r>0\tag{11}$$ is a well-defined function on $E$ satisfying the desired properties.
