# Lagrangian mechanics: Bar connected to a spring

## Homework Statement

Mass 1 can slide on a vertical rod under the influence of a constant gravitational force and and is connected to the rod via a spring with the spring konstant k and rest length 0. A mass 2 is connected to mass 1 via a rod of length L (forms a 90 degree angel with the first rod, and is otherwise rotatable).[/B]
1. Find the lagrangian
2. Find the equations of motion with the euler-lagrange equations
3. Find the solutions to the equations of motions

## Homework Equations

L = T-V
$$\frac{d}{dt} \frac{\partial L}{\partial \dot z} - \frac{\partial L}{\partial z}$$
$$\frac{d}{dt} \frac{\partial L}{\partial \dot \varphi} - \frac{\partial L}{\partial \varphi}$$

## The Attempt at a Solution

This is the first time I have to deal with lagrangian mechanics.
I thought we have 2 free coordinates. We have z for the up and down motion and $$\varphi$$ for the rotation on the x-y Plane of mass 2.
The potential energy is: $$V = V_{Spring} + V_{grav1} + V_{grav2} = \frac{1}{2} k z^2 + m_1 g z + m_2 g z$$
The kinetic energy: $$T = T_1 + T_2 = \frac{1}{2} m_1 \dot z^2 + \frac{1}{2} m_2 (\dot L^2 + L^2 \dot \varphi ^2 + \dot z^2)$$
$$\dot L^2$$ must be 0 cause the length of the 2nd rod doesn't change over time
Also I thought, since mass 2 is moving on the edge of a cylinder, I would need to use the kinetic energy in cylinder coordinates for mass 2

Questions:
I plugged my lagrangian into my 2 euler-lagrange equations and got this:
for z : $$(m_1 + m_2) \ddot z = -kz + (m_1+m_2) g$$
for $$\varphi: \frac{d}{dt}(m_2 l^2 \dot \varphi) = 0$$

I am not sure about r. This looks like the equation of motion of a damped harmonic oscillator. It is not clear from the exercise if the spring is damped or not, so I am not sure if that is correct.
The 2nd equation just means, that angular momentum doesn't change with respect to time? Is there anything I could use from the conversation of angular momentum to solve the first equation or am I done here?[/B]

Edit:
Thanks

Last edited:
• Delta2

BvU
Homework Helper
Hi,
I am not sure about z. This looks like the equation of motion of a damped harmonic oscillator.
No damping (usually that's a term ##\beta \dot z##). Jus a mass on a spring.
The 2nd equation just means, that angular momentum doesn't change with respect to time?
Correct !
Is there anything I could use from the conservation of angular momentum to solve the first equation or am I done here?
There is nothing in common, so: no. The two degrees of freedom are totally independent.

Hi,
No damping (usually that's a term ##\beta \dot z##). Jus a mass on a spring.
Correct ! There is nothing in common, so: no. The two degrees of freedom are totally independent.
Thank you very much!! I'll try to solve it now