Lagrangian - Examples

Generalized Momenta

For a simple, free particle, the kinetic Energy is: \begin{equation} T = \frac{1}{2}m\dot{x}^2 \end{equation}

Take the derivative of $L$ w.r.t $\dot{x}$ : \begin{equation} \frac{\partial L}{\partial \dot{x}} = m \dot{x} \end{equation} This looks like momentum.

Thus, for generalized coordinates $q_k$, we can also have a generalized momentum \begin{equation} p_k = \frac{\partial L}{\partial \dot{q}_k} \end{equation}

The Lagrangian equations can then be written as simply; \begin{equation} \frac{d p_k}{dt }= \frac{\partial L}{\partial q_k} \end{equation}

But what if a particular Lagrangian is missing one of the $q_k$ dependencies?

Conservation of ...

In that case, we can quickly see that the generalized momenta of that coordinate doesn't change w.r.t time: \begin{equation} \frac{dp_k}{dt } = \frac{\partial L}{\partial q_k} = 0 \end{equation} Which implies that that particular generalized momentum is a conserved quantity!

(Such a coordinate is called cyclic or ignorable)

2d with central force

The Lagrangian for a particle confined to a plane with a central force was: \begin{equation} L = \frac{1}{2}m \left(\dot{r}^2 + r^2 \dot{\theta}^2 \right) - U \left(r,\theta \right) \end{equation}

The 2 coordinates required 2 Lagrange Equations

\begin{equation} \frac{\partial L}{\partial r} = \frac{d}{dt} \frac{\partial L}{\partial \dot{r}} \end{equation}


\begin{equation} \frac{\partial L}{\partial \theta} = \frac{d}{dt} \frac{\partial L}{\partial \dot{\theta}} \end{equation}

Evaluating these results in two acceleration terms: $a_r$, and $a_\theta$ $$ \begin{align} a_r & = \ddot{r}-r\dot{\theta}^2 \\ a_\theta & = r \ddot{\theta} + 2 \dot{r}\dot{\theta} \end{align} $$

Central Force, with a Spring

Let's put a specific force in there. How about a spring? The potential of the spring is easy to write: \begin{equation} U_{\textrm{sp}} = \frac{1}{2}k r^2 \end{equation} Thus, the Lagrangian becomes: \begin{equation} L = \frac{1}{2}m \left(\dot{r}^2 + r^2 \dot{\theta}^2 \right) - \frac{1}{2}k r^2 \end{equation} This will affect the outcome of the $r$ equation: \begin{equation} m \left(\ddot{r} - r \dot{\theta}^2 \right) = -kr \end{equation}

The momentum in the $\theta$ coordinate \begin{equation} p_\theta = \frac{\partial L }{\partial \dot{\theta}} = m r^2 \dot{\theta} \end{equation} (Which is really just the angular momentum)

But, because $\theta$ is a cyclic coordinate, then we know that angular momentum is conserved.

\begin{equation} \frac{d p_\theta}{d t} = \frac{\partial L}{\partial \theta} = 0 \end{equation} therefore: \begin{equation} p_\theta = \textrm{constant} \end{equation}

Solving these two equation simulataneously (i.e. eliminating $\dot{\theta}$) \begin{align} m \left(\ddot{r} - r \dot{\theta}^2 \right) & = -kr \\ p_\theta & = m r^2 \dot{\theta} \end{align} leads to: \begin{equation} \ddot{r} - \frac{p_\theta^2}{m^2 r^3} + \omega_0^2 r = 0 \end{equation} where $\omega_0 = \sqrt{k/m}$ as usual.

What does this do for us?

\begin{equation} m\ddot{r} = \underbrace{\frac{p_\theta^2}{m r^3} - m\omega_0^2 r }_{\textrm{position only!}} \end{equation}

Normally, contributions that are position dependent only, can considered as some sort of potential.

Thus, we can introduce an effective potential: $U_\textrm{eff}$ \begin{equation} \frac{p_\theta^2}{m r^3} - m\omega_0^2 r \equiv -\frac{d U_\textrm{eff}}{dr} = F(r) \end{equation}

\begin{align} U_\textrm{eff}(r) & = - \int^r F(r) dr = -\int^r \left( \frac{p_\theta^2}{m r^3} - m\omega_0^2 r \right) dr\\ & = \frac{p_\theta^2}{2 m r^2} + \frac{1}{2}k r^2 \end{align}

The second term is recognizable as the potential from the spring, but the first term is really a bit of the kinetic energy that only depends on position. We lump those two together and call it an effective potential.

$U_\textrm{eff}$ plots for different $k$ values.

Plots of $$ U_\textrm{eff}(r) = \frac{p_\theta^2}{2 m r^2} + \frac{1}{2}k r^2 $$ for different $k$ values.

What does it mean when $\frac{d U}{d r} = 0$?

Oscillations around equilibrium

An effective potential with an stable equilibrium point.

If we expand our $U_\textrm{eff}$ using Taylor: \begin{equation} U_\textrm{eff}(q) = U_\textrm{eff}(q_0) + \left.\frac{dU_\textrm{eff}}{dq}\right|_{q_0}+ \frac{1}{2!}\left.\frac{d^2 U_\textrm{eff} }{dq^2}\right|_{q_0}(q-q_0)^2 + \cdots \end{equation}

Thus for our mass/spring 2d system:

\begin{equation} U_\textrm{eff} = \frac{p_\theta^2}{2 m r^2} + \frac{1}{2}k r^2 \end{equation}

Thus, our frequency about the equilibrium position is: \begin{equation} \omega = \sqrt{\frac{U_\textrm{eff}''(r_0)}{m}} = \sqrt{\frac{4k}{m}} = 2 \omega_0 \end{equation}

Now, compare to rotational frequency: \begin{equation} \omega_\textrm{rot} = \frac{v_\theta}{r_0} = \frac{p_\theta / mr_0}{r_0} = \frac{p_\theta}{m r_0^2} \end{equation}

Use the equilibrium radius: \begin{equation} r_0 = \left( \frac{p_\theta^2}{mk} \right)^{(1/4)} \end{equation}

The the rotation frequency is: \begin{equation} \omega_\textrm{rot} = \frac{p_\theta}{mr_0^2} = \frac{p_\theta}{\sqrt{\frac{m p_\theta^2}{k}}} = \sqrt{\frac{k}{m}} = \omega_0 \end{equation}

So, the rotational frequency is the same as the natural frequency of the spring/mass: \begin{equation} \omega_\textrm{rot} = \omega_0 \end{equation} Therefore the radial oscillations are twice that of the rotational frequency, which implies that the orbits are closed, meaning it will return to the starting point after each rotation.

2d spring Simulation

More Examples

Bead on a hoop →

Bead constrained to a loop

A bead with mass $m$ is constrained to a circular hoop that rotates around the vertical axis with speed $\dot{\phi} = \omega $. The bead's position is described by the angle $\theta$. Describe this system by solving the Lagrangian and noting any interesting aspects, i.e. equilibriums.