# Lagrangian equation: 2 coupled masses,spring, three dimensions

1. Nov 15, 2011

### Lindsayyyy

Hi everyone

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

At first I want to find the langrangian function and the equation of motion for a system which exists of 2 masses(m) coupled by a spring(k). It's moving in 3 dimensions.We shall use cylindrical coordinates

2. Relevant equations
Langrangian

3. The attempt at a solution

At first I tried to find the kinetic energy

$$T= \frac 1 2 m(\dot r_{1}^{2}+r_{1}^{2} \dot \phi_{1}^{2}+\dot z_{1}^{2})+\frac 1 2 m(\dot r_{2}^{2}+r_{2}^{2} \dot \phi_{2}^{2}+\dot z_{2}^{2})$$

Is that right or did I do any mistakes thus far?

Now I tried to find the potential energy. I found the absolute value of the vector r1-r2
but I'm not sure if that's right because it looks 'too complicated'. I thought there's a trick to simplify it.
The absolute value of a vector for r1-r2 I found is:
$$r_{1}^{2}+r_{2}^{2}-2r_{1}r_{2}(cos_{1}(\phi)cos_{2}(\phi)+sin_{1}( \phi)sin_{2}(\phi))+z_{1}^{2}-2z_{1}z_{2}+z_{2}^{2}$$

square root of this, but for the potential energie ^2 so I just left the square root out.

Can anyone confirm this? Or did I do any mistakes there? Thanks for your help in advance

/edit: or would it be more intelligent to use the center of mass of the system as the point of origin ?

Last edited: Nov 15, 2011
2. Nov 15, 2011

### I like Serena

Yep. You've got your r1-r2 right.

I'd write it myself as:
$$r_{1}^{2}+r_{2}^{2}-2r_{1}r_{2}\cos(\phi_1 - \phi_2)+(z_{1}-z_{2})^{2}$$
It's the same thing, only a little bit shorter, meaning that differentiation is slightly easier.

3. Nov 16, 2011

### Lindsayyyy

Thanks so far. I haven't tried it yet to do it with the center of mass where I find the center of mass and use this is my point of origin. Do you think this will ease the problem a bit? Because after I'm going to find out the equations of motion I shall take a look at conserved quantities like angular moment etc. Also I shall find the 'generators'. I've yet problems understanding what a generator is and I can't find anything in the internet, neither in my textbooks.

4. Nov 16, 2011

### Lindsayyyy

Ok, I tried to use the center of mass system but it didn't work out, gehts far too complicated. I think there is an easier attempt than the one I tried in the beginning. I tried something else: I chose my point of origin where the one mass is, so I only have one vector which points to the second mass. My solution looks like this:

$$L=\frac 1 2(\dot r^{2}+r^{2} \dot \phi^{2}+\dot z^{2})- \frac 1 2(r^{2}+z^{2})$$

and I have to equations of motions:

$$m\ddot r=mr\dot \phi^{2}-kr$$
$$m\ddot z=-kz$$

angular momentum constant.

I'm not sure if I'm allowed to do this, because I totally ignored the kinetic energy of my first mass saying it's the point of origin all the time. Can anyone help me out if I'm allowed to do this and where my mistakes are?

5. Nov 16, 2011

### I like Serena

You will want your origin to be a fixed point in an inertial system.
Choosing one of the masses won't do this.
Perhaps you could choose the center of mass of both masses.
Since I assume the total momentum of the system is constant, it will be an inertial system.

I am not familiar with Lagrangian generators.
I can find a couple of references on the internet though.

6. Nov 16, 2011

### Lindsayyyy

I tried using the center of mass as origin of coordinates, but I have:

$$\vec r_{cm}=\frac {\vec r_{1} + \vec r_{2}} {2}$$

and doing this in cylindric coordinates as I'm supposed to do it is impossible. Or did I misunderstand you?

7. Nov 16, 2011

### I like Serena

You would have $\vec r_{cm}=\vec 0$.

