[Math] Lagrangian Mechanics & Derivatives

calculusclassical-mechanicseuler-lagrange-equationmultivariable-calculusspherical coordinates

I don't really know whether to put this in Physics forums since it is relating to Mechanics, or Math since the question is actually about the math being done. Don't criticize me over it.

So for the question: I was doing some review problems on Lagrange's equations, KE+PE, and I found this document.

In the first question's solution, the writer differentiates without explaining the step. They have these:

$$\begin{cases}
x = r \sin(\theta) \cos(\phi)\\[5 pt]
y = r \sin(\theta) \sin(\phi)\\[5 pt]
z = r \cos(\theta)
\end{cases}
$$

and this:

$$T = {m\over 2}(\dot x^2 +\dot y^2 +\dot z^2)$$

I never really studied the spherical coordinate system much, and obviously never thought about the derivatives of the conversion into Cartesian. Can someone find or explain the process of taking the derivatives of the first three equations, plugging into the equation for Kinetic Energy, and simplifying? There is a probably a different calculus method for the coordinate system, which I don't know. Thanks!

EDIT: While doing taking the derivatives, was the method used actually a separate form of calculus beyond I and II, or was it normal first-order differentiation? If so, how? Here is the part I am speaking of:

Solution: The kinetic energy is $T=\frac m2(\dot x^2+\dot y^2+\dot z^2)$. We substitute
$$\begin{cases}
x = r \sin(\theta) \cos(\phi)\\[5 pt]
y = r \sin(\theta) \sin(\phi)\\[5 pt]
z = r \cos(\theta)
\end{cases}
$$

Differentiating these, substituting into $T$, and simplifying, we find
$$T=\frac m2 (\dot r^2 +r^2\dot\theta^2+r^2\sin^2\theta\dot\phi^2).$$

Best Answer

I think this question belongs to PSE! But whatever, here's your answer: you have to remember that $\dot x$ is a complete derivative of $x$ with respect to time. Going to a new representation of $x$ in a new system, like in your case $x(r,\theta,\phi)$ for the spherical coordinates, where, and this is important, all the coordinates are functions of time $$r\equiv r(t)\\ \theta \equiv \theta(t) \\\phi\equiv\phi(t)$$ transforms the complete time derivative in this manner

$$ \dot x = \frac{\partial x}{\partial r}\frac{\mathrm d r}{\mathrm d t}+\frac{\partial x}{\partial \theta}\frac{\mathrm d \theta}{\mathrm d t}+\frac{\partial x}{\partial \phi}\frac{\mathrm d \phi}{\mathrm d t} \\ \dot x = \frac{\partial x}{\partial r}\dot r+\frac{\partial x}{\partial \theta}\dot\theta+\frac{\partial x}{\partial \phi}\dot\phi \\ \dot x = (\sin\theta\cos\phi)\dot r + (r\cos\theta\cos\phi)\dot\theta - (r\sin\theta\sin\phi)\dot\phi $$

where the last equation was evaluated from the definition of $x=r\sin\theta\cos\phi$. Now same goes for the other variables, which get's you

$$ \dot y = (\sin\theta\sin\phi)\dot r+(r\cos\theta\sin\phi)\dot\theta+(r\sin\theta\cos\phi)\dot\phi \\ \dot z = (\cos\theta)\dot r-(r\sin\theta)\dot\theta $$

From this three equations, it's just a manner of squaring them all, summing them and seeing what you get! Tedious work, but is has to be done sometimes:

$$ \dot x^2 =\sin^2\theta\cos^2\phi\dot r^2+r^2\cos^2\theta\cos^2\phi\dot\theta^2 +r^2\sin^2\theta\sin^2\phi\dot\phi^2+\\ +2r\sin\theta\cos\theta\cos\phi^2\dot r\dot\theta\color{blue}{-2r\sin^2\theta\cos\phi\sin\phi\dot r\dot\phi}\color{red}{-2r^2\cos\theta\sin\theta\cos\phi\sin\phi\dot\theta\dot\phi}\\[10 pt] \dot y^2 = \sin^2\theta\sin^2\phi\dot r^2+r^2\cos^2\theta\sin^2\phi\dot\theta^2+r^2\sin^2\theta\cos^2\phi\dot\phi^2+\\+2r\cos\theta\sin\theta\sin^2\phi\dot r\dot\theta \color{blue}{+ 2r\sin^2\theta\cos\phi\sin\phi\dot r\dot\phi }\color{red}{+2r^2\cos\theta\sin\theta\cos\phi\sin\phi\dot\theta\dot\phi}\\[10 pt] \dot z^2 = \cos^2\theta\dot r^2+r^2\sin^2\theta\dot\theta^2-2r\cos\theta\sin\theta\dot r\dot\theta $$

Let's evaluate the sum keeping in mind that the coloured parts, clearly, add up to zero with one another (we'll see that other parts add up to zero but not so easily):

$$\begin{align} (\dot x^2+\dot y^2+\dot z^2) &= \dot r^2 (\sin^2\theta\cos^2\phi+\sin^2\theta\sin^2\phi+\cos^2\theta)\tag1\\ &+{}r^2\dot\theta^2(\cos^2\theta\cos^2\phi+\cos^2\theta\sin^2\phi+\sin^2\theta)\tag2\\ &+{}r^2\dot\phi^2(\sin^2\theta\sin^2\phi+\sin^2\theta\cos^2\phi)\tag3\\ &+{}2r\dot r\dot\theta(\sin\theta\cos\theta\cos^2\phi+\cos\theta\sin\theta\sin^2\phi-\cos\theta\sin\theta)\tag4 \end{align} $$

Now it probably seems all wrong! But, keeping in mind the formula $$\cos^2\theta+\sin^2\theta=1$$ we can do lot's of things:

Formula $(1)$ $$ \color{red}{\sin^2\theta}\cos^2\phi+\color{red}{\sin^2\theta}\sin^2\phi+\cos^2\theta = \color{red}{\sin^2\theta}\underbrace{(\cos^2\phi+\sin^2\phi)}_{\text{is one}}+\color{red}{\cos^2\theta} \\[5 pt] = \sin^2\theta+\cos^2\theta = 1 $$

Formula $(2)$ $$ \color{red}{\cos^2\theta}\cos^2\phi+\color{red}{\cos^2\theta}\sin^2\phi+\sin^2\theta = \cos^2\theta(\cos^2\phi+\sin^2\phi)+\sin^2\theta = \\ =\cos^2\theta+\sin^2\theta = 1 $$

Formula $(3)$ $$ \color{red}{\sin^2\theta}\sin^2\phi+\color{red}{\sin^2\theta}\cos^2\phi= \sin^2\theta(\sin^2\phi+\cos^2\phi)=\sin^2\theta $$

Formula $(4)$ $$ \color{red}{\sin\theta\cos\theta}\cos^2\phi+\color{red}{\cos\theta\sin\theta}\sin^2\phi-\cos\theta\sin\theta = \sin\theta\cos\theta(\cos^2\phi+\sin^2\phi)-\cos\theta\sin\theta = \\ = \sin\theta\cos\theta-\sin\theta\cos\theta=0 $$

Finally, plugging it all back into the sum of the derivatives squared what we get is

$$ (\dot x^2+\dot y^2+\dot z^2) =\dot r^2+r^2\dot\theta^2+r^2\sin^2\theta\dot\phi^2 $$

which is exactly your formula!

Related Question