## Saturday, 20 September 2008

### Lagrangian Mechanics: From the Euler-Lagrange Equation to Simple Harmonic Motion

I already wrote about obtaining Newton's Laws from the Principle of Least Action. Now I'm going to analyse a simple mass-spring system; effectively just a case of substituting in a suitable potential for the spring.

Let us go through all of the steps, once more. We'll choose our coordinate x to be the displacement from the equilibrium length of the spring, as shown on the diagram. The kinetic energy of the moving mass is then just
T=\frac{m\dot{x}^2}{2}
. The potential of a spring stretched (or compressed) x metres from its equilibrium length is given by
V=\frac{kx^2}{2}
, where k is the spring constant (N m^-1).

So, for our mass-spring system, the Lagrangian is
L = \frac{1}{2}\left(m\dot{x}^2 - kx^2\right)}

Applying the Euler-Lagrange equation, we obtain
\begin{multiline*}-kx - \frac{d}{dt}\left(m\dot{x}\right) = 0 \\\Rightarrow \ddot{x} - \frac{k}{m}x = 0\end{multiline*}

Comparing the last line above with the general form of Simple Harmonic Motion (SHM),
\ddot{q} - \omega^2 q = 0
we can see that the equation of motion rendered by applying the Euler-Lagrange equation to the Lagrangian of a mass-spring system provides Simple Harmonic Motion with a frequency
\omega = \sqrt{\frac{k}{m}}

This is as expected for the case of a mass-spring system!

1. It is interesting to notice how different approaches imply different assumptions: when treating the mass-spring system in a Newtonian framework, you start by Hooke's Law of elasticity, while here you have to make up' a potential energy term.
So imagine, for a moment, that you knew nothing about Newton's Second Law and forces, but had only ever used the Euler-Lagrange equation to solve problems in mechanics. Then, at least until you discovered' how to derive Newton's Second Law from the Euler-Lagrange equation, you wouldn't be able to solve the simple spring-mass system unless you made up' a potential energy term. But if you know nothing about forces, then clearly you don't know about the relationship between a force and a potential, so even if you knew that x'' = -kx for a spring (notice I am not mentioning forces) there would be no way to obtain a potential term, and you would have to look somewhere else!