# How would I convert kinetic energy for one particle in six dimensions (x, y, z, and their time derivatives) from Cartesian to spherical coordinates? Note: dotq = (delq)/(delt), and this is from a 1962 Statistical Mechanics textbook by Norman Davidson.

## In Cartesian, $K = K \left(x , y , z , \frac{\partial x}{\partial t} , \frac{\partial y}{\partial t} , \frac{\partial z}{\partial t}\right)$, and in spherical, $K = K \left(r , \theta , \phi , \frac{\partial r}{\partial t} , \frac{\partial \theta}{\partial t} , \frac{\partial \phi}{\partial t}\right)$. For convenience, we set $\dot{q} = \frac{\partial q}{\partial t}$. Not sure if anyone actually needs this, but this was quite crazy to do, and I'm willing to share how I did it so that if anyone ever needs to do this... they can? There is a lot of nested chain rule and product rule!

Jan 14, 2017

For spherical coordinates (where $\phi$ is on the $x y$-plane and $\theta$ is on the $y z$-plane),

$x = r \sin \theta \cos \phi$,
$y = r \sin \theta \sin \phi$,
$z = r \cos \theta$.

To express $K$ for one particle in terms of $r , \theta , \phi , \dot{r} , \dot{\theta} , \dot{\phi}$, we first begin with:

$K = \frac{1}{2} m \left({\dot{x}}^{2} + {\dot{y}}^{2} + {\dot{z}}^{2}\right)$

Let's focus on $x$, then $y$, then $z$, taking their time derivatives:

$\dot{x} = \frac{\partial x}{\partial t} = r \left(\dot{\theta} \cos \theta \cos \phi - \dot{\phi} \sin \theta \sin \phi\right) + \dot{r} \sin \theta \cos \phi$
$\dot{y} = \frac{\partial y}{\partial t} = r \left(\dot{\phi} \sin \theta \cos \phi + \dot{\theta} \cos \theta \sin \phi\right) + \dot{r} \sin \theta \sin \phi$
$\dot{z} = \frac{\partial z}{\partial t} = - r \dot{\theta} \sin \theta + \dot{r} \cos \theta$

Note that ${\dot{x}}^{2} \ne \frac{{\partial}^{2} x}{\partial {t}^{2}} = \ddot{x}$, but actually, ${\dot{x}}^{2} = {\left(\dot{x}\right)}^{2}$. In comparing two methods of squaring each term vs. integrating $m \dot{q}$ over six coordinates... yeah, I'm going with the first method.

${\dot{x}}^{2} = {\left[r \left(\dot{\theta} \cos \theta \cos \phi - \dot{\phi} \sin \theta \sin \phi\right) + \dot{r} \sin \theta \cos \phi\right]}^{2}$

$= {r}^{2} {\left(\dot{\theta} \cos \theta \cos \phi - \dot{\phi} \sin \theta \sin \phi\right)}^{2} + {\dot{r}}^{2} {\sin}^{2} \theta {\cos}^{2} \phi + 2 r \dot{r} \sin \theta \cos \phi \left(\dot{\theta} \cos \theta \cos \phi - \dot{\phi} \sin \theta \sin \phi\right)$

$= {r}^{2} {\dot{\theta}}^{2} {\cos}^{2} \theta {\cos}^{2} \phi - 2 {r}^{2} \dot{\theta} \dot{\phi} \sin \theta \cos \theta \sin \phi \cos \phi + {r}^{2} {\dot{\phi}}^{2} {\sin}^{2} \theta {\sin}^{2} \phi + {\dot{r}}^{2} {\sin}^{2} \theta {\cos}^{2} \phi + 2 r \dot{r} \dot{\theta} \sin \theta \cos \theta {\cos}^{2} \phi - 2 r \dot{r} \dot{\phi} {\sin}^{2} \theta \sin \phi \cos \phi$

$= \left({r}^{2} {\dot{\theta}}^{2} \cos \theta + 2 r \dot{r} \dot{\theta} \sin \theta\right) \cos \theta {\cos}^{2} \phi - \left(2 {r}^{2} \dot{\theta} \dot{\phi} \sin \theta \cos \theta + 2 r \dot{r} \dot{\phi} {\sin}^{2} \theta\right) \sin \phi \cos \phi + \left({r}^{2} {\dot{\phi}}^{2} {\sin}^{2} \phi + {\dot{r}}^{2} {\cos}^{2} \phi\right) {\sin}^{2} \theta$

Now, we repeat for ${\dot{y}}^{2}$...

${\dot{y}}^{2} = {r}^{2} {\left(\dot{\phi} \sin \theta \cos \phi + \dot{\theta} \cos \theta \sin \phi\right)}^{2} + {\dot{r}}^{2} {\sin}^{2} \theta {\sin}^{2} \phi + 2 r \dot{r} \sin \theta \sin \phi \left(\dot{\phi} \sin \theta \cos \phi + \dot{\theta} \cos \theta \sin \phi\right)$

$= {r}^{2} {\dot{\phi}}^{2} {\sin}^{2} \theta {\cos}^{2} \phi + {r}^{2} {\dot{\theta}}^{2} {\cos}^{2} \theta {\sin}^{2} \phi + 2 {r}^{2} \dot{\theta} \dot{\phi} \sin \theta \cos \theta \sin \phi \cos \phi + {\dot{r}}^{2} {\sin}^{2} \theta {\sin}^{2} \phi + 2 r \dot{r} \dot{\phi} {\sin}^{2} \theta \sin \phi \cos \phi + 2 r \dot{r} \dot{\theta} {\sin}^{2} \phi \sin \theta \cos \theta$

