# Finding the Lagrange equations of motion for 2 sliding blocks

1. Apr 14, 2014

### Wavefunction

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

The first block with mass $m_1$ slides without friction on a wedge which has an incline of angle $\alpha$. The wedged shaped block has a mass $m_2$. The second block is also allowed to slide on a flat frictionless line. Find Lagrange's equations of motion.

2. Relevant equations

$L = T-U$

$\frac{∂L}{∂q_j}-\frac{d}{dt}\frac{∂L}{∂\dot{q_j}}=0$

3. The attempt at a solution

First I'll define a vector $\vec{R}$ that points to the center of mass of the system. Also $\vec{r_1}$ is the vector that points to $m_1$ and $\vec{r_2}$ is the vector that points to $m_2$. Additionally $\vec{R}=\frac{1}{M}[m_1\vec{r_1}+m_2\vec{r_2}]$. Finally let $\vec{r} = \vec{r_2}-\vec{r_1}$.

If I combine these equations I'll get $\vec{r_1} = \vec{R}+\frac{m_2}{M}\vec{r}$ and $\vec{r_2} = \vec{R}-\frac{m_1}{M}\vec{r}$

Also $\dot{\vec{r_1}} = \dot{\vec{R}}+\frac{m_2}{M}\dot{\vec{r}}$ and $\dot{\vec{r_2}} = \dot{\vec{R}}-\frac{m_1}{M}\dot{\vec{r}}$

Now I need the total kinetic energy of the system: $T$

$T = \frac{M}{2}(\dot{\vec{r_1}}+\dot{\vec{r_2}})^2$ Now I'll check this expression for accuracy when $\dot{\vec{r_2}} = \vec{0}$. When the second block is stationary that implies that $\dot{\vec{R}} = \frac{m_1}{M}\dot{\vec{r}}$ Which if I substitute back into $T = \frac{M}{2}(\dot{\vec{r_1}})^2$ gives $\frac{M}{2}(\frac{m_1+m_2}{M}\dot{\vec{r}})^2$ The kinetic energy of the second block will be zero since it is at rest so setting $m_2=0$ gives $\frac{m_1}{2}(\dot{\vec{r}})^2$ So in the limit that the velocity of the second block goes to zero I get back to the familiar $T$ of just one particle.

Now $\dot{\vec{R}} = (\dot{X},\dot{Y})$ and $\dot{\vec{r}} = (\dot{x},\dot{y})$

$T = \frac{M}{2}(2\dot{\vec{R}}+\frac{m_2-m_1}{M}\dot{\vec{r}})^2$
$T=\frac{M}{2}[4\dot{\vec{R}}\cdot\dot{\vec{R}}+(\frac{m_2-m_1}{M})^2\dot{\vec{r}}\cdot\dot{\vec{r}}+4\frac{m_2-m_1}{M}\dot{\vec{R}}\cdot\dot{\vec{r}}]$
$T = \frac{M}{2}[4(\dot{X}^2+\dot{Y}^2)+(\frac{m_2-m_1}{M})^2(\dot{x}^2+\dot{y}^2)+4\frac{m_2-m_1}{M}(\dot{X}\dot{x}+\dot{Y}\dot{y})]$

Okay thats $T$ Now I need $U$

$U = M(\vec{g}\cdot\vec{r_1}+\vec{g}\cdot\vec{r_2})$
where $\vec{g} = (0,-g)$, $\vec{r_1} = (X+\frac{m_2}{M}x,Y+\frac{m_2}{M}y)$, and $\vec{r_2} = (X-\frac{m_1}{M}x,Y-\frac{m_1}{M}y)$

Okay so now I need to apply my constraints which are now: $\frac{Y}{X}=tan(\alpha)$ and $\frac{y}{x}=tan(\alpha)$ so plugging in to both $T$ and $U$

$T=\frac{M}{2}[4(1+tan^2(\alpha))\dot{X}^2+(\frac{m_2-m_1}{M})^2(1+tan^2(\alpha))\dot{x}^2+4\frac{m_2-m_1}{M}(1+tan^2(\alpha))\dot{X}\dot{x}]$

$T =\frac{Msec^2(\alpha)}{2}[4\dot{X}^2+(\frac{m_2-m_1}{M})^2\dot{x}^2+4\frac{m_2-m_1}{M}\dot{X}\dot{x}]$

and

$U = M(\vec{g}\cdot(\vec{r_1}+\vec{r_2})) = M[-2gtan(\alpha)X-g\frac{m_2-m_1}{M}tan(\alpha)x]$

$U = Mgtan(\alpha)[-2X-\frac{m_2-m_1}{M}x]$

Then $L= T-U$ and $H = T+U$

$L = T -U = \frac{Msec^2(\alpha)}{2}[4\dot{X}^2+(\frac{m_2-m_1}{M})^2\dot{x}^2+4\frac{m_2-m_1}{M}\dot{X}\dot{x}]-Mgtan(\alpha)[-2X-\frac{m_2-m_1}{M}x]$