Are the masses the same?
Then you would have r2=-r1.

8. Nov 16, 2011

### Lindsayyyy

Well, let's try again:

When I use the CM, lets just call the vector R this time. Is the kinetic energy just
$$T= \frac 1 2 M \dot {\vec R^{2}}$$

or do I have to consider (and add) also the kinetic energy of the relative movement? so it would look like:

$$T= \frac 1 2 M \dot {\vec R^{2}}+\frac 1 2 \mu \dot {\vec r^{2}}$$

so my L looks like

$$L=\frac 1 2 M \dot {\vec R^{2}}+\frac 1 2 \mu \dot {\vec r^{2}} -\frac 1 2 k \vec r^{2}$$

also what I said before that using my one mass as the origin, maybe I can change it just to the relative movement, saying:

$$L=\frac 1 2 \mu (\dot r^{2}+r^{2} \dot \phi^{2}+\dot z^{2})- \frac 1 2 k(r^{2}+z^{2})$$

What would be cleverer? I really can't figure this out right now what's right and what's not :/

edit: just read your post too late, yes the masses are the same

9. Nov 16, 2011

### vela

Staff Emeritus
Let $\vec{R}_1$ and $\vec{R}_2$ be the position vectors of the two masses. The Lagrangian is given by
$$\mathcal{L} = \frac{1}{2}m(\dot{\vec{R}}_1^2+\dot{\vec{R}}_2^2) - \frac{1}{2}k(\vec{R}_1-\vec{R}_2)^2$$which is what you have so far but in slightly different notation. Now let's define the two vectors
\begin{align*}
\vec{R} &= \frac{1}{2}(\vec{R}_1+\vec{R}_2) \\
\vec{r} &= \vec{R}_1 - \vec{R}_2
\end{align*}The vector $\vec{R}$ is the position of the center of mass (your $\vec{r}_{cm}$), and $\vec{r}$ is the displacement of mass 1 relative to mass 2. Solve for $\vec{R}_1$ and $\vec{R}_2$ in terms of $\vec{R}$ and $\vec{r}$ and substitute those expressions into the Lagrangian. You should be able to show that
$$\mathcal{L} = \frac{1}{2}(2m)\dot{\vec{R}}^2 + \frac{1}{2}\left(\frac{m}{2}\right)\dot{\vec{r}}^2 - \frac{1}{2}k\vec{r}^2$$Note that there is no cross term between $\vec{R}$ and $\vec{r}$, so the motion of the center of mass decouples from the relative motion of the two masses. Now you can write the various quantities in terms of the appropriate cylindrical coordinates and proceed to find the equations of motion.

10. Nov 16, 2011

### vela

Staff Emeritus
When you're unsure, it's usually best to start with something you know is true and rely on the math. You should, I hope, recognize that the Lagrangian
$$\mathcal{L} = \frac{1}{2}m(\dot{\vec{R}}_1^2+\dot{\vec{R}}_2^2) - \frac{1}{2}k(\vec{R}_1-\vec{R}_2)^2$$is correct. The math will show you that your educated guess that
$$\mathcal{L} = \frac 1 2 M \dot {\vec R^{2}}+\frac 1 2 \mu \dot {\vec r^{2}} -\frac 1 2 k \vec r^{2}$$is the correct one, which answers your first question — yes, you do need to include the kinetic energy due to the relative motion of the masses. Moreover, you don't need to arbitrarily throw out the first term as the Euler-Lagrange equations will yield two separate equations for $\vec{R}$ and $\vec{r}$. From the equation for $\vec{R}$, you can deduce that the various momenta associated with the center of mass of the system are conserved.

11. Nov 16, 2011

### Lindsayyyy

Thank you very much for your help. I'll have to eat now and try it tomorrow, as I'm too frustrated for today If I need any further help I'll post tomorrow. It wasn't clear to me I get from the one equation to the other, I'll try that. And again: thanks, to both of you