$= \left({r}^{2} {\dot{\theta}}^{2} \cos \theta + 2 r \dot{r} \dot{\theta} \sin \theta\right) \cos \theta {\sin}^{2} \phi + \left(2 {r}^{2} \dot{\theta} \dot{\phi} \sin \theta \cos \theta + 2 r \dot{r} \dot{\phi} {\sin}^{2} \theta\right) \sin \phi \cos \phi + \left({r}^{2} {\dot{\phi}}^{2} {\cos}^{2} \phi + {\dot{r}}^{2} {\sin}^{2} \phi\right) {\sin}^{2} \theta$

There is hope, as some ${\sin}^{2} u + {\cos}^{2} u$ terms will show up once we add ${\dot{x}}^{2}$ and ${\dot{y}}^{2}$. Now, for ${\dot{z}}^{2}$:

${\dot{z}}^{2} = {\left(- r \dot{\theta} \sin \theta + \dot{r} \cos \theta\right)}^{2}$

$= {\dot{r}}^{2} {\cos}^{2} \theta - 2 r \dot{r} \dot{\theta} \cos \theta \sin \theta + {r}^{2} {\dot{\theta}}^{2} {\sin}^{2} \theta$

And now, adding these together gives us $\frac{2 K}{m}$:

$\frac{2 K}{m} = {\dot{x}}^{2} + {\dot{y}}^{2} + {\dot{z}}^{2}$

$= \left({r}^{2} {\dot{\theta}}^{2} \cos \theta + 2 r \dot{r} \dot{\theta} \sin \theta\right) \cos \theta {\cos}^{2} \phi - \cancel{\left(2 {r}^{2} \dot{\theta} \dot{\phi} \sin \theta \cos \theta + 2 r \dot{r} \dot{\phi} {\sin}^{2} \theta\right) \sin \phi \cos \phi} + \left({r}^{2} {\dot{\phi}}^{2} {\sin}^{2} \phi + {\dot{r}}^{2} {\cos}^{2} \phi\right) {\sin}^{2} \theta + \left({r}^{2} {\dot{\theta}}^{2} \cos \theta + 2 r \dot{r} \dot{\theta} \sin \theta\right) \cos \theta {\sin}^{2} \phi + \cancel{\left(2 {r}^{2} \dot{\theta} \dot{\phi} \sin \theta \cos \theta + 2 r \dot{r} \dot{\phi} {\sin}^{2} \theta\right) \sin \phi \cos \phi} + \left({r}^{2} {\dot{\phi}}^{2} {\cos}^{2} \phi + {\dot{r}}^{2} {\sin}^{2} \phi\right) {\sin}^{2} \theta + {\dot{r}}^{2} {\cos}^{2} \theta - 2 r \dot{r} \dot{\theta} \cos \theta \sin \theta + {r}^{2} {\dot{\theta}}^{2} {\sin}^{2} \theta$

Regroup the ${\sin}^{2} \theta$ terms:

$\implies \left({r}^{2} {\dot{\theta}}^{2} \cos \theta + 2 r \dot{r} \dot{\theta} \sin \theta\right) \cos \theta {\cos}^{2} \phi + \left({r}^{2} {\dot{\phi}}^{2} {\sin}^{2} \phi + {\dot{r}}^{2} {\cos}^{2} \phi + {r}^{2} {\dot{\phi}}^{2} {\cos}^{2} \phi + {\dot{r}}^{2} {\sin}^{2} \phi\right) {\sin}^{2} \theta + \left({r}^{2} {\dot{\theta}}^{2} \cos \theta + 2 r \dot{r} \dot{\theta} \sin \theta\right) \cos \theta {\sin}^{2} \phi + {\dot{r}}^{2} {\cos}^{2} \theta - 2 r \dot{r} \dot{\theta} \cos \theta \sin \theta + {r}^{2} {\dot{\theta}}^{2} {\sin}^{2} \theta$

Getting some ${\sin}^{2} u + {\cos}^{2} u$ action going on within the second term, and between the first and third terms! Thus, those reduce to give the factor in front of the ${\sin}^{2} u$ and ${\cos}^{2} u$.

$\implies {r}^{2} {\dot{\theta}}^{2} {\cos}^{2} \theta + 2 r \dot{r} \dot{\theta} \sin \theta \cos \theta + \left({r}^{2} {\dot{\phi}}^{2} + {\dot{r}}^{2}\right) {\sin}^{2} \theta + {\dot{r}}^{2} {\cos}^{2} \theta - 2 r \dot{r} \dot{\theta} \cos \theta \sin \theta + {r}^{2} {\dot{\theta}}^{2} {\sin}^{2} \theta$

And some more happening with the first and last terms, and the third and fourth terms (upon multiplying the ${\sin}^{2} \theta$ through the third term); also, the cross-terms cancel.

$\implies {r}^{2} {\dot{\theta}}^{2} {\sin}^{2} \theta + {r}^{2} {\dot{\theta}}^{2} {\cos}^{2} \theta + \cancel{2 r \dot{r} \dot{\theta} \sin \theta \cos \theta} + {r}^{2} {\dot{\phi}}^{2} {\sin}^{2} \theta + {\dot{r}}^{2} {\sin}^{2} \theta + {\dot{r}}^{2} {\cos}^{2} \theta - \cancel{2 r \dot{r} \dot{\theta} \sin \theta \cos \theta}$

$= {\dot{r}}^{2} + {r}^{2} {\dot{\theta}}^{2} + {r}^{2} {\dot{\phi}}^{2} {\sin}^{2} \theta$

Finally, multiply by $\frac{m}{2}$ to get $K$:

$\textcolor{b l u e}{K = \frac{1}{2} m {\dot{r}}^{2} + \frac{1}{2} m {r}^{2} {\dot{\theta}}^{2} + \frac{1}{2} m {r}^{2} {\dot{\phi}}^{2} {\sin}^{2} \theta}$