Contents
Now that we have seen how the Euler-Lagrange equation is derived, let’s cover a bunch of examples of how we can obtain the equations of motion for a wide variety of systems. However, we must first discuss how to approach systems with multiple degrees of freedom. $\require{physics}$
2.4.1 — Multiple degrees of freedom
So far in our discussion of the principle of stationary action and the Euler-Lagrange equation, we only considered one degree of freedom. What about systems involving multiple degrees of freedom? If our system has $N$ degrees of freedom denoted as $\{q_1,q_2,\ldots,q_N\}$ it turns out there are going to be $N$ distinct Euler-Lagrange equations, one for each degree of freedom. The reason for this stems back to the principle of least action.
For $N$ generalized coordinates $\{q_1,q_2,\ldots,q_N\}$, there are $N$ generalized velocities denoted as $\{\dot q_1, \dot q_2,\ldots, \dot q_N \}$. The Lagrangian is then a function of all these coordinates and velocities $L=L(q_1,\ldots,q_N,\dot q_1,\ldots,\dot q_N, t)$. The action is also a functional of all the $N$ degrees of freedom $S=S[q_1,\ldots,q_N]$. Let’s make our life simpler and go with the notation $\{q_i\}$, $\{\dot q_i\}$, $L(q_i, \dot q_i, t)$, and $S[q_i]$, where the index $i$ ranges from $i=1$ to $i=N$.
We can think of each degree of freedom as its own path, and since all $N$ degrees of freedom are independent from each other (by definition), we can vary each path individually as
\begin{equation}
q_i \rightarrow q_i+ \delta q_i
\end{equation}
We then consider each of these variations separately, one at a time. For each path, we set the corresponding variation of the action equal to zero in the exact same way as we did for the original one-dimensional case.
\begin{equation}
\frac{\delta S}{\delta q_i} = 0 \Longleftrightarrow \pdv{L}{q_i}-\frac{d}{dt}\pdv{L}{\dot q_i} =0
\end{equation}
Therefore, for $N$ degrees of freedom $\{q_i\}$, there are $N$ Euler-Lagrange equations, where each degree of freedom $q_i(t)$ satisfies its corresponding Euler-Lagrange equation:
\begin{equation}
\pdv{L}{q_i}=\frac{d}{dt}\pdv{L}{\dot q_i}
\end{equation}
Just as a note on notation, we may sometimes decide to condense our notation of the multiple Euler-Lagrange equations for a single particle. For a particle in three dimensions (with no constraints), there will be three Euler-Lagrange equations corresponding to the three degrees of freedom $x$, $y$, and $z$. Given that the particle’s coordinate and velocity are given by the vectors $\vb{r}=(x,y,z)$ and $\dot{\vb{r}}=(\dot x,\dot y,\dot z)$, the three Euler-Lagrange equations can be represented as
\begin{equation}
\pdv{L}{\vb{r}}=\frac{d}{dt}\pdv{L}{\dot{\vb{r}}} \quad \longleftrightarrow \quad
\begin{alignedat}{1}
\pdv{L}{x} =& \frac{d}{dt}\pdv{L}{\dot x} \\
\pdv{L}{y} =& \frac{d}{dt}\pdv{L}{\dot y} \\
\pdv{L}{z} =& \frac{d}{dt}\pdv{L}{\dot z}
\end{alignedat}
\end{equation}
Sometimes we can write these three equations in one expression without vector notation:
\begin{equation}
\pdv{L}{r_i}=\frac{d}{dt}\pdv{L}{\dot r_i}
\end{equation}
The term $r_i$ means the $i^\text{th}$ component of the vector $\vb{r}$. The possible values of the index $i$ are $i=1,2,3$, representing the $x$, $y$, and $z$ components. This is the Euler-Lagrange equation in component form. This single expression hides three equations underneath it, one equation for every value of the index $i=1,2,3$.
2.4.2 — Two particles near the Earth
Example 1. Two particles near the Earth. Find the Euler-Lagrange equations for a system consisting of two non-interacting particles, each with mass $m$, near the Earth’s surface. What can you say about the momenta of the particles?
Solution. Since the particles are near Earth’s surface (i.e., we cannot neglect gravity) we will use Cartesian coordinates. Denote the coordinates of particle 1 and 2 as $(x_1,y_1,z_1)$ and $(x_2,y_2,z_2)$, respectively, with the $z$-axis perpendicular to Earth’s surface.
Our first step is to express our Lagrangian $L=T-U$. The kinetic energy $T_1$ and $T_2$ of each particle is given by
\begin{equation}
\begin{alignedat}{1}
T_1 =& \frac{1}{2}m(\dot x_1^2+\dot y_1^2+\dot z_1^2) \\
T_2 =& \frac{1}{2}m(\dot x_2^2+\dot y_2^2+\dot z_2^2)
\end{alignedat}
\end{equation}
The total kinetic energy is the sum of the kinetic energies of each particle $T=T_1+T_2$.
\begin{equation}
T=\frac{1}{2}m(\dot x_1^2+\dot y_1^2+\dot z_1^2) + \frac{1}{2}m(\dot x_2^2+\dot y_2^2+\dot z_2^2)
\end{equation}
The only force acting on the particles is that of gravity, hence each particle has a gravitational potential energy of
\begin{equation}
\begin{alignedat}{1}
U_1 =& mgz_1 \\
U_2 =& mgz_2 \\
\end{alignedat}
\end{equation}
The total potential energy is the sum of the potential energies of each particle $U=U_1+U_2$.
\begin{equation}
U=mgz_1+mgz_2
\end{equation}
Our Lagrangian is therefore
\begin{equation}
L(z_1, z_2, \dot x_1, \dot y_1, \dot z_1, \dot x_2, \dot y_2, \dot z_2)=\frac{1}{2}m(\dot x_1^2+\dot y_1^2+\dot z_1^2+\dot x_2^2+\dot y_2^2+\dot z_2^2) -mg(z_1+z_2)
\end{equation}
There are six degrees of freedom in total: $\{x_1,y_1,z_1,x_2,y_2,z_2\}$. Hence there must be six Euler-Lagrange equations, one for each coordinate.
\begin{equation}
\begin{alignedat}{3}
\pdv{L}{x_1} &= \frac{d}{dt}\pdv{L}{\dot x_1} \quad , \quad
\pdv{L}{y_1} &= \frac{d}{dt}\pdv{L}{\dot y_1} \quad , \quad
\pdv{L}{z_1} &= \frac{d}{dt}\pdv{L}{\dot z_1} \\
\pdv{L}{x_2} &= \frac{d}{dt}\pdv{L}{\dot x_2} \quad , \quad
\pdv{L}{y_2} &= \frac{d}{dt}\pdv{L}{\dot y_2} \quad , \quad
\pdv{L}{z_2} &= \frac{d}{dt}\pdv{L}{\dot z_2}
\end{alignedat}
\end{equation}
The top three equations ($\pdv{L}{\vb{r}_1}=\frac{d}{dt}\pdv{L}{\dot{\vb{r}}_1}$) describe the motion of the first particle, whereas the bottom three equations ($\pdv{L}{\vb{r}_2}=\frac{d}{dt}\pdv{L}{\dot{\vb{r}}_2}$) describe that of the second particle. For the first particle, the equations tell us
\begin{equation}
\begin{alignedat}{1}
\pdv{L}{x_1} &= \frac{d}{dt}\pdv{L}{\dot x_1} \Longleftrightarrow \ddot mx_1 = 0 \\
\pdv{L}{y_1} &= \frac{d}{dt}\pdv{L}{\dot y_1} \Longleftrightarrow \ddot my_1 = 0 \\
\pdv{L}{z_1} &= \frac{d}{dt}\pdv{L}{\dot z_1} \Longleftrightarrow \ddot mx_1 = -mg
\end{alignedat}
\end{equation}
Likewise, for the second particle
\begin{equation}
\begin{alignedat}{1}
\pdv{L}{x_2} &= \frac{d}{dt}\pdv{L}{\dot x_2} \Longleftrightarrow \ddot mx_2 = 0 \\
\pdv{L}{y_2} &= \frac{d}{dt}\pdv{L}{\dot y_2} \Longleftrightarrow \ddot my_2 = 0 \\
\pdv{L}{z_2} &= \frac{d}{dt}\pdv{L}{\dot z_2} \Longleftrightarrow \ddot mx_2 = -mg
\end{alignedat}
\end{equation}
These equations simply tell us that the particles accelerate towards the surface of the Earth without any acceleration in the $x$- and $y$-directions, just as we would expect.
Now about the momenta of the particles, let’s look back at our Lagrangian. Note how the Lagrangian is cyclic in (independent of) the coordinates $x_1$, $y_1$, $x_2$, and $y_2$ (it depends on their velocities, but no the coordinates themselves). So we can automatically conclude that
\begin{equation}
\begin{alignedat}{2}
\pdv{L}{x_1} &= 0 \Longleftrightarrow p_{x_1} =& \pdv{L}{\dot x_1} = m\dot x_1 \quad \text{is constant} \\
\pdv{L}{y_1} &= 0 \Longleftrightarrow p_{y_1} =& \pdv{L}{\dot y_1} = m\dot y_1 \quad \text{is constant} \\
\pdv{L}{x_2} &= 0 \Longleftrightarrow p_{x_2} =& \pdv{L}{\dot x_2} = m\dot x_2 \quad \text{is constant} \\
\pdv{L}{y_2} &= 0 \Longleftrightarrow p_{y_2} =& \pdv{L}{\dot y_2} = m\dot y_2 \quad \text{is constant}
\end{alignedat}
\end{equation}
This is just saying the momenta of the particles in the $x$- and $y$-directions are conserved, which is again what we expect. Note how these four conservation laws are exactly the same as four of the above Euler-Lagrange equations! Since the Lagrangian depends on the coordinates $z_1$ and $z_2$, we can automatically conclude that the conjugate momenta $p_{z_1}$ and $p_{z_2}$ are not conserved. This is because there are forces $F_{z_1} = \pdv{L}{z_1} = -mg$ and $F_{z_2} = \pdv{L}{z_2} = -mg$ acting on both the particles: the force of gravity!
2.4.3 — Simple harmonic oscillator
Example 2. Simple harmonic oscillator. Find the Euler-Lagrange equation for a particle of mass $m$ in one dimension attached to a spring with spring constant $k$ and zero equilibrium length, oscillating horizontally about the origin. What are the conserved quantities?
Solution. This system only has one degree of freedom, which we can denote as $x$ (the horizontal displacement of the particle from the origin). The kinetic energy is given by
\begin{equation}
T = \frac{1}{2}m\dot x^2
\end{equation}
and the spring potential energy is
\begin{equation}
U=\frac{1}{2}m\omega^2x^2
\end{equation}
where $\omega=\sqrt{\frac{k}{m}}$ is the angular frequency of oscillation. The Lagrangian $L=T-U$ is therefore
\begin{equation}
L(x,\dot x) = \frac{1}{2}m\dot x^2-\frac{1}{2}m\omega^2x^2
\end{equation}
The derivatives of the Lagrangian are
\begin{equation}
\pdv{L}{x}=-m\omega^2x
\end{equation}
\begin{equation}
\pdv{L}{\dot x} = m\dot x
\end{equation}
\begin{equation}
\frac{d}{dt}\pdv{L}{\dot x} = m\ddot x
\end{equation}
The Euler-Lagrange equation $\pdv{L}{x}=\frac{d}{dt}\pdv{L}{\dot x}$ becomes
\begin{equation}
-m\omega^2x=m\ddot x
\end{equation}
\begin{equation}
\ddot x + \omega^2x=0
\end{equation}
This is the equation of motion for a simple harmonic oscillator! The Euler-Lagrange equation gave us the equation of motion specific to our system. The next step would be to solve this second-order differential equation for $x(t)$, but that is not our goal for this section.
Lastly, the momentum $p_x=\pdv{L}{\dot x}=m\dot x$ is not conserved since $\pdv{L}{x}=-m\omega^2x \neq 0$. However, the total mechanical energy $E$ is conserved since $\pdv{L}{t}=0$.
2.4.4 — Bead sliding on a bowl
Example 3. Bead sliding on a bowl. Consider a bead of mass $m$ stuck to slide on the inner surface of a hemispherical bowl of radius $R$ under the influence of gravity. What are the conserved quantities? Find the Euler-Lagrange equations for the bead. For the sake of curiosity, if we impose the initial condition $\dot \phi(t=0)=0$, and assume that the bead undergoes small oscillations about the bottom of the bowl, what would the equations of motion reduce to? In this problem, use spherical coordinates but modify it so that the polar angle $\theta$ is measured from the negative $z$-axis instead.
The natural choice of coordinates for this system are spherical coordinates, and for that we will place the hemispherical bowl centered about the $z$-axis but below the $xy$-plane. Knowing that the kinetic energy of the particle is $T=\frac{1}{2}m(\dot x^2+\dot y^2+\dot z^2)$ in Cartesian coordinates, we’ll first express the coordinates $x$, $y$, and $z$ in terms of spherical coordinates $r$, $\theta$, and $\phi$, and then take the derivatives with respect to time.
First, note that the bead is constrained to slide on the inside of the spherical surface of radius $R$. Modifying spherical coordinates so that $\theta$ is measured from the negative $z$-axis does not affect the equations for $x=R\cos(\phi)\sin(\theta)$ and $y=R\sin(\phi)\sin(\theta)$, but it does affect the equation for $z$ by altering it to $z=-R\cos(\theta)$. The transformation from Cartesian to these modified spherical coordinates are then given by
\begin{equation}
\begin{alignedat}{1}
x &= R\cos(\phi)\sin(\theta) \\
y &= R\sin(\phi)\sin(\theta) \\
z &= -R\cos(\theta)
\end{alignedat}
\end{equation}
Differentiating with respect to time gives
\begin{equation}
\begin{alignedat}{1}
\dot x &= R(\dot\theta\cos(\phi)\cos(\theta)-\dot\phi\sin(\phi)\sin(\theta)) \\
\dot y &= R(\dot\phi\cos(\phi)\sin(\theta)+\dot\theta\sin(\phi)\cos(\theta)) \\
\dot z &= R\dot\theta\sin(\theta)
\end{alignedat}
\end{equation}
Taking the square, with the use of some trigonometric identities, we arrive at the kinetic energy of the bead in spherical coordinates
\begin{equation}
T = \frac{1}{2}mR^2(\dot\theta ^2 + \sin^2(\theta)\dot\phi ^2)
\end{equation}
The bead also has gravitational potential energy equal to $U=mgz$ (reference point taken at $z=0$), which is equal to
\begin{equation}
U=-mgR\cos(\theta)
\end{equation}
The Lagrangian $L=T-U$ is therefore
\begin{equation}
L(\phi, \theta, \dot\phi, \dot\theta) = \frac{1}{2}mR^2(\dot\theta ^2 + \sin^2(\theta)\dot\phi ^2) + mgR\cos(\theta)
\end{equation}
Firstly, since $\pdv{L}{t}=0$, we know that the total mechanical energy defined by $E=p_\theta\dot\theta+p_\phi\dot\phi-L$ is conserved.
There will be two Euler-Lagrange equations corresponding to the two degrees of freedom $\phi$ and $\theta$. However, we can easily notice that $\phi$ is a cyclic coordinate (does not explicitly appear in $L$), and hence the momentum $p_\phi=\pdv{L}{\dot\phi}$ is a constant of motion (conserved quantity).
\begin{equation}
p_\phi = \pdv{L}{\dot\phi} = mR^2\sin^2(\theta)\dot\phi = \text{constant}
\end{equation}
What type of momentum is $p_\phi$? It certainly does not match our usual notion of linear momentum $p_\phi \neq m\dot\phi$. This is because $p_\phi = mR^2\sin^2(\theta)\dot\phi$ is the angular momentum of the bead about the $z$-axis! It should be clear now why $p=\pdv{L}{q}$ is called the generalized momentum, since depending on the system, it can capture linear or angular momentum. So the angular momentum of the bead about the $z$-axis is conserved. The equation $\dv{p_\phi}{t}=0$ is exactly the Euler-Lagrange equation $\pdv{L}{\phi} = \dv{}{t}\pdv{L}{\dot\phi}$.
Moving onto $\theta$, it is clearly not a cyclic coordinate, so $p_\theta$ is not conserved. The derivatives of the Lagrangian are
\begin{equation}
\pdv{L}{\theta} = mR^2\sin(\theta)\cos(\theta)\dot\phi ^2-mgR\sin(\theta)
\end{equation}
\begin{equation}
\pdv{L}{\dot\theta} = mR^2\dot\theta
\end{equation}
\begin{equation}
\dv{}{t}\pdv{L}{\dot\theta} = mR^2\ddot\theta
\end{equation}
The Euler-Lagrange equation for $\theta$, $\pdv{L}{\theta} = dv{}{t}\pdv{L}{\dot\theta}$ is (after dividing through by $mR$)
\begin{equation}
R\ddot\theta = R\sin(\theta)\cos(\theta)\dot\phi ^2-g\sin(\theta)
\end{equation}
You may ask, if we were to try to solve the equation for $\theta(t)$, how would we go about it? It looks pretty difficult, especially due to the presence of $\dot\phi$. This is where our constant of motion would come to the rescue. Recall that $p_\phi=mR^2\sin^2(\theta)\dot\phi$ was a constant. We can isolate for $\dot\phi = \frac{p_\phi}{mR^2\sin^2(\theta)}$ and plug it into the equation for $\theta$:
\begin{equation}
\ddot\theta =\frac{p_\phi^2}{m^2R^4}\frac{\cos(\theta)}{\sin^3(\theta)}-\frac{g}{R}\sin(\theta)
\end{equation}
This is still a very hard equation to solve analytically, but at least now it only depends on $\theta$ as we took out the $\phi$ dependence ($p_\phi$ is just a constant).
Lastly, let’s consider the case where the bead undergoes small oscillations about the bottom of the bowl, with the initial condition $\dot\phi(0)=0$. Since $p_\phi=mR^2\sin^2(\theta)\dot\phi$ is a constant, then we can find the value of $p_\phi$ for all time by seeing what it is equal to at time $t=0$. The initial condition $\dot\phi(0)=0$ implies $p_\phi=0$, and thus $p_\phi$ remains equal to zero for all time. Physically, this means that if the bead does not have an initial angular velocity about the $z$-axis, then gravity will not add any angular momentum to the bead about the $z$-axis. Furthermore, the equation for $\theta$ in this case becomes
\begin{equation}
\ddot\theta = -\frac{g}{R}\sin(\theta)
\end{equation}
For small oscillations about the bottom of the bowl (small values of $\theta$), we can take the small-angle approximation $\sin(\theta) \approx \theta$. Rearranging the equation gives
\begin{equation}
\ddot\theta+\frac{g}{R}\theta = 0
\end{equation}
This is the equation of a simple harmonic oscillator with angular frequency $\omega = \sqrt{\frac{g}{R}}$.
2.4.5 — Driven pendulum
Example 4. Driven Pendulum. A particle of mass $m$ is attached to the end of a massless pendulum of length $\ell$. The pendulum is attached to an oscillating block driven by an external force. The oscillation of the block is fixed at $y_0(t)=k\cos(\omega t)$, where $y_0$ is the horizontal displacement of the block from the origin, $k$ is a constant, and $t$ is time. Find the Euler-Lagrange equation for the mass at the end of the pendulum. Is the total energy of the particle conserved? Ignore the dimensions and mass of the oscillating block.
We will first establish the Cartesian coordinates of the particle, and since we are dealing with a pendulum, we will transform into polar coordinates.
As shown by the diagram (coming soon), the oscillating block is driving the $y$ coordinate of the mass on the pendulum. So we have $y=y_0+\ell\sin(\phi)$, where $y_0=k\cos(\omega t)$ is the horizontal coordinate of the oscillating block. We can graphically confirm that the $x$ and $y$ coordinates of the particle are
\begin{equation}
\begin{alignedat}{1}
x &= \ell\cos(\phi) \\
y &= y_0+\ell\sin(\phi) = k\cos(\omega t)+\ell\sin(\phi)
\end{alignedat}
\end{equation}
As always, we will begin with the kinetic energy $T=\frac{1}{2}m(\dot x^2+\dot y^2)$ of the particle.
Differentiating $x$ and $y$ with respect to time gives
\begin{equation}
\begin{alignedat}{1}
\dot x &= -\ell\dot\phi\sin(\phi) \\
\dot y &= -k\omega\sin(\omega t)+\ell\dot\phi\cos(\phi)
\end{alignedat}
\end{equation}
Taking the square of the above quantities and plugging them into $T$, we arrive at
\begin{equation}
T=\frac{1}{2}m(\ell^2\dot\phi^2-2k\ell\omega\dot\phi\sin(\omega t)\cos(\phi)+k^2\omega^2\sin^2(\omega t))
\end{equation}
Next up is the gravitational potential energy of the particle. Taking our reference point to be the horizontal path of the oscillating block, we have $U=-mgx$. The presence of the minus sign is due to the fact that we oriented our $x$-axis downwards. So we have
\begin{equation}
U=-mg\ell\cos(\phi)
\end{equation}
The Lagrangian $L=T-U$ is therefore
\begin{equation}
L(\phi, \dot\phi, t) = \frac{1}{2}m(\ell^2\phi^2-2k\ell\omega\dot\phi\sin(\omega t)\cos(\phi)+k^2\omega^2\sin^2(\omega t))+mg\ell\cos(\phi)
\end{equation}
There will only be one Euler-Lagrange equation since we have one degree of freedom, $\phi$.
\begin{equation}
\pdv{L}{\phi} = mk\ell\omega\dot\phi\sin(\omega t)\sin(\phi)-mg\ell\sin(\phi)
\end{equation}
\begin{equation}
\pdv{L}{\dot\phi} = m\ell^2\dot\phi-mk\ell\omega\sin(\omega t)\cos(\phi)
\end{equation}
\begin{equation}
\dv{}{t}\pdv{L}{\dot\phi} = m\ell^2\ddot\phi-mk\ell\omega^2\cos(\omega t)\cos(\phi)+mk\ell\omega\dot\phi\sin(\omega t)\sin(\phi)
\end{equation}
The Euler-Lagrange equation $\pdv{L}{\phi}=\dv{}{t}\pdv{L}{\dot\phi}$, after cancelling out the common term and dividing through by $m\ell$, simplifies to
\begin{equation}
\ell\ddot\phi = -g\sin(\phi)+k\omega^2\cos(\omega t)\cos(\phi)
\end{equation}
Compare this to the Euler-Lagrange equation of a simple pendulum:
\begin{equation}
\ell\ddot\phi = -g\sin(\phi)
\end{equation}
It is clear that the external oscillating block that is driving the pendulum contributes the term $k\omega^2\cos(\omega t)\cos(\phi)$ to the equation of motion of the pendulum.
Now, is the total energy of the pendulum conserved? Note that time appears explicitly in the Lagrangian, so $\pdv{L}{t}\neq 0$, and therefore $\dv{E}{t}\neq 0$. So the total energy of the pendulum is not conserved. The reason for this is simple, energy is continuously being transferred between the pendulum and the external oscillating block.
2.4.6 — A bead, a spring, and a paraboloid walk into a bar
Example 5. A bead, a spring, and a paraboloid. Consider the surface of a paraboloid with the equation $z=\rho^2$ in cylindrical coordinates. A bead of mass $m$ is stuck to slide along an arm of the paraboloid, while the arm is rotating at a fixed angular frequency of $\dot\phi = \Omega$ about the $z$-axis. The bead is also vertically attached to a spring that is free to slide along the $xy$-plane. The spring is massless and has a spring constant $k=m\omega^2$ and angular frequency $\omega$. Find the Euler-Lagrange equation for the dynamics of the bead. What are the conserved quantities?
There are lots of things happening in this exercise, but it is easier than it looks. Since the paraboloid exhibits cylindrical symmetry, we will work in cylindrical coordinates. The Cartesian coordinates $x$, $y$, and $z$ of the particle are related to cylindrical coordinates through
\begin{equation}
\begin{alignedat}{1}
x &= \rho\cos(\phi) \\
y &= \rho\sin(\phi) \\
z &= z
\end{alignedat}
\end{equation}
Now we can take into account the two constraints imposed by this problem. The particle is constrained to the surface of the paraboloid defined by $z=\rho^2$. This constrains the $z$ coordinate of the particle. Secondly, the polar angle $\phi$ os the particle is constrained by the fact that the particle is stuck on an arm that rotates at fixed angular frequency of $\dot\phi = \Omega$ on the paraboloid. This fixes the coordinate $\phi = \Omega t$. So there really is only one degree of freedom, $\rho$.
\begin{equation}
\begin{alignedat}{1}
x &= \rho\cos(\Omega t) \\
y &= \rho\sin(\Omega t) \\
z &= \rho^2
\end{alignedat}
\end{equation}
Differentiating the above with respect to time gives
\begin{equation}
\begin{alignedat}{1}
x &= \dot\rho\cos(\Omega t)-\Omega\rho\sin(\Omega t) \\
y &= \dot\rho\sin(\Omega t)+\Omega\rho\cos(\Omega t) \\
z &= 2\rho\dot\rho
\end{alignedat}
\end{equation}
Taking the square of these values and plugging them into the kinetic energy $T = \frac{1}{2}m(\dot x^2+\dot y^2+\dot z^2)$ of the particle gives
\begin{equation}
T = \frac{1}{2}m(\dot\rho^2+\Omega^2\rho^2+4\rho^2\dot\rho^2)
\end{equation}
The spring potential energy of the particle $U=\frac{1}{2}m\omega^2z^2$ is
\begin{equation}
U=\frac{1}{2}m\omega^2\rho^4
\end{equation}
The Lagrangian $L=T-U$ becomes
\begin{equation}
L(\rho, \dot\rho) = \frac{1}{2}m(\dot\rho^2+\Omega^2\rho^2+4\rho^2\dot\rho^2)-\frac{1}{2}m\omega^2\rho^4
\end{equation}
There will be one Euler-Lagrange equation for the single degree of freedom, $\rho$.
\begin{equation}
\pdv{L}{\rho} = m\Omega^2\rho+4m\rho\dot\rho^2-2m\omega^2\rho^3
\end{equation}
\begin{equation}
\pdv{L}{\dot\rho} = 4m\rho^2\dot\rho
\end{equation}
\begin{equation}
\dv{}{t}\pdv{L}{\dot\rho} = 8m\rho\dot\rho^2+4m\rho^2\ddot\rho
\end{equation}
The equation of motion $\pdv{L}{\rho}=\dv{}{t}\pdv{L}{\dot\rho}$ (after dividing through by $m\rho$ is
\begin{equation}
4\rho\ddot\rho+4\dot\rho^2 = \Omega^2-2\omega^2\rho^3
\end{equation}
Let’s now discuss if there are any conserved quantities, starting with the angular momentum about the $z$-axis. Since $\dot\phi$ is fixed to be a constant and $\phi$ is not a degree of freedom, we shouldn’t evaluate $\pdv{L}{\dot\phi}$ to find the angular momentum. The angular momentum $p_\phi$ is actually not conserved, and it all has to do with the fact that the rotating arm of the paraboloid acts as an external influence on the particle. For some quantitative intuition, consider the force
\begin{equation}
F_\rho = \pdv{L}{\rho} = m\Omega^2\rho+\text{other terms}
\end{equation}
The first term on the right-hand side is actually a centrifugal force that pushes the particle outwards on the paraboloid. Since $\Omega$ is a constant, as the particle goes outward (increasing $\rho$), the centrifugal force becomes even stronger. As a result, the particle tends to go further away from the $z$-axis while keeping the same angular frequency $\dot\phi=\Omega$, thus increasing its angular momentum. Although the spring acts as a restoring force to bring the particle back toward the $z$-axis, the fact that the angular frequency of the particle is externally driven to have a constant angular frequency $\dot\phi=\Omega$ causes its angular momentum about the $z$-axis to not be conserved.
Likewise, for the same reason (the presence of an external driving force), the total energy $E$ of the particle is also not conserved. We must be careful here though. Can’t we conclude that the Energy $E$ is conserved since $\dv{E}{t}=-\pdv{L}{t}=0$ (time does not appear explicitly in the Lagrangian)? No. Remember that the equality $\dv{E}{t}=-\pdv{L}{t}$ does not hold for systems with rheonomic constraints, which are a class of holonomic constraints in which time appears explicitly. This system does have a rheonomic constraint, $\phi = \Omega t$, and hence $\dv{E}{t}\neq \pdv{L}{t}$. So our conclusion of $E$ not being conserved is not contradictory.
2.4.7 — Double pendulum
Example 6. Double pendulum. So far, we have considered a single pendulum driven by an external oscillator. Let’s take it up a notch and consider a double pendulum. Find the equation(s) of motion for a double pendulum consisting of a rod of length $\ell_1$ with a particle of mass $M$ attached at its end, and a second rod of length $\ell_2$ with a particle of mass $m$ attached at its end. Assume the rods are massless.
Step 1. Choose an appropriate coordinate systemic and establish the degrees of freedom
This is a long problem, so we’re going to split it into various steps as shown. If a single pendulum has a single degree of freedom, it is reasonable to expect that a double pendulum has two degrees of freedom. This is true because there are actually two holonomic constraints in this systemic: the first particle is always constrained to be a distance of $\ell_1$ away from the point of attachment to the ceiling, and the second particle is always constrained to be a distance of $\ell_2$ away from the first particle. A system of two free particles in two dimensions has four degrees of freedom, but as soon as we introduce two mechanical constraints, the total number of degrees of freedom drops down to two. Let’s denote the degrees of freedom as $\phi_1$ and $\phi_2$, where $\phi_1$ is the angle that the first pendulum makes with the vertical relative to its point of attachment to the ceiling, and $\phi_2$ is the angle that the second pendulum makes with the vertical relative to its point of attachment to the first pendulum.
To obtain the kinetic and potential energy of the double pendulum, it is easier to begin with Cartesian coordinates and then transform to polar coordinates. With the origin at the point of attachment to the ceiling, let us orient the $x$-axis vertically downwards and the $y$-axis horizontally across the ceiling. Let the Cartesian coordinates of the two particles be ($x_1$, $y_1$) and ($x_2$, $y_2$), respectively. The transformation of the coordinates ($x_1$, $y_1$) of the first particle to polar coordinates is simple:
\begin{equation}
\begin{alignedat}{1}
x_1 &= \ell_1\cos(\phi_1) \\
y_1 &= \ell_1\sin(\phi_1)
\end{alignedat}
\end{equation}
The polar coordinates of the second particle is a bit more complicated, but it becomes straight forward once we graphically notice that $x_2$ and $y_2$ can be expressed in terms of $x_1$ and $y_1$ as
\begin{equation}
\begin{alignedat}{1}
x_2 &= x_1+\ell_2\cos(\phi_2) \\
y_2 &= y_1+\ell_2\sin(\phi_2)
\end{alignedat}
\end{equation}
Now we can just substitute our polar expressions for $x_1$ and $y_1$ to get
\begin{equation}
\begin{alignedat}{1}
x_2 &= \ell_1\cos(\phi_1)+\ell_2\cos(\phi_2) \\
y_2 &= \ell_1\sin(\phi_1)+\ell_2\sin(\phi_2)
\end{alignedat}
\end{equation}
Step 2. Find the kinetic energy of the system
First, let’s find the kinetic energy of each particle. The kinetic energy of the first particle of mass $M$ in Cartesian coordinates is
\begin{equation}
T_1 = \frac{1}{2}M(\dot x_1^2+\dot y_1^2)
\end{equation}
Since $\ell_1$ is a constant, the time derivatives of $x_1$ and $y_1$, in terms of $\phi_1$, become
\begin{equation}
\begin{alignedat}{1}
\dot x_1 &= -\ell_1\sin(\phi_1)\dot\phi_1 \\
\dot y_1 &= \ell_1\cos(\phi_1)\dot\phi_1
\end{alignedat}
\end{equation}
Taking the square of the above quantities and substituting it into $T_1$, and using the identity $\cos^2(\phi_1)+\sin^2(\phi_1)=1$, gives
\begin{equation}
T_1 = \frac{1}{2}M\ell_1^2\dot\phi_1^2
\end{equation}
Likewise, the kinetic energy of the second particle of mass $m$ is
\begin{equation}
T_2 = \frac{1}{2}m(\dot x_2^2+\dot y_2^2)
\end{equation}
The time derivatives of $x_2$ and $y_2$ in terms of $\phi_1$ and $\phi_2$ are
\begin{equation}
\begin{alignedat}{1}
\dot x_2 &= -\ell_1\sin(\phi_1)\dot\phi_1-\ell_2\sin(\phi_2)\dot\phi_2 \\
\dot y_2 &= \ell_1\cos(\phi_1)\dot\phi_1+\ell_2\cos(\phi_2)\dot\phi_2
\end{alignedat}
\end{equation}
Taking the square and substituting into $T_2$ gives
\begin{equation}
T_2 = \frac{1}{2}m\Big(\ell_1^2\dot\phi_1^2+\ell_2^2+\dot\phi_2^2+2\ell_1\ell_2\dot\phi_1\dot\phi_2(\sin(\phi_1)\sin(\phi_2)+\cos(\phi_1)\cos(\phi_2))\Big)
\end{equation}
Using the trigonometric addition identity $\cos(\phi_1-\phi_2) = \sin(\phi_1)\sin(\phi_2)+\cos(\phi_1)\cos(\phi_2)$ simplifies $T_2$ to
\begin{equation}
T_2 = \frac{1}{2}m\Big(\ell_1^2\dot\phi_1^2+\ell_2^2\dot\phi_2^2\cos(\phi_1-\phi_2)\Big)
\end{equation}
The total kinetic energy $T = T_1+T_2$ of the entire system becomes
\begin{equation}
T = \frac{1}{2}M\ell_1^2\dot\phi_1^2+\frac{1}{2}m\Big(\ell_1^2\dot\phi_1^2+\ell_2^2\dot\phi_2^2+2\ell_1\ell_2\dot\phi_1\dot\phi_2\cos(\phi_1-\phi_2)\Big)
\end{equation}
\begin{equation}
T = \frac{1}{2}(M+m)\ell_1^2\dot\phi_1^2+\frac{1}{2}m\Big(\ell_2^2\dot\phi_2^2+2\ell_1\ell_2\dot\phi_1\dot\phi_2\cos(\phi_1-\phi_2)\Big)
\end{equation}
Step 3. Find the potential energy of the system
Both particles have gravitational potential energy. Since our point of reference is the ceiling, and the $x$-coordinates measure the vertical displacement from the ceiling, the gravitational potential energy for each particle is
\begin{equation}
\begin{alignedat}{1}
U_1 &= -Mgx_1 \\
U_2 &= -mgx_2
\end{alignedat}
\end{equation}
Since we are working in polar coordinates, let’s express $x_1$ and $x_2$ in terms of $\phi_1$ and $\phi_2$ as we did before.
\begin{equation}
\begin{alignedat}{1}
U_1 &= -Mg\ell_1\cos(\phi_1) \\
U_2 &= -mg(\ell_1\cos(\phi_1)+\ell_2\cos(\phi_2))
\end{alignedat}
\end{equation}
The total potential energy of the system $U = U_1+U_2$ becomes
\begin{equation}
U = -Mg\ell_1\cos(\phi_1)-mg(\ell_1\cos(\phi_1)+\ell_2\cos(\phi_2))
\end{equation}
\begin{equation}
U = -(M+m)g\ell_1\cos(\phi_1)-mg\ell_2\cos(\phi_2)
\end{equation}
Step 4. Find the Lagrangian of the system
Now we can finally express our Lagrangian $L=T-U$.
\begin{equation}
L(\phi_1, \phi_2) = \frac{1}{2}(M+m)\ell_1^2\dot\phi_1^2+\frac{1}{2}m\Big(\ell_2^2\dot\phi_2^2+2\ell_1\ell_2\dot\phi_1\dot\phi_2\cos(\phi_1-\phi_2)\Big)+(M+m)g\ell_1\cos(\phi_1)+mg\ell_2\cos(\phi_2)
\end{equation}
That was quite a bit of work. Now onto the Euler-Lagrange equations.
Step 5. Find the equations of motion for the system
There are two degrees of freedom, $\phi_1$ and $\phi_2$, and hence there will be two Euler-Lagrange equations. Let’s find the Euler-Lagrange equation corresponding to $\phi_1$:
\begin{equation}
\pdv{L}{\phi_1} = -m\ell_1\ell_2\dot\phi_1\dot\phi_2\sin(\phi_1-\phi_2)-(M+m)g\ell_1\sin(\phi_1)
\end{equation}
\begin{equation}
\pdv{L}{\dot\phi_1} = (M+m)\ell_1^2\dot\phi_1+m\ell_1\ell_2\dot\phi_2\cos(\phi_1-\phi_2)
\end{equation}
\begin{equation}
\dv{}{t}\pdv{L}{\dot\phi_1} = (M+m)\ell_1^2\ddot\phi_1+m\ell_1\ell_2\ddot\phi_2\cos(\phi_1-\phi_2)-m\ell_1\ell_2\dot\phi_2\sin(\phi_1-\phi_2)(\dot\phi_1-\dot\phi_2)
\end{equation}
The equation of motion $\pdv{L}{\phi_1}=\dv{}{t}\pdv{L}{\dot\phi_1}$, after simplifying a bit and dividing through by $\ell_1$, is therefore
\begin{equation}
(M+m)\ell_1\ddot\phi_1+m\ell_2\ddot\phi_2\cos(\phi_1-\phi_2)+m\ell_2\dot\phi_2^2\sin(\phi_1-\phi_2)+(M+m)g\sin(\phi_1)=0
\end{equation}
Likewise (check for yourself by rearranging and simplifying), the equation of motion $\pdv{L}{\phi_2}=\dv{}{t}\pdv{L}{\phi_2}$ for the second degree of freedom $\phi_2$ is
\begin{equation}
\ell_2\ddot\phi_2+\ell_1\ddot\phi_1\cos(\phi_1-\phi_2)+\ell_1\dot\phi_1^2\sin(\phi_1-\phi_2)+g\sin(\phi_2)=0
\end{equation}
These are two coupled, ordinary, non-linear differential equations, which are very difficult to solve analytically. They are coupled because both $\phi_1(t)$ and $\phi_2(t)$ appear in both equations. In other words, if we want to find out what the first particle is doing by solving for $\phi_1(t)$, we need to know what the second particle is doing. Likewise, if we want to know what the second particle is doing by solving for $\phi_2(t)$, we need to know what the first particle is doing!
If we were to repeat this problem within Newtonian mechanics, it would be much harder since we would have to take into account the force of tension. However, the Lagrangian formalism avoids tension (and other constraint forces in general, like the normal force) and thus makes the setup much easier.
2.4.8 — Charged particle in an electromagnetic field
Example 7. Charged particle in an electromagnetic field. Consider a charged particle with electric charge $q_e$ and mass $m$ in three dimensions interacting with an electric field $\vb{E}$ and magnetic field $\vb{B}$. The electric and magnetic fields are commonly expressed in terms of potentials as $\vb{E} = -\grad\Phi-\pdv{\vb{A}}{t}$, and $\vb{B} = \grad\cross\vb{A}$, where $\Phi(\vb{r}, t)$ is the electric (scalar) potential and $\vb{A}(\vb{r}, t)$ is the magnetic (vector) potential. It turns out that the Lagrangian for the charged particle with position $\vb{r}$ and velocity $\vb{v}$ is
\begin{equation}
L(\vb{r}, \vb{v}, t) = \frac{1}{2}m\vb{v}^2+q_e\vb{v}\cdot\vb{A}-q_e\Phi
\end{equation}
The terms involving $\Phi$ and $\vb{A}$ can be regarded as a generalized potential energy expressed as $U=q_e(\Phi-\vb{v}\cdot\vb{A})$. Note how this is an instance where the potential energy depends on the velocity. The equation of motion of the charged particle is famously given by the Lorentz force:
\begin{equation}
\vb{F} = q_e(\vb{E}+\vb{v}\cross\vb{B})
\end{equation}
Using the Euler-Lagrange equation in component form $\pdv{L}{r_i} = \dv{}{t}\pdv{L}{v_i}$ show that the above Lagrangian reproduces the Lorentz force law.
Component-form solution
This Lagrangian is fairly complicated, filled with dot products and vectors. For such situations, it is most helpful to work in component form. There are three degrees of freedom for the particle in this situation, and hence three Euler-Lagrange equations for each component of the particle’s position. However, we will approach this problem in a way that allows us to manipulate all of the Euler-Lagrange equations for the three degrees of freedom at the same time.
Doing the calculations in terms of components will be made way more convenient if we invoke the Einstein summation convention. This summation convention is incredibly useful, and the earlier we learn it the better. It goes as follows: if we have a vector $\vb{a}$, we can work with its components $a_i$, where the possible values of the index $i$ are $i = 1,2,3$ (representing the $x$, $y$, and $z$ components). The summation convention states that, if we have a dot product $\vb{a}\cdot\vb{a} = a_1^2+a_2^2+a_3^2 = \sum_{i=1}^{i=3}a_ia_i$ we will write it simply as $\vb{a}\cdot\vb{a} = a_ia_i$, where the sum over the repeated index $i$ is implied. The important part is that the index must appear exactly twice within the same term as in $a_ia_i$ in order for the summation to be understood. For cross products like $\vb{a}\cross\vb{b}$ (which are vectors are therefore have components), the summation convention calculates their components as $(\vb{a}\cross\vb{b})_i = \varepsilon_{ijk}a_jb_k$, where $\varepsilon_{ijk}$ is known as the Levi-Civita tensor. Just like how vectors are objects with one index, the Levi-Civita tensor is an object with three indices. Note how there is an implied summation between the components of $\vb{a}$ and the second component of the Levi-Civita tensor, as well as a summation between the components of $\vb{b}$ and the third component of the Levi-Civita tensor. The components of the Levi-Civita tensor take the following values:
\begin{equation}
\varepsilon_{ijk} =
\begin{cases}
\begin{alignedat}{1}
+1, \quad &\text{if}\ i,j,k \ \text{is an even permutation of} \ 1,2,3 \\
-1, \quad &\text{if}\ i,j,k \ \text{is an odd permutation of} \ 1,2,3 \\
0, \quad &\text{if any index is repeated}
\end{alignedat}
\end{cases}
\end{equation}
Let’s begin! First we should express our Lagrangian using component notation. The Lagrangian $L=\frac{1}{2}m\vb{v}\cdot\vb{v}+q_e\vb{v}\cdot\vb{A}-q_e\Phi$ has the dot products $\vb{v}\cdot\vb{v} = v_jv_j$ and $\vb{v}\cdot\vb{A} = v_jA_j$. Note how we can label the idnex $v_iv_i = v_jv_j = v_kv_k$ however we want since it is simply summed over by the Einstein summation convention. For this reason, repeated indices are referred to as dummy indices. The electric potential $\Phi$ is a scalar and therefore does not have components. The Lagrangian in component notation is therefore
\begin{equation}
L = \frac{1}{2}mv_jv_j+q_ev_jA_j-q_e\Phi
\end{equation}
Now lets find the derivatives of the Euler-Lagrange equation in component form.
\begin{equation}
\pdv{L}{r_i} = q_ev_j\pdv{A_j}{r_i}-q_e\pdv{\Phi}{r_i}
\end{equation}
The derivative $\pdv{}{r_i}$ acts on $\vb{A}(\vb{r}, t)$ and $\Phi(\vb{r}, t)$ because they are functions of position. Make sure to keep track of the dummy (summed over) indices and free indices. Continuing on,
\begin{equation}
\pdv{L}{v_i} = \frac{1}{2}m\pdv{}{v_i}\big(v_jv_j\big)+q_e\pdv{v_j}{v_i}A_j
\end{equation}
Note how there are no terms like $\pdv{A_j}{v_i}$ or $\pdv{\Phi}{v_i}$ since the potentials $\vb{A}$ and $\Phi$ are not functions of velocity. Now what does the term $\pdv{v_j}{v_i}$ mean? It intuitively feels similar to $\pdv{v}{v}=1$, but we have to be careful of the indices. Any term like $\pdv{r_j}{r_i}$ or $\pdv{v_j}{v_i}$ is equal to $\pdv{v_j}{v_i} = \delta_{ij}$, where $\delta_{ij}$ is known as the Kronecker delta tensor (yes… another tensor, but this time with only two indices) with the following properties:
\begin{equation}
\delta_{ij} =
\begin{cases}
1, \quad \text{if}\ i=j \\
0, \quad \text{if}\ i\neq j
\end{cases}
\end{equation}
Let’s see if the equality $\pdv{v_j}{v_i} = \delta_{ij}$ is true by checking all the possible values of the indices. When $i = j$, we have terms like $\pdv{v_1}{v_1}=1$ and $\delta_{11}=1$. When $i\neq j$, we have terms like $\pdv{v_2}{v_1}=0$ (different components of velocity are independent of each other) and $\delta_{12}=0$. The order of the indices for the Kronecker delta does not matter, $\delta_{ij}=\delta_{ji}$ (we say that it is symmetric). The Kronecker delta $\delta_{ij}$ has a very useful property when combined with the Einstein summation convention. Consider the term $A_j\delta_{ij}$. Let’s carry out the implicit sum over the dummy index $j$: $A_j\delta_{ij} = A_1\delta_{i1}+A_2\delta_{i2}+A_3\delta_{i3}$. But the free index $i$ may only take on value out of the possible values $i = 1,2,3$, so based on the properties of the Kronecker delta tensor, the only term that survives on the right-hand side is the one where the Kronecker delta has both indices equal to $i$. Hence we have the following useful property that applies to any vector
\begin{equation}
A_j\delta_{ij} = A_i
\end{equation}
Going back to our Lagrangian, the terms simplify to $\pdv{v_j}{v_i}A_j = \delta_{ij}A_j = A_i$ and the term $\pdv{(v_jv_j)}{v_i} = 2v_j\pdv{v_j}{v_i} = 2v_i$ by the product rule and the properties of $\delta_{ij}$.
\begin{equation}
\pdv{L}{v_i} = mv_i+q_eA_i
\end{equation}
Next, taking the time derivative of the above quantity gives
\begin{equation}
\dv{}{t}\pdv{L}{v_i} = ma_i+q_e\dv{A_i}{t}
\end{equation}
where $a_i$ is the (component of ) acceleration. How do we expand $\dv{A_i}{t}$? The key is to recall that $\vb{A}(\vb{r}, t)$ is a function of $\vb{r} = (r_1,r_2,r_3)$ and $t$. The multivariable chain rule using the Einstein summation convention then gives us
\begin{equation}
\dv{A_i}{t} = \pdv{A_i}{r_j}\dv{r_j}{t}+\pdv{A_i}{t}
\end{equation}
where $\dv{r_j}{t}=v_j$ is the (component of) velocity.
\begin{equation}
\dv{}{t}\pdv{L}{v_i} = ma_i+q_e\pdv{A_j}{r_j}v_j+q_e\pdv{A_i}{t}
\end{equation}
Using Newton’s second law $F_i = ma_i$, the Euler-Lagrange equation in component form $\pdv{L}{r_i}=\dv{}{t}\pdv{L}{v_i}$ (after rearranging) becomes
\begin{equation}
F_i = q_e\Big(-\pdv{\Phi}{r_i}-\pdv{A_i}{t}\Big)+q_e\Big(v_j\pdv{A_j}{r_i}-v_j\pdv{A_i}{r_j}\Big)
\end{equation}
We have made major progress. Now we have to show that the above quantity is equal to the Lorentz force $\vb{V}=q_e\vb{E}+q_e\vb{v}\cross\vb{B}$. First, lets consider the electric field $\vb{E} defined as $\vb{E}=-\grad\Phi-\pdv{\vb{A}}{t}$. In component form, the electric field becomes
\begin{equation}
E_i = -\pdv{\Phi}{r_i}-\pdv{A_i}{t}
\end{equation}
But this is exactly the first group of the terms we found above. So we can update our Euler-Lagrange equation to
\begin{equation}
F_i = q_eE_i+q_e\Big(v_j\pdv{A_j}{r_i}-v_j\pdv{A_i}{r_j}\Big)
\end{equation}
Next, consider the term $\vb{v}\cross\vb{B}$. Using the definition $\vb{B}=\curl\vb{A}$ it becomes $\vb{v}\cross(\curl\vb{A})$. We can find the components of this beast using the properties of the Levi-Civita tensor that we mentioned earlier. There are two cross products here, so we have to use the Levi-Civita tensor twice.
\begin{equation}
\Big(\vb{v}\cross(\curl\vb{A})\Big)_i = \varepsilon_{ijk}v_j(\curl\vb{A})_k
\end{equation}
Using $(\curl\vb{A})_k = \varepsilon_{klm}\pdv{}{r_l}A_m$ gives
\begin{equation}
\Big(\vb{v}\cross(\curl\vb{A})\Big)_i = \varepsilon_{ijk}v_j\varepsilon_{klm}\pdv{}{r_l}A_m
\end{equation}
Let’s use the short-hand notation for the components of the spatial derivative $\pdv{}{r_i}\equiv \partial_i$ to clean things up a bit. Rearranging the terms gives
\begin{equation}
\Big(\vb{v}\cross(\curl\vb{A})\Big)_i = \varepsilon_{ijk}\varepsilon_{klm}v_j\partial_lA_m
\end{equation}
Note how there is an implicit sum over the index $k$ for the term $\varepsilon_{ijk}\varepsilon_{klm}$. There is actually a handy identity for such a term to expand it in terms of the Kronecker delta tensor!
\begin{equation}
\varepsilon_{ijk}\varepsilon_{klm} = \delta_{il}\delta_{jm}-\delta_{im}\delta_{jl}
\end{equation}
So we have
\begin{equation}
\Big(\vb{v}\cross(\curl\vb{A})\Big)_i = (\delta_{il}\delta_{jm}-\delta_{im}\delta_{jl})v_j\partial_lA_m
\end{equation}
Expanding the brackets gives
\begin{equation}
\Big(\vb{v}\cross(\curl\vb{A})\Big)_i = \delta_{il}\delta_{jm}v_j\partial_lA_m-\delta_{im}\delta_{jl}v_j\partial_lA_m
\end{equation}
We have to track all the indices to see if there is any term similar to $A_j\delta_{ij}=A_i$ that we found earlier. In the first term, we have $\delta_{il}\partial_l=\partial_i$ and $\delta_{jm}A_m=A_j$. In the second term, we have $\delta_{im}A_m=A_i$ and $\delta_{jl}\partial_l=\partial_j$.
\begin{equation}
\Big(\vb{v}\cross(\curl\vb{A})\Big)_i = v_j\partial_iA_j-v_j\partial_jA_i
\end{equation}
Going back to our old notation $\pdv{}{r_i}\equiv \partial_i$ gives
\begin{equation}
\Big(\vb{v}\cross(\curl\vb{A})\Big)_i = v_j\pdv{A_j}{r_i}-v_j\pdv{A_i}{r_j}
\end{equation}
This is exactly the second term that we found in our Euler-Lagrange equation before! So we can update our Euler-Lagrange equation once again
\begin{equation}
F_i = q_eE_i+q_e\Big(\vb{v}\cross(\curl\vb{A})\Big)_i
\end{equation}
Going back to the magnetic field $\vb{B}=\curl\vb{A}$ gives
\begin{equation}
F_i = q_eE_i+q_e(\vb{v}\cross\vb{B})_i
\end{equation}
This equation written in component form must be valid for every possible value of the index $i=1,2,3$. Hence, we can go back to vector notation to get
\begin{equation}
\vb{F}=q_e(\vb{E}+\vb{v}\cross\vb{B})
\end{equation}
There it is, we did it! We derived the Lorentz force law for a charged particle in an electromagnetic field using our original Lagrangian and the Euler-Lagrange equations.
This exercise we indeed difficult, which is why it was saved for last. However, the ability to perform index manipulations such as these is crucial for theoretical physics. Such calculations pop up all the time in general relativity and quantum field theory. We will also make extensive use of them in the next chapter when discussing Hamiltonian mechanics.