Lagrangian Bead

On a track that follows the contour r = θ r = \theta , a bead of mass 1 kg 1 \text{ kg} begins at position θ = 9 π 2 \theta = \frac{9 \pi}{2} . How long in seconds does it take for the bead to roll back around to a height of 9 π 2 \frac{9 \pi}{2} ? In this universe, g = 1 m s 2 g = 1 \frac{\text{m}}{\text{s}^2} , and there is no friction between the bead and the track.


The answer is 59.1132.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Michael Lee
Jan 26, 2014

From the Euler-Lagrange equations, d d t ( L q ˙ j ) = L q j \frac{\text{d}}{\text{d}t} \left(\frac{\partial L}{\partial {\dot{q}}_{j}}\right) = \frac{\partial L}{\partial q_j} , where L = T U L = T - U is the Lagrangian, or the kinetic energy of the system minus the potential energy. For this system, the kinetic energy is T = 1 2 m ( x ˙ 2 + y ˙ 2 ) = 1 2 m ( ( d d t ( r cos θ ) ) 2 + ( d d t ( r sin θ ) ) 2 ) T = \frac{1}{2} m \left(\dot{x}^2 + \dot{y}^2\right) = \frac{1}{2} m \left(\left(\frac{\text{d}}{\text{d}t} \left(r \cos{\theta}\right)\right)^2 + \left(\frac{\text{d}}{\text{d}t} \left(r \sin{\theta}\right)\right)^2\right) . For r = θ r = \theta and θ \theta dependent on time, this becomes T = 1 2 m ( ( θ ˙ sin θ + θ θ ˙ cos θ ) 2 + ( θ ˙ cos θ θ θ ˙ sin θ ) 2 ) = 1 2 m ( 1 + θ 2 ) θ ˙ 2 T = \frac{1}{2} m \left(\left(\dot{\theta} \sin{\theta} + \theta \dot{\theta} \cos{\theta}\right)^2 + \left(\dot{\theta} \cos{\theta} - \theta \dot{\theta} \sin{\theta}\right)^2\right) = \frac{1}{2} m (1 + \theta^2) \dot{\theta}^2 . The potential energy is U = m g y = m g r sin θ = m g θ sin θ U = m g y = m g r \sin{\theta} = m g \theta \sin{\theta} . Thus, the Lagrangian is L = 1 2 m ( 1 + θ 2 ) θ ˙ 2 m g θ sin θ L = \frac{1}{2} m (1 + \theta^2) \dot{\theta}^2 - m g \theta \sin{\theta} . Then, by the Euler-Lagrange equations, d d t ( L θ ˙ ) = L θ \frac{\text{d}}{\text{d}t} \left(\frac{\partial L}{\partial {\dot{\theta}}}\right) = \frac{\partial L}{\partial \theta} \Rightarrow

m ( θ 2 θ ¨ + θ ¨ + θ θ ˙ 2 + g θ cos θ + g sin θ ) = 0 m \left(\theta^2 \ddot{\theta} + \ddot{\theta} + \theta \dot{\theta}^2 + g \theta \cos{\theta} + g \sin{\theta}\right) = 0 .

The bead starts at rest at θ = 9 π 2 \theta = \frac{9 \pi}{2} , from which it rolls around the track to θ = 9 π 2 \theta = -\frac{9 \pi}{2} before rolling back, as this is the point at which its kinetic energy is all converted back into potential. Using numerical computer approximations with these initial conditions, the solution of θ = 9 π 2 \theta = - \frac{9 \pi}{2} gives t = 59.1132 s t = \boxed{59.1132 \text{s}} .

Do you know of a solution without the use of Lagrange equations?

Thanks!

Pranav Arora - 7 years, 4 months ago

Log in to reply

