Finding the smooth inverse of a function Problem: The mapping $\phi: S^2 \longrightarrow S^2 $ by $$\phi(x,y,z)=(x\cos z+y\sin z,x\sin z-y \cos z,z)$$ is a diffeomorphism.  Where $S^2$ is a unit sphere in $\mathbb{R}^3$. 
I've already shown that $\phi$ is smooth and bijective. The only thing I can't find is $\phi^{-1}$ that is smooth.
Any help would be much appreciated!

To find $\phi^{-1}$ explicitly, let's define
$$ \begin{align*} a &= x \cos z + y \sin z \\
b &= x \sin z - y \cos z \\
c &= z \end{align*} $$
so that $\phi(x,y,z) = (a,b,c)$ and $\phi^{-1}(a,b,c) = (x,y,z)$. It just remains to write $x,y,z$ in terms of $a,b,c$.
Getting rid of $z$ is obvious:
$$ \begin{align*} a &= x \cos c + y \sin c \\
b &= x \sin c - y \cos c \end{align*} $$
To eliminate $x$, multiply the equations so both include the term $(x \cos c \sin c)$, then subtract:
$$ \begin{align*} a \sin c &= x \cos c \sin c + y \sin^2 c \\
b \cos c &= x \cos c \sin c - y \cos^2 c \\
a \sin c - b \cos c &= y (\sin^2 c + \cos^2 c) = y \end{align*}$$
Similarly eliminating $y$,
$$ \begin{align*} a \cos c &= x \cos^2 c + y \sin c \cos c \\
b \sin c &= x \sin^2 c - y \sin c \cos c \\
a \cos c + b \cos c &= x(\cos^2 c + \sin^2 c) = x \end{align*} $$
So finally,
$$ \phi^{-1}(a,b,c) = (a \cos c + b \sin c, a \sin c - b \cos c, c) $$
Look familiar? It happens that $\phi^{-1} = \phi$. This is because at each fixed value of $z=c$, the relationship between $(x,y)$ and $(a,b)$ describes a reflection of the $\mathbb{R}^2$ plane.
