Suppose $Z\sim N(0,1)$ (standard Gaussian) and $f: \mathbb{R} \to \mathbb{R}$ is a differentiable function such that $f(Z)\sim N(0,1)$. My question is whether there exists any such $f$ other than $f(x)=x$ or $f(x) =-x$. I know that there exists counter examples if we only assume continuity of $f$. For example, consider the continuous (non-differentiable) function $$f(x) = \Phi^{-1}(F_{Z^3-Z}(x^3-x)),$$ where $F_{Z^3-Z}(\cdot)$ is the CDF of the random variable $Z^3-Z$. The above function is non-differentiable at $x = \pm\sqrt{1/3}$ and $x= \pm \sqrt{4/3}$.
Although, under **continuity and invertibility** assumption on $f$, I am able to show that $f(x)=x$ for $\forall x\in \mathbb{R}$ or $f(x)=-x$ for $\forall x\in \mathbb{R}$.

If it is true that those are the only functions under the differentiability assumption, can we say similar things in higher dimensions up to orthogonal rotation?

**Edit 1:** An useful fact that could be helpful is:

- It must be true that $ \lim_{x \to \infty} f(x) = \infty, \quad \lim_{x\to -\infty}f(x) = -\infty, $ or the vice-versa.

**Edit 2:** If $f$ is * continuously differentiable* then $f$ must be $x$ or $-x$. Thanks to the comments of @Jukka Kohonen and @zhoraster, as $f^\prime \neq 0$, by continuity of $f^\prime$ we can conclude that $f^\prime>0$ or $f^\prime <0$. Thus, either way $f$ is monotone and the result follows from the following equation: WLOG, assuming $f$ is increasing, we have
$$
\Phi(x) = P(Z\leq x ) = P(f(Z)\leq x) = P(Z\leq f^{-1}(x)) = \Phi(f^{-1}(x)).
$$
This implies $f^{-1}(x)=x$, i.e., $f(x)=x$.

**But the question is still open when we only have differentiability assumption on $f$**.

3more comments