# Homework Help: Finding hamiltonian for spring/pulley problem

1. May 30, 2012

### Ned Stark

1. The problem statement, all variables and given/known data
a light, inextensible string passes over a small pulley and carries a mass of 2m on one end.

on the other end is a mass m, and beneath it, supported by a spring w/ spring constant k, is a second mass m.

using the distance x, of the first mass beneath the pulley, and the extension y in the spring, as generalized co-ordinates, find the hamiltonian

2. Relevant equations

H=kinetic energy+potential

3. The attempt at a solution

The problem, as stated above, is copied straight from the book, and I am not really sure what the coordinate x describes.

ill call the mass of 2m "M1"
& "M2" is the mass connected to the string from above, and spring from below
& "M3" is the mass hanging from the spring.

In my setup, x is the distance from the pully to M1, and y is the extension of the spring

so the kinetic energy in terms of x and y:

for M1: KE= m(dx/dt)^2

M2: KE= 1/2 m(dx/dt)^2

M3: KE=1/2 m(dy/dt+dx/dt)^2

Then for the system,
KE =3/2 m(dx/dt)^2+1/2 m(dy/dt+dx/dt)^2

I am struggling writing down the potential in terms of x and y

M1 will have only that of gravity, where as the other 2 will also have a spring term.

Can anybody point me in the right direction with these coordinates?

Last edited: May 30, 2012
2. May 31, 2012

### vela

Staff Emeritus
The masses don't have spring potential energy. The spring does. The total potential will consist of the gravitational potential energy of the three masses plus the potential energy of the spring.