Of course! Any problem that can be formulated in Lagrangian mechanics can be formulated in Newtonian mechanics and vice versa. In this particular case, we can think about the bead as being at the end of a string of changing length, rotating around a fixed axis. As the bead follows the track r = θ r = \theta , its acceleration is always given by r ¨ = ( r ¨ r θ ¨ ) r ^ + ( r θ ¨ + 2 r ˙ θ ˙ ) θ ^ r ¨ = ( θ ¨ θ θ ˙ 2 ) r ^ + ( 2 θ ˙ 2 + θ θ ¨ ) θ ^ \ddot{\mathbf{r}} = (\ddot{r} - r \ddot{\theta}) \hat{r} + (r \ddot{\theta} + 2 \dot{r} \dot{\theta}) \hat{\theta} \Rightarrow \ddot{\mathbf{r}} = (\ddot{\theta} - \theta \dot{\theta}^2) \hat{r} + (2 \dot{\theta}^2 + \theta \ddot{\theta}) \hat{\theta} . This is equal to the sum of the forces on the bead, which include a gravitational force F g = m g y ^ = m g sin θ r ^ + m g cos θ θ ^ \mathbf{F_g} = -m g \hat{y} = -m g \sin{\theta} \hat{r} + m g \cos{\theta} \hat{\theta} and a normal force (which can be found by considering the constraint equation for the track)

Of course, it's not exactly a cakewalk to figure out what that normal force is, so it's actually easier to take the problem and reduce it to one dimension in which the bead can travel, but where its vertical acceleration is limited by g m ( θ cot ( θ ) + 1 ) θ 2 + θ 2 cot 2 ( θ ) + 2 θ cot ( θ ) + 1 -\frac{g m (\theta \cot (\theta )+1)}{\sqrt{\theta ^2+\theta ^2 \cot ^2(\theta )+2 \theta \cot (\theta )+1}} , which is the gravitational force multiplied by the vertical component of the tangent vector to the track for a given θ \theta . That vertical acceleration is equal to d 2 d t 2 ( θ sin θ ) = ( 2 cos θ θ sin θ ) θ ˙ 2 + ( sin θ + θ cos θ ) θ ¨ \frac{\text{d}^2}{\text{d}t^2} (\theta \sin{\theta}) = (2 \cos{\theta} - \theta \sin{\theta}) \dot{\theta}^2 + (\sin{\theta} + \theta \cos{\theta}) \ddot{\theta} . I wrote this up fairly quickly, so there may be a mistake in the math somewhere, but it should only really serve to demonstrate that the problem is orders of magnitude easier when formulated in Lagrangian mechanics, which doesn't even require a full background, so much as a single use of the Lagrange equations of the second kind.

Michael Lee - 7 years, 4 months ago

Log in to reply

Ick, looking back at that, the vertical velocity is really constrained by the tangent vector to the track instead of the acceleration.

Michael Lee - 7 years, 4 months ago
Jack Ceroni
Mar 19, 2020

The Lagrangian in polar coordinates, for this particular scenario, is given by:

L = 1 2 m R 2 θ ˙ 2 + 1 2 m R ˙ 2 m g R sin θ = 1 2 m θ 2 θ ˙ 2 + 1 2 m θ ˙ 2 m g θ sin θ \mathcal{L} \ = \ \frac{1}{2} mR^2 \dot{\theta}^2 \ + \ \frac{1}{2} m\dot{R}^2 \ - \ mg R \sin \theta \ = \ \frac{1}{2} m \theta^2 \dot{\theta}^2 \ + \ \frac{1}{2} m\dot{\theta}^2 \ - \ mg \theta \sin \theta

The second equation comes from the fact that we. are constrained to R = θ R \ = \ \theta . We can plug this into the Euler-Lagrange equation to find the equation of motion for θ \theta (this allows us to in turn find R R at any given time as well):

