Coordinate Systems – How to Convert Cartesian Position and Velocity to Spherical Velocity?

coordinate systemsvectorsvelocity

Let's say that there is a particle with Cartesian coordinates $(x,y,z)=(1, 2, 3)$ and Cartesian velocity $(x', y', z')=(4, 5, 6)$.

Converting the position to spherical coordinates is straightforward:

$$r = \sqrt{x^2+y^2+z^2}
$$

$$\theta = \text{atan2}(y,x)
$$

$$\phi = \text{arccos}(z/r)
$$

(From http://dynref.engr.illinois.edu/rvs.html)

However, velocity eludes me, despite having the equation written in front of me.

From that same reference, $\vec{v} = \dot{r} \hat{e}_r + r\dot{\theta}\text{sin}(\phi)\hat{e}_{\theta}
+ r\dot{\phi}\hat{e}_{\phi}$
.

Hold on…what I want are $\dot{r}$, $\dot{\theta}$, and $\dot{\phi}!$

What would be the way to get the spherical velocity components in terms of Cartesian position and velocity?

Best Answer

In spherical coordinates the velocity is: $$\vec{v} = v_r \hat{e_r} + v_\phi \hat{e_\phi} + v_\theta \hat{e_\theta}$$ which is the same as you write above. Since the unit vectors are orthogonal, to get $v_r$, you take the scalar product $\vec{v}\cdot \hat{e_r} = v_r$

However, the velocity vector is the same vector wether you write it using the spherical coordinates or Cartesian coordinates. In the Cartesian coordinate system, the velocity is given by: $$\vec{v} = v_x \hat{e_x} + v_y \hat{e_y} +v_z \hat{e_z}$$

So you can use the equation above to calculate $v_r$ in terms of the components of the velocity in the Cartesian system

$$v_r = \vec{v}\cdot \hat{e_r} = v_x \hat{e_x}\cdot \hat{e_r} + v_y \hat{e_y}\cdot \hat{e_r} +v_z \hat{e_z}\cdot \hat{e_r}$$

To calculate the scalar products above, it is best to sketch the unit vectors of the spherical system against the basis of the Cartesian unit vectors. You will get, for instance $$\hat{e_r}\cdot\hat{e_x} = \sin\theta\cos\phi$$ and so on for each component.

EDIT (additional clarification):

Sketch method

In the way I wrote above, you could get $\hat{e_r}\cdot\hat{e_x}$ by a sketch with which you could identify the angles. For instance, take the radial unit vector $\hat{e_r}$- it is pointing in the direction of increasing coordinate $r$. Now, you can decompose this unit vector $\hat{e_r}$ into a part in the direction of $\hat{e_z}$, and a part which is spanned by $\hat{e_x}$ and $\hat{e_y}$.

I will write this formally as (keep in mind that we are working with vectors of unit lenght): $$\hat{e_r} = a_1 \hat{e_x} + a_2 \hat{e_y} + a_3 \hat{e_z}$$ To visualize, see the Wikipedia image for the spherical coordinate system

From this sketch, you can see that the length of $\hat{e_r}$ in the direction $\hat{e_z}$ is exactly $\cos\theta$, hence $$a_3 = \hat{e_z}\cdot \hat{e_r} = \cos\theta$$

Now that the $z$ component is sorted out, lets look at the rest. You can view the remaining part $a_1 \hat{e_x} + a_2 \hat{e_y}$ as the orthogonal projection of the vector $\hat{e_r}$ to the $xy$ plane. The length of this projection is $\sin\theta$, so to get the part in the direction of the $x$ axis multiply this length with $\cos\phi$.

Finally, you obtain $$a_1 = \hat{e_r}\cdot\hat{e_x} = \sin\theta\cos\phi$$

and similarly for the component in the $x$ direction $$a_2 = \hat{e_r}\cdot\hat{e_y} = \sin\theta\sin\phi$$

Jacobians

(If I understand OP's comment, the question is why can't we apply the Jacobian matrix to perform the coordinate transformation)

From here down, we use the Einstein convention where repeated indices are summed over. I recommend 1 as a good textbook for a better understanding.

In a more precise definition, a basis for vector fields are the partial derivatives along the coordinate chart axes, so in the Cartesian system we have: $$\hat{e_x} = \frac{\partial}{\partial x}$$ and a vector can be written out as $$V = V^i \frac{\partial}{\partial x^i} = V^1 \frac{\partial}{\partial x^1} + V^2 \frac{\partial}{\partial x^2} + V^3 \frac{\partial}{\partial x^3}$$ and the components $V^1, V^2, V^3$ are the same as in $$ V = V^1\hat{e_x} + V^2\hat{e_y} + V^3\hat{e_z}$$

If we want to change the coordinates, we just use the chain rule:

\begin{equation}V = V^i \frac{\partial}{\partial x^i} = V^i \frac{\partial y^j}{\partial x^i}\frac{\partial}{\partial y^j} \tag{*}\label{one} \end{equation}

So we just read off the components in the new coordinate system $y$ as $$V'^i = V^i \frac{\partial y^j}{\partial x^i}$$ and find inside the inverse of the Jacobian matrix.

However, this method works if in both cases the basis vectors are the partial derivatives against the coordinate variables. For instance, in the case of the polar coordinate system, this is not true, e.g.

$$\hat{e_\phi} \neq \frac{\partial}{\partial_\phi}$$ but $$\hat{e_\phi} = \frac{1}{r} \frac{\partial}{\partial_\phi}$$

so it is not correct to apply the inverse of the Jacobian matrix for calculating new vector components in such a basis (formally known as non-coordinate basis). (See excercise 2.1 in 1) It does not mean that the non-coordinate bases are not useful, only that linear relations such as \ref{one} are not applicable.

1 Bernard Schutz: Geometrical Methods of mathematical physics

Related Question