Lagrangian Mechanics

1. Oct 15, 2007

noranne

1. The problem statement, all variables and given/known data

A simple pendulum (mass M and length L) is suspended from a cart (mass m) that can oscillate on the end of a spring of force constant k. Write the Lagrangian in terms of the two generalized coordinates x and $$\phi$$, where x is the extension of the spring from its equilibrium length. Find the two Lagrange equations.

2. Relevant equations

L = T - U

$$\frac{\partial L}{\partial x} - \frac{d}{dt}(\frac{\partial L}{\partial \dot{x}}) = 0$$

$$\frac{\partial L}{\partial \phi} - \frac{d}{dt}(\frac{\partial L}{\partial \dot{\phi}}) = 0$$

3. The attempt at a solution

So far I'm thinking $$T = \frac{1}{2}M\dot{x}^2 + \frac{1}{2}M(L\dot{\phi} + \dot{x})$$ and $$U = \frac{1}{2}kx^2 + -Lcos(\phi)Mg$$

I feel like that's wrong, like the potential energy of the pendulum might not just depend on its height below the track. And the kinetic energy might be wrong. Really, this problem is totally throwing me for a loop, after I was feeling pretty confident about Lagrangian mechanics for about 4 problems. Any help??

2. Oct 16, 2007

clem

This should be $$T =+ \frac{1}{2}M(L\dot{\phi})^2$$
The rest looks OK.

3. Oct 16, 2007

Gokul43201

Staff Emeritus
That's not right either.

In the frame attached to the cart, the kinetic term is:
$$T'=M/2(\dot{x'}^2 + \dot{y'}^2)$$

where $\dot{x'}=L\dot{\phi}cos \phi$. In the lab frame, this becomes:

$$T=M/2((\dot{x'}+\dot{x})^2 + \dot{y'}^2)$$