Lagrangian mechanics happens to be taught as part of the mechanics course – this can form part of my revision!
The first step is to identify the generalised coordinates of the system. They are, by definition, the least number of coordinates with which you can fully describe the system. We will denote the generalised coordinate by .
In the case of Alan’s cradle car, it would be very sensible to choose the linear displacement of the car and the angle made by the metal balls with the vertical. We will call these and respectively. That is,
For each general coordinates there exists a generalised velocity , defined by
It is important that the least number of coordinates possible is used. The number needed is equal to the number of degrees of freedom the system has. If, for example, we forced the car to move at a constant velocity, would no longer be considered a generalised coordinate.
The Lagrangian of a system is defined by the equation
where and are the system’s kinetic and potential energy respectively. It is hard to see an application for such a quantity – it doesn’t seem to have any kind of intuitive physical meaning. It turns out that if we substitute into the Euler-Lagrange equation, defined by
we can derive equations of motion for the system. Note that we need not consider forces or indeed vectors of any sort. This is the merit of using Lagrangian dynamics – we only need to deal with scalar quantities.
We’ll consolidate this new information by using the cradle car as an example. Let the combined mass of the metal balls be and that of the car be . Let be the length of the string connecting the balls to the frame.
It can be shown that the kinetic and potential energies and are given by
Hence the Lagrangian is given by
in its most expanded form.
Upon substituting these into the Euler-Lagrange equations, we get the two equations
The first comes from differentiation with respect to and the second with the respect to . Careful use of the product and chain rules must be made to arrive at these results – it is surprisingly easy to make mistakes. In this case, we need to solve for first. Eliminating , we arrive at the differential equation
Here, we have made the small-angle approximation that and . Such an assumption is almost always needed to obtain a closed-form solution for pendular motion.
The differential equation above has an elegance to it, and it would be lovely if it had an exact solution. Unfortunately, no such solution seems to exist. The next best approximation is to assume that the motion of the metal balls is fairly slow, in which case the equation
This is the familiar equation for simple harmonic motion, which has solutions of the form
We will arbitrarily choose the initial conditions
That is to say, the metal balls are initially at rest and displaced by a small angle . Our solution to is therefore
We can substitute this expression into either of the equations of motion above to solve for . We will assume that the car starts at the origin and is launched at velocity , so
in which case the expression for is given by
Hence we have derived the motion of the system in the small angle approximation:
The most interesting parameters to vary are and . The following animations show the responses for and respectively:
If the animations have stopped, simply click on them and a refreshed link will appear in a new window.
The perturbation effect of the swinging metal balls becomes increasingly noticeable as their mass increases. In the last case, we see the ‘rowing’ motion, where the velocity of the car changes sign periodically. It is likely that the last animation is inaccurate, as we are beginning to push the assumption that is small.