We can define the iterates $f^{n+1}=f\circ f^n$ for a given smooth map $f:X\to X$, where $X$ could be a finite interval, the real line $\mathbb{R}$, or the circle $S^1$, or any general smooth manifold. What about the reverse direction? More precisely, a map $g:X\to X$ is said to be an $n$-th root of $f$ if $g^n=f$. There might be a standard notation for this.

For convenience, let's say $R_n(f)=\{g\in C^\infty(X):g^n=f\}$. The iteration map $g\in C^\infty(X)\to g^n$ is continuous. So the set $R_n(f)$ should be discrete in $C^\infty(X)$.

In the following we may take $n=2$ for certainty.

Question 1. Does there exist a square root for any function $f$? If not, what are the possible obstructions?

Question 2. Suppose there exists one solution. What/when could we say about the uniqueness, finiteness, etc about the solutions?

A trivial example: $X=\mathbb{R}^n$ and $f$ is the identity. Then there are at least two square roots: $g_1(x)=x$ and $g_2(x)=-x$. I am not sure if these are the only two solutions.

**Edit:** see link for the discussion in this special case.

For question 1 in the case when $X$ has nontrivial homology, we can consider the induced action on various homology groups of $X$. In particular, the action $[f]$ must admit a square root matrix.

**Edit:** See link for discussions about the exponential function and a useful link provided there.

1more comment