# Lagrangian - Examples

## Generalized Momenta

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

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

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

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

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: $$\frac{dp_k}{dt } = \frac{\partial L}{\partial q_k} = 0$$ 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: $$L = \frac{1}{2}m \left(\dot{r}^2 + r^2 \dot{\theta}^2 \right) - U \left(r,\theta \right)$$

The 2 coordinates required 2 Lagrange Equations

$$\frac{\partial L}{\partial r} = \frac{d}{dt} \frac{\partial L}{\partial \dot{r}}$$

and

$$\frac{\partial L}{\partial \theta} = \frac{d}{dt} \frac{\partial L}{\partial \dot{\theta}}$$

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: $$U_{\textrm{sp}} = \frac{1}{2}k r^2$$ Thus, the Lagrangian becomes: $$L = \frac{1}{2}m \left(\dot{r}^2 + r^2 \dot{\theta}^2 \right) - \frac{1}{2}k r^2$$ This will affect the outcome of the $r$ equation: $$m \left(\ddot{r} - r \dot{\theta}^2 \right) = -kr$$

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

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

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

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: $$\ddot{r} - \frac{p_\theta^2}{m^2 r^3} + \omega_0^2 r = 0$$ where $\omega_0 = \sqrt{k/m}$ as usual.

What does this do for us?

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

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

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

\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.

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

If we expand our $U_\textrm{eff}$ using Taylor: $$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$$

Thus for our mass/spring 2d system:

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

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

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

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

The the rotation frequency is: $$\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$$

So, the rotational frequency is the same as the natural frequency of the spring/mass: $$\omega_\textrm{rot} = \omega_0$$ 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 →

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.