d d t [ L θ ˙ ] = L θ d d t [ m θ 2 θ ˙ + m θ ˙ ] = 2 m θ θ ˙ 2 + m θ 2 θ ¨ + m θ ¨ = m θ θ ˙ 2 m g sin θ m g θ cos θ \frac{d}{dt} \Big[ \frac{\partial \mathcal{L}}{\partial \dot{\theta}} \Big] \ = \ \frac{\partial \mathcal{L}}{\partial \theta} \ \Rightarrow \ \frac{d}{dt} \Big[ m\theta^2 \dot{\theta} \ + \ m\dot{\theta} \Big] \ = \ 2m\theta \dot{\theta}^2 \ + \ m\theta^2 \ddot{\theta} \ + \ m\ddot{\theta} \ = \ m \theta \dot{\theta}^2 \ - \ mg \sin \theta \ - \ mg \theta \cos \theta θ θ ˙ 2 + θ ¨ ( θ 2 + 1 ) = g sin θ g θ cos θ \Rightarrow \ \theta \dot{\theta}^2 \ + \ \ddot{\theta} (\theta^2 \ + \ 1) \ = -g \sin \theta \ - \ g \theta \cos \theta

For this problem, we are operating in a universe where g = 1 g \ = \ 1 , so we can simplify and rearrange to get:

θ ¨ = 1 θ 2 + 1 ( sin θ θ cos θ θ θ ˙ 2 ) \ddot{\theta} \ = -\frac{1}{\theta^2 \ + \ 1} \Big( \sin \theta \ - \ \theta \cos \theta \ - \ \theta \dot{\theta}^2 \Big)

This is a pretty ugly second-order differential equation. We must find the time when our bead rolls to a height of 9 π 2 \frac{9 \pi}{2} . This will be the value of θ r \theta_r such that R sin θ r = θ r sin θ = 9 π 2 R \sin \theta_r \ = \ \theta_r \sin \theta \ = \ \frac{9 \pi}{2} . Thus, we can create a simple program that solves this differential equation numerically. We will use Euler's method, where we assume the acceleration to be constant for very small intervals of time, Δ t \Delta t . We thus will have the update rules:

θ ˙ n + 1 = θ ˙ n + θ ¨ ( θ ˙ n , θ n ) Δ t \dot{\theta}_{n + 1} \ = \ \dot{\theta}_n \ + \ \ddot{\theta}( \dot{\theta}_n, \ \theta_n) \Delta t θ n + 1 = θ n + θ ˙ n Δ t + 1 2 θ ¨ ( θ ˙ n , θ n ) Δ t 2 \theta_{n+1} \ = \ \theta_n \ + \ \dot{\theta}_n \Delta t \ + \ \frac{1}{2} \ddot{\theta}( \dot{\theta}_n, \ \theta_n) \Delta t^2

The once our algorithm has reached θ r \theta_r , for some n > 0 n \ > \ 0 , the program returns n Δ t n \Delta t . Plotting the height of the bead over time yields a graph that looks something like this:

From this graph, we can see that the bead returns to an approximate height of 9 π 2 \frac{9 \pi}{2} at t 59.05623 t \ \approx \ 59.05623 (which is a very good approximation of the exact answer).

Here is the code I used to generate the graph/solve the question:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import numpy as np
from matplotlib import pyplot as plt
import math

time_int = 0.00003
angle = 9*math.pi / 2
a_velocity = 0

height = [angle]

def update():

    global a_velocity
    global angle
    global angles

    a_acc = -1*(1/(1 + angle**2)) * (angle * np.cos(angle)  + np.sin(angle) + angle * (a_velocity**2))

    new_velocity = a_velocity + a_acc*time_int
    new_angle = a_velocity*time_int + (1/2)*a_acc*(time_int**2)

    a_velocity = new_velocity
    angle = angle + new_angle

    height.append(angle * np.sin(angle))

update()

for i in range(0, 5000000):
    update()
    a = angles[len(angles)-1]
    print([i, a])

plt.plot(range(0, 5000002), angles)
plt.show()

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...