## FANDOM

850 Pages

The other way to do mechanics, the part that doesn't involve forces and momentum and stuff, is Lagrangians.

Lagrangian mechanics is absolutely crazy, but you'll love it.

The first step is to define your system in terms of a collection of coordinates, and their time derivates. These coordinates depend on whatever's convenient for the system. A particle moving freely in 3D space will typically have these coordinates be x, y, and z. A bob swinging on a pendulum might have one coordinate, θ.

The second step is to calculate the kinetic and potential energies T and U of the system when it is at a certain coordinate. The Lagrangian of the system L is then just T - U.

The third step is to find the motion of the system. This is described by the Euler-Lagrange equation, $\frac{d}{dt} \left\{ \frac{ \partial L}{\partial \dot{q} } \right\} = \frac{ \partial L}{\partial q }$, with q being a coordinate.

## Free Particle

The simplest example of a Lagrangian is a particle moving around freely, under some potential defined at the point (x,y,z) as V(x,y,z). The coordinates used are x, y and z.

The kinetic energy of the particle is $\frac{1}{2} m \vec{v}^2$, as normal, which for this particle is $\frac{1}{2}m \dot{x} + \frac{1}{2}m \dot{y} + \frac{1}{2}m \dot{z}$.

The potential energy was defined above as $V(x,y,z)$. This is just a function in x, y and z, and can be any potential you like.

The Lagrangian is hence $L = \frac{1}{2}m \dot{x} + \frac{1}{2}m \dot{y} + \frac{1}{2}m \dot{z} - V(x,y,z)$.

Now, all that's left is to plug this into the Euler-Lagrange equation, $\frac{d}{dt} \left\{ \frac{ \partial L}{\partial \dot{q} } \right\} = \frac{ \partial L}{\partial q }$. For x, y and z these are

$m \ddot{x} = - \frac{\partial V(x,y,z) }{ x }$

$m \ddot{y} = - \frac{\partial V(x,y,z) }{ y }$

$m \ddot{z} = - \frac{\partial V(x,y,z) }{ z }$

But wait! We know that $V = - \int \vec{F} . d\vec{l}$, which means that these three equations are

$m \ddot{x} = F_x$

$m \ddot{y} = F_y$

$m \ddot{z} = F_z$

It's Newton's law!

## Pendulum

Of course, that's pretty uninspiring. Newton's laws are basic and describe how forces work. They're not too much of an interesting result; anyone could tell you that a particle under an external force follows Newton's laws.

So, let's try something else. Let's do a pendulum, of length l with a bob of mass m. We'll use the generalised coordinates r and θ.

The velocity of the bob of a pendulum is $\dot{r} \hat{r} + r \dot{\theta} \hat{\theta}$, so the kinetic energy is $T = \frac{1}{2} m \dot{r}^2 + \frac{1}{2} m r^2 \dot{\theta}^2$.

The potential energy of the bob is $U = -mgr \cos \theta + V(r)$. The first part is simple: it's just U = mgh, but for the height of the bob above the ground. The second part, V(r), is the tiny potential created by the pendulum stretching infinitesimally.

So, the Lagragian of this system is

$L = T - U = \frac{1}{2} m \dot{r}^2 + \frac{1}{2} m r^2 \dot{\theta}^2 + mgl \cos \theta - V(r)$

Putting this into the Euler-Lagrange equation with θ gives

$mr^2 \ddot{\theta} = - mgr \sin \theta$

Which can be rewritten as

$\ddot{\theta} = -\frac{g}{r} \sin \theta$

For small values of θ, $\sin \theta \approx \theta$, and the pendulum has a fixed length r = l, so

$\ddot{\theta} = -\frac{g}{l} \theta$

This is simple harmonic motion with an angular frequency $\omega = \sqrt{\frac{g}{l}}$, as you expect from a pendulum. Personally, I think that this is a better derivation that using forces.

Putting this into the Euler-Lagrange equation with r gives

$m \ddot{r} = m r \dot{\theta}^2 + mg \cos \theta - \frac{\partial V}{\partial r}$

The derivative of potential with respect to r is the tension in the pendulum rod, so

$m \ddot{r} = m r \dot{\theta}^2 + mg \cos \theta - T$

However, we know that the rod has a fixed length l. This means that $\ddot{r} = 0$ (otherwise the rod would be stretching or shrinking), so

$T = m l \dot{\theta}^2 + mg \cos \theta$

This is the expression for the tension in a pendulum! You can see the terms for the centripetal force, and the force to counteract gravity. Neat!

## Conservation

One cool thing you can do with Lagrangians is find out some conserved quantities.

In Cartesian coordinates, $v = \dot{x} \hat{x} + \dot{y} \hat{y} + \dot{z} \hat{z}$ so $T = \frac{1}{2} m \left( \dot{x}^2 + \dot{y}^2 + \dot{z}^2 \right)$, and hence $L = \frac{1}{2} m \left( \dot{x}^2 + \dot{y}^2 + \dot{z}^2 \right)$ if there are no external forces.

When you put this in the Euler-Lagrange equation, you get $\frac{d}{dt} \left\{ m\dot{x} \right\} = 0$, $\frac{d}{dt} \left\{ m\dot{y} \right\} = 0$, and $\frac{d}{dt} \left\{ m\dot{z} \right\} = 0$, which shows that those three quantities do not change over time. In other words, momentum is conserved!

In cylindrical coordinates, $v = \dot{r} \hat{r} + r \dot{\theta} \hat{\theta} + \dot{z} \hat{z}$. This results in the three conserved quantities $\frac{d}{dt} \left\{ m\dot{r} \right\} = 0$, $\frac{d}{dt} \left\{ mr^2 \dot{\theta} \right\} = 0$, and $\frac{d}{dt} \left\{ m\dot{z} \right\} = 0$, which is conservation of linear momentum and conservation of angular momentum! Cool!

In spherical coordinates, $v = \dot{r} \hat{r} + r \sin \phi \dot{\theta} \hat{\theta} + r \dot{\phi} \hat{\phi}$. This results in the three conserved quantities $\frac{d}{dt} \left\{ m\dot{r} \right\} = 0$, $\frac{d}{dt} \left\{ m r^2 \sin^2 \phi \dot{\theta} \right\} = 0$, and $\frac{d}{dt} \left\{ m r^2 \dot{\phi} \right\} = 0$. Even more conserved quantities, fun for the whole family!