Show that the given function is a diffeomorphism

If we define $$ g:\mathbb{R}^n \to U,\ g(x)=\frac{x}{\sqrt{1+\|x\|^2}}, $$ then for every $y \in \mathbb{R}^n$ we have \begin{eqnarray} f(g(y))&=&\frac{g(y)}{\sqrt{1-\|g(y)\|^2}}=\left(1-\frac{\|y\|^2}{1+\|y\|^2}\right)^{-1/2}\cdot\frac{y}{\sqrt{1+\|y\|^2}}\\ &=&\sqrt{1+\|y\|^2}\cdot\frac{y}{\sqrt{1+\|y\|^2}}=y. \end{eqnarray} Similarly, for every $x \in U$ we have \begin{eqnarray} g(f(x))&=&\frac{f(x)}{\sqrt{1+\|f(x)\|^2}}=\left(1+\frac{\|x\|^2}{1-\|x\|^2}\right)^{-1/2}\cdot\frac{x}{\sqrt{1-\|x\|^2}}\\ &=&\sqrt{1-\|x\|^2}\cdot\frac{x}{\sqrt{1-\|x\|^2}}=x. \end{eqnarray}

Hence $f$ is bijective, and $f^{-1}=g$.

You can prove that $f$ and $g$ are differentiable, therefore $f$ is a diffeomorphism.