Now the momenta are: $p_X = \frac{∂L}{∂\dot{X}} = \frac{Msec^2(\alpha)}{2}[8\dot{X}+4\frac{m_2-m_1}{M}\dot{x}]$ and $p_x =\frac{∂L}{∂\dot{x}}= Msec^2(\alpha)[(\frac{m_2-m_1}{M})^2\dot{x}+2\frac{m_2-m_1}{M}\dot{X}]$

Also: $\frac{∂L}{∂X} = 2Mgtan(\alpha)$ and $\frac{∂L}{∂x} = (m_2-m_1)gtan(\alpha)$

Then the Lagrange equations are:

$x$: $(m_2-m_1)gtan(\alpha)-Msec^2(\alpha)[(\frac{m_2-m_1}{M})^2\ddot{x}+2\frac{m_2-m_1}{M}\ddot{X}]=0$

$X$: $2Mgtan(\alpha)-Msec^2(\alpha)[4\ddot{X}+2\frac{m_2-m_1}{M}\ddot{x}]=0$

2. Apr 15, 2014

### Matterwave

I think a much simpler choice of coordinates, since we are dealing with rigid bodies, would be one coordinate for the tip of the wedge, and then one coordinate for the distance up and down the wedge of the block...

Your choice of coordinates, seem ill equipped to be constrained correctly. Specifically I don't see why Y/X=tan(alpha), or that y/x=tan(alpha). Your X and Y points to the center of mass, I don't see why the Center of mass has to lie along the angle defined by the incline, surely that would be a great coincidence. Your x and y are coordinates for a separation vector, I don't see how that has to do with the incline angle at all...

Maybe draw a diagram, see where these vectors you have defined are pointing, and see if they have anything to do with the actual angle of the inclined plane (they don't).

EDIT: I also don't see the constraint that the wedge must be moving along a flat surface in your equations. This gives some indication that something is wrong.

Last edited: Apr 15, 2014
3. Apr 15, 2014

### Wavefunction

That was my first intuition, but I felt it was wrong because I thought I needed to look at the whole system.

Last edited: Apr 15, 2014
4. Apr 15, 2014

### Wavefunction

Okay well here was my thought process I wanted to try to look at the motion of the center of mass of the system. Basically there would be two motions: the center of mass of the system and of block one. I see now that it won't work because it would be double counting motion: I should have just considered the center of mass since block one is a part of determining the center of mass if I wanted to try that approach.

5. Apr 15, 2014

### Matterwave

You certainly do need to look at the whole system. But your choice of coordinates in your first post makes this problem really really hard.

Let's look at what happens when we have a much simpler set of coordinates. Suppose $\mu$ points from the origin to the tip of the wedge, and $\tau$ points from the tip of the wedge up its incline to the center of the block. We have only these 2 degrees of freedom in this problem, because the wedge is constrained to move 1 dimensionally along a flat surface, and the block is also constrained to move 1-dimensinoaly along the incline.

The kinetic energy of the wedge is therefore:

$$T_{wedge}=\frac{1}{2}m_2 \dot{\mu}^2$$

The kinetic energy of the block is a little trickier, because as it moves in $\tau$, the wedge moves in $\mu$. And so the kinetic energy of the block should depend on both of these coordinates. To find its kinetic energy, let x and y be the coordinates of the block itself. Then the kinetic energy is obviously:

$$T_{block}=\frac{1}{2}m_1(\dot{x}^2+\dot{y}^2)$$

Now, how are x and y related to $\mu$ and $\tau$? (Hint: draw a diagram) Once you figure that out, you should be quite close to solving the problem.

Do the analysis exactly the same way for potential energy. Except now the wedge has no potential energy because it can't fall.

6. Apr 15, 2014

### Wavefunction

So then I would need $x=\mu+\tau cos(\alpha)$ and $y=\tau sin(\alpha)$?

7. Apr 15, 2014

### Matterwave

Yes! Now that you have $x=\mu+\tau\cos(\alpha)$ and $y=\tau\sin(\alpha)$ you can get:

$$\dot{x}=\dot{\mu}+\dot{\tau}\cos(\alpha)$$
and
$$\dot{y}=\dot{\tau}\sin(\alpha)$$

And directly substitute these into the equation for the kinetic energy. The potential energy is very simply then:

$$U_{block}=m_1 gy=m_1 g\tau\sin(\alpha)$$

And you can get a simple Lagrangian.

8. Apr 15, 2014

### Wavefunction

Okay so I think this does look better

9. Apr 15, 2014

### Matterwave

Check your math on the canonical momenta. Distribute the square correctly in the square term:

$$(\dot{\mu}+\dot{\tau}\cos(\alpha))^2=\dot{\mu}^2+\dot{\tau}^2\cos^2(α)+2\dot{\mu}\dot{\tau}\cos(\alpha)$$

There should be a trig identity you can use to make things a little cleaner after you take this square too.

EDIT: No wait, I misread your math. I think you are right as well. It just looks a little cleaner if you distribute the square because of the trig identity you can use.

Last edited: Apr 15, 2014