Are Cartesian and spherical coordinates smoothly compatible? And is the transition map a global diffeomorphism?

Consider the transition from spherical coordinates (r,θ,φ)(r, \theta, \varphi) to Cartesian coordinates (x,y,z)(x, y, z), given by the map
F:(0,∞)×[0,π]×[0,2π)→R3,(r,θ,φ)↦(x,y,z)F:(0,\infty) \times [0, \pi] \times [0, 2 \pi) \to \mathbb R^3,\qquad (r,\theta,\varphi)\mapsto (x,y,z)
where
x=rsinθcosφy=rsinθsinφz=rcosθ\begin{align}
x &= r \sin \theta \cos \varphi \\
y &= r \sin \theta \sin \varphi \\
z &= r \cos \theta
\end{align}
with the inverse relations
r=√x2+y2+z2θ=arccosz√x2+y2+z2=arccoszrφ=angle(y,x)\begin{align}
r&=\sqrt{x^2 + y^2 + z^2} \\
\theta &= \arccos\frac{z}{\sqrt{x^2 + y^2 + z^2}} = \arccos\frac{z}{r} \\
\varphi &= \text{angle}(y,x)
\end{align}
where the function angle:R2∖{0}→[0,2π)\text{angle}:\mathbb R^2\backslash\{0\}\to [0,2\pi) is defined (awkwardly) as
angle(y,x)={arctan(yx)if x>0 and y≥0arctan(yx)+2πif x>0 and y<0arctan(yx)+πif x<0+π2if x=0 and y>0+3π2if x=0 and y<0\begin{align}\label{eq:angle_function} \text{angle}(y,x)= \left\{ \begin{matrix} \arctan(\frac y x) &\text{if } x > 0 \text{ and } y\geq 0\\[2px]
\arctan(\frac y x) +2\pi &\text{if } x > 0 \text{ and } y< 0\\[2px] \arctan(\frac y x) + \pi &\text{if } x < 0 \\[2px] +\frac{\pi}{2} &\text{if } x = 0 \text{ and } y > 0 \\[2px]
+\frac{3 \pi}{2} &\text{if } x = 0 \text{ and } y < 0 \end{matrix}\right. \end{align} The Jacobian matrix of FF is given by JF(r,θ,φ)=[∂x∂r∂x∂θ∂x∂φ∂y∂r∂y∂θ∂y∂φ∂z∂r∂z∂θ∂z∂φ]=[sinθcosφrcosθcosφ−rsinθsinφsinθsinφrcosθsinφrsinθcosφcosθ−rsinθ0]\begin{align} J_{\mathbf F}(r, \theta, \varphi) = \begin{bmatrix} \dfrac{\partial x}{\partial r} & \dfrac{\partial x}{\partial \theta} & \dfrac{\partial x}{\partial \varphi} \\[10px] \dfrac{\partial y}{\partial r} & \dfrac{\partial y}{\partial \theta} & \dfrac{\partial y}{\partial \varphi} \\[10px] \dfrac{\partial z}{\partial r} & \dfrac{\partial z}{\partial \theta} & \dfrac{\partial z}{\partial \varphi}\end{bmatrix} = \begin{bmatrix} \sin \theta \cos \varphi & r \cos \theta \cos \varphi & - r \sin \theta \sin \varphi \\ \sin \theta \sin \varphi & r \cos \theta \sin \varphi & r \sin \theta \cos \varphi \\ \cos \theta & - r \sin \theta & 0 \end{bmatrix} \end{align} which has determinant detJF(r,θ,φ)=r2sinθ\det J_{\mathbf F}(r, \theta, \varphi) = r^2\sin\theta. I have some questions about this map: Is FF a diffeomorphism between its domain and its image \mathbb R\backslash\{0\}\mathbb R\backslash\{0\}? If so, can someone show how to prove this? References to proofs are also appreciated. At least I see that FF is bijective and smooth, but I am not so sure about the inverse, especially the \varphi\varphi part, although intuitively it seems clear. I found that the map is discussed in John Lee's Introduction to Smooth Manifolds on page 167, where he proves that FF (but restricted to 0<\theta<\pi0<\theta<\pi) is a local diffeomorphism. Then he states that FF is also a diffeomorphism whenever the domain is restricted to an open set in \mathbb R^3\mathbb R^3, but I don't see how he comes to that conclusion. Could someone explain this? Moreover, (as I already asked above) does this result als extend to 'my' domain of FF? And finally, I imagine that the fact that FF is an (at least local) diffeomorphism implies that spherical coordinates are smoothly compatible with the standard differentiable structure on \mathbb R\mathbb R, so that a map between manifolds with domain or codomain \mathbb R\mathbb R is smooth w.r.t. Cartesian coordinates if and only if it is smooth w.r.t. spherical coordinates, am I right about this? Am I right about this? Thanks! (Note that in Lee's textbook the roles of \theta\theta and \phi\phi are interchanged.) =================      FF is not a diffeomorphism onto its image; it is not even a local homeomorphism on boundary points of the domain. But if you removed the boundary points by restricting to (0,\infty) \times (0,\pi) \times (0,2\pi)(0,\infty) \times (0,\pi) \times (0,2\pi) then you get a diffeomorphism. – arkeet 2 days ago ================= 1 Answer 1 ================= What you can use here is 1) A smooth map whose differential at pp is an isomorphism is a diffeomorphism in a neighbourhood of pp. 2) An bijective local diffeomorphism is a diffeomorphism. So in particular from the Jacobian determinant you see that FF is a local diffeomorphism at any point for which r\neq 0r\neq 0 and \theta\neq 0, \theta\neq\pi\theta\neq 0, \theta\neq\pi. Therefore with domain (0, \infty)\times(0,\pi)\times(0,2\pi)(0, \infty)\times(0,\pi)\times(0,2\pi) the map FF is a diffeomorphism. To cover the whole sphere you need more than one chart.