# Cylindrical - Spherical coordinates

We are given a point in cylindrical coordinates $(r, \theta , z)$ and we want to write it into spherical coordinates $(\rho , \theta , \phi)$.

To do that do we have to write them first into cartesian coordinates and then into spherical using the formulas $\rho=\sqrt{x^2+y^2+z^2}, \ \ \theta=\theta , \ \ \phi=\arccos \left (\frac{z}{\rho}\right )$ ??

Or is there also a direct way??

$\rho = \sqrt{z^2 + r^2}$, $\varphi = \arctan\left(\dfrac rz\right)$, and $\theta = \theta$.

This picture might be useful in figuring out why: • How do we get the formula $$\rho =\sqrt{z^2+r^2}$$ ?? – Mary Star Mar 5 '15 at 21:58
• $r^2 = x^2 + y^2$ – user221317 Mar 5 '15 at 21:58
• I see... Thank you very much!!! :-)  I applied this formula for the point in cylindrical coordinates $\left (1, -\frac{\pi}{6}, 0\right )$. To calculate $\phi$ do we write it as followed?? $$\phi=\arctan \left (\frac{1}{0}\right )$$ Or is there an other way to write it?? Do we say: Since it $\frac{1}{0}$ is not defined and we know that $\tan$ is not defined at $\frac{\pi}{2}$, we conclude that $\phi=\frac{\pi}{2}$. ?? Is the formulation correct?? Could I improve something?? – Mary Star Mar 5 '15 at 22:28

Think about what each coordinate system means. Here are some hints:

You can write $\rho$ and $\phi$ both as functions of $r$ and $z$, and you have $\theta=\theta$.

Clearly, the radius in the spherical system will be related to the length components in the cylindrical system. Observing that $\vec{j} \perp \vec{k}$ as basic vectors the pythagorean theorem tells us $$\rho = \sqrt{ z^2 + r^2},$$ since the radius $r$ refers to the distance in the radial direction of the `cylinder'---which is orthogonal to the $z-$axis. $$\theta = \theta$$ is already pretty direct.

Finally, $\phi$ is the azimuthal angle, so $\frac{r}{z} = tan(\phi) \Rightarrow \phi = \tan^{-1}(\frac{r}{z})$.