Applying Lagrangian mechanics

The Lagrangian approach to solving mechanics problems...

  1. Calculate the Lagrangian for a system, by figuring out how to express the total kinetic energy and total potential energy: $${\cal L}(q_1,\dot{q_1},...q_n,\dot{q_n},t)=T-U,$$ in terms of as few generalized coordinates as possible.
  2. Evaluate the Euler-Lagrange equation(s) for each of the generalized coordinates: $$\frac{\del {\cal L}}{\del q_i} = \frac{d}{dt}\frac{\del {\cal L}}{\del \dot{q}_i}.$$
  3. Solve these equations for the $q_i(t)$.

We'll review the Atwood machine, but now using the Lagrangian approach, then examine two examples of more complicated problems.

Atwood machine

With $x$ and $y$ being the positions of two masses, both measured positive down, we have

$y=-x + \text{const}\Rightarrow \dot y = -\dot x$

Neglecting the kinetic energy of the pulley...

$T= \frac{1}{2}m_1 \dot{x}^2 + \frac{1}{2}m_2 \dot{y}^2 = \frac{1}{2}m_1 \dot{x}^2 + \frac{1}{2}m_2 \dot{x}^2 = \frac{1}{2}(m_1 + m_2) \dot{x}^2$

$$U=-m_1 g x -m_2 g y=-m_1 g x +m_2 g x + c o n s t$$ Adding a constant to the potential will not change the physics of the problem, so we'll just throw out the constant in the potential energy.

The Lagrangian is $${\cal L} = T-U = \frac{1}{2}(m_1 + m_2) \dot{x}^2 +m_1 g x -m_2 g x$$

and $\frac{\del {\cal L}}{\del x} = \frac{d}{dt}\frac{\del {\cal L}}{\del \dot{x}}$ becomes $$(m_1 - m_2)g = (m_1+m_2) \ddot{x}$$

Re-arranging for the acceleration $$\frac{m_1 - m_2}{m_1+m_2} g = \ddot{x}$$ The acceleration (left hand side of the equation) is a constant. Call it "$a$". So, the solution, $x(t)$ can be arrived at by integrating twice to get: $$x(t)=v_0 t+\frac 12 a t^2,$$ where $v_0=\dot{x}(0)$.

The point of an Atwood machine is to choose small mass differences to make the acceleration much less than $g$ to make it easier to measure, and then work back to a value for $g$.

Jupyter solution: In SageMath, you can't easily differentiate a function with respect to another function (e.g. $\del \cal{L}/\del \dot x$).

But you can call on the sympy python library in a Jupyter notebook using the Python kernel instead of Sagemath, and carry out the partial derivatives. Here's how...

Double Atwood machine (Problem 27)

The weight on each side of the top pulley is $4mg$. You might think that means that the $4m$ mass would not move if everything is released from rest. But surprisingly, you would be wrong!

At first glance, it appears we might need as many as 4 coordinates to keep track of everything. But it turns out some of the coordinates in the picture are constrained by others. Just 2 are sufficient. We'll express the total kinetic energy and total potential energy in terms of the variables $s$ and $y$.

Start by observing that $s$ and $x$ are not independent. Since the total length of string hanging down from the top pulley is constant (call it $C_1=x+s$), $$s=C_1-x$$ Taking the time derivatives of both sides of this equation $\Rightarrow \dot{s} = - \dot{x}$

So $T_{4m} = \frac{1}{2}4m \dot x^2= \frac{1}{2}4m \dot{s}^2$ $$v_{3m} = \dot{s} + \dot{y}$$

So $T_{3m}=\frac{1}{2}3m(\dot{s} + \dot{y})^2$ $$z=C_2-y \Rightarrow \dot{z} = -\dot{y}$$

Now, figure out $v_m$, calculate $T_m$, the kinetic energy of mass $m$, and then find the total kinetic energy, $T$.

$$v_m = \dot{s} + \dot{z} = \dot{s} - \dot{y}$$

(This also means $a_m=\dot{v}_m=\ddot s - \ddot y$.)

So $$T_m = \frac{1}{2}m(\dot{s} -\dot{y})^2$$

Adding these kinetic energies up together... $$\begineq T=&\frac{1}{2}m(4\dot{s}^2 +3(\dot{s} +\dot{y})^2 + (\dot{s} - \dot{y})^2)\\ =&\frac{1}{2}m(8\dot{s}^2 +4\dot{s}\dot{y} + 4\dot{y}^2)\endeq$$

 

The potential energies are $$U_{4m} = C o n s t + (4m)gs$$ $$U_{3m} = -(3m)g(s+y)$$

Figure out $U_m$ in terms of $s$ and $y$, and add all the potential energy terms together to get the total potential energy, $U$.

Now, you have enough information to be able to write out the Lagrangian, ${\cal L}=T-U$.

$$U_m = -(m)g(s-y) + C o n s t$$

Adding these, the total potential energy turns out to be independent of $s$: $$U=-2mgy + C o n s t$$

The Lagrangian is...

${\cal L} = 2m[2\dot{s}^2 + \dot{s}\dot{y} +\dot{y}^2 +gy] + C o n s t$

 

The Euler-Lagrange equation for $s$ is: $$\frac{\del {\cal L}}{\del s} = \frac{d}{dt}\frac{\del {\cal L}}{\del \dot{s}}$$

Calculate out the partial derivatives called for in the E-L equation for $s$ (above) and the E-L equation for $y$.

This should give you *two* equations that relate two unknown functions $\ddot s$ and $\ddot y$. Use the two equations to eliminate one of the accelerations, and find the acceleration of the $4m$ mass.

Taking the partial derivatives gives

$0 = \frac{d}{dt}\[2m(4\dot{s}+\dot{y})\]$

So $$ -4\ddot{s} = \ddot{y}$$

 

The Euler-Lagrange equation for $y$ is $$\frac{\del {\cal L}}{\del y} = \frac{d}{dt}\frac{\del {\cal L}}{\del \dot{y}}$$

Taking the partial derivatives gives

$2mg = \frac{d}{dt}[2m(\dot{s}+ 2\dot{y}]$

So $$ g=\ddot{s}+2\ddot{y}$$

Substituting in from the earlier relation between $\ddot{s}$ and $\ddot{y}$: $$g= -7\ddot{s}$$

So the acceleration of the $4m$ mass is $a_\text{4m}=+g/7$ despite the fact that there are equal masses on either side of the top pulley.

Bead on a rotating wire

Consider a bead constrained to move on a loop of wire. The loop is rotating about a vertical axis with angular velocity $\omega$. The generalized coordinate for our bead will be the angle $\theta$ away from the bottom of the loop.

Also shown at right is a similar system--a steam engine 'governor'. The height of the balls changes as the shaft rotates, and you can see the mechanical coupling at the top used to control a steam valve.

Kinetic energy - In our non-rotating frame of reference, the speed of the bead has two components at right angles to each other:

  • There is the speed around the loop (tangent to the wire) which is $$v_t = R\dot{\theta}.$$
  • And then, there is the rotation about the the vertical axis of the wire loop, which is given by $$v_\phi=\rho \omega=(R\sin(\theta))\omega.$$

The kinetic energy is $$\begineq T=&\frac{1}{2}mv^2 =\frac{1}{2}m(v_t^2+v_\phi^2)\\ =& \frac{1}{2}m(R^2\dot{\theta}^2 + R^2\sin^2(\theta)\omega^2). \endeq$$

Potential energy - The potential energy is just that due to gravity, which is $U=mgy$, where we'll measure $y$ relative to the bottom of the loop. It can be seen that, in terms of our generalized coordinate $\theta$, this will be $$U=mgy = mgR(1-\cos(\theta)).$$

The Lagrangian is $T-U$: $${\cal L} = \frac{1}{2}m(R^2\dot{\theta}^2 + R^2\sin^2(\theta)\omega^2) - mgR(1-\cos(\theta))$$

The Euler Lagrange equation is: $$ \frac{\del {\cal L}}{\del \theta } = \frac{d}{dt}\frac{\del {\cal L}}{\del \dot{\theta}}$$

Taking the derivatives... $$ mR^2\omega^2\sin \theta \cos \theta -mgR\sin \theta=mR^2\ddot{\theta}.$$

Divide by $mR^2$ to get $$\label{29}\ddot{\theta} = (\omega^2\cos \theta - g/R)\sin \theta$$

Hmmm.... not so obvious what an exact solution to this is! But we can still look for...

Equilibria

Equilibrium points exist where $\ddot{\theta} = 0$. This is a necessary, but not sufficient condition for the speed $\dot{\theta}=0$ to vanish. From the equation above, $\ddot{\theta} =0$ when:

  • $\sin \theta = 0$. No matter what $\omega$ is, this happens at two positions:
    • $\theta=0$ or
    • $\theta=\pi$
  • $\cos \theta = g/(R\omega^2)$
    but $\cos \theta $ cannot be more than 1, so there's no solution like this unless $\omega^2 > g/R$.

Let's graph $\ddot{\theta} $ vs $\theta$ (using Equation [$\ref{29}$]) for a variety of different loop speeds $\omega$: $$\omega = 0$$

There are equilibria at the bottom of the loop ($\theta=0$) and at the top ($\theta=\pi$). If the acceleration to the right of an equilibrium position is negative, the acceleration of the bead is to the left--back towards the equilibrium position. So, the equilibrium at $\theta=0$ is stable, but the one at $\theta=\pi$ is unstable. $$\omega^2 = 0.7*g/r$$

$$\omega^2 = 1.5*g/r$$

There is still an equilibrium point at $\theta=0$ but it is now unstable. The two new ones are stable.

We could graph the stable equilibrium positions as a function of rotation speed $\omega$: for $\omega^2 > g/r$ the solutions are $$\theta_0 = \pm \cos (g/(R\omega^2))$$

which ought to approach $\pm \pi/2$ (gray lines below) for large $\omega$

Homework

Chapter 7: 14, 15, 20, 21, 22

Image credits

Andy Dingley