# Solving for the eqs of motion for a Double Pendulum using a Lagrangian

1. Mar 29, 2014

### Wavefunction

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

Two masses $m_1$ and $m_2 (m_1 ≠ m_2)$ are connected by a rigid rod of length $d$ and of negligible
mass. An extensionless string of length$l_1$ is attached to $m_1$ and connected to a fixed point $P$.
Similarly, a string of length $l_2 (l_1 ≠ l_2)$ connects $m_2$ and $P$. Obtain the equation describing the
motion in the plane of $m_1$, $m_2$, and $P$ and find the frequency of small oscillations around the
equilibrium position.

2. Relevant equations

(1) $\frac{∂L}{∂q_j}-\frac{d}{dt}\frac{∂L}{∂\dot{q_j}}+\sum_kλ_k(t)\frac{∂f_k(q_j,t)}{∂q_j} = 0$

(2) $s=Dn-m$

3. The attempt at a solution
Okay so the first thing I did in this problem was I tried to figure out how many coordinates I need. Each particle can move in 2 dimensions so $D=2$. There are 2 particles so $n=2$. There are 3 constraints:(a) $x_1^2+y_1^2 = l_1^2$, (b) $x_2^2+y_2^2 = l_1^2$, and (c) $(x_2-x_1)^2+(y_2-y_1)^2 = d^2$

$s=(2*2)-3 = 1$ However, I'll start of with the original four coordinates and work my way to only 1:

The Lagrangian:
$L=T-U → T=\frac{m_1}{2}[\dot{x_1}^2+\dot{y_1}^2]+\frac{m_2}{2}[\dot{x_2}^2+\dot{y_2}^2]$ and $U=g[m_1y_1+m_2y_2]$
Then $L=\frac{m_1}{2}[\dot{x_1}^2+\dot{y_1}^2]+\frac{m_2}{2}[\dot{x_2}^2+\dot{y_2}^2]-g[m_1y_1+m_2y_2]$

Now I can apply 2 out of my 3 constraints (a and b):
$x_1 = l_1sin(θ_1)$
$y_1 = l_1cos(θ_1)$
$x_2 = l_2sin(θ_2)$
$y_2 = l_2cos(θ_2)$

Applying these transformations to the Lagrangian:

$L=\frac{1}{2}[m_1l_1^2\dot{θ_1}^2+m_2l_2^2\dot{θ_2}^2]-g[m_1l_1cos(θ_1)+m_2l_2cos(θ_2)]$

Now the angular velocity $\dot{θ}$ is the same for both particles because the thin massless rod of length $d$ holds them together. So $\dot{θ_1}=\dot{θ_2}$

Applying this to L:

$L=\frac{1}{2}[m_1l_1^2+m_2l_2^2]\dot{θ_1}^2-g[m_1l_1cos(θ_1)+m_2l_2cos(θ_2)]$

$\dot{θ_1}=\dot{θ_2} → θ_1=θ_2+C → f = θ_1-θ_2-C=0$

Okay now I can use eq. (1):

$θ_1$: $\frac{∂L}{∂θ_1} = g[m_1l_1sin(θ_1)]$, $\frac{d}{dt}[\frac{∂L}{∂\dot{θ_1}}] = \frac{d}{dt}[[m_1l_1^2+m_2l_2^2]\dot{θ_1}]$, and $λ\frac{∂f}{∂θ_1} = λ$

(3) $g[m_1l_1sin(θ_1)]-[m_1l_1^2+m_2l_2^2]\ddot{θ_1}+λ=0$

$θ_2$: $\frac{∂L}{∂θ_2} = g[m_2l_2sin(θ_2)]$, $\frac{d}{dt}[\frac{∂L}{∂\dot{θ_2}}] = \frac{d}{dt}[0]$, and $λ\frac{∂f}{∂θ_1} = -λ$

(4) $g[m_2l_2sin(θ_2)]-λ=0$

From eq. 4 I know $λ$ in terms of $θ_1$:

Using $θ_1-C=θ_2$; $λ=g[m_2l_2sin(θ_1-C)]$

Then eq. 3 becomes:

$g[m_1l_1sin(θ_1)]-[m_1l_1^2+m_2l_2^2]\ddot{θ_1}+g[m_2l_2sin(θ_1-C)]=0$

$g[m_1l_1sin(θ_1)]+g[m_2l_2[sin(θ_1)cos(C)-sin(C)cos(θ_1)]]-[m_1l_1^2+m_2l_2^2]\ddot{θ_1}=0$

$[gm_1l_1+gm_2l_2cos(C)]sin(θ_1)-gm_2l_2sin(C)cos(θ_1)-[m_1l_1^2+m_2l_2^2]\ddot{θ_1}=0$

Now there is the matter of $C$ to handle:

If I plug in the coordinate transforms into constraint (c) I will arrive at the law of cosines:

$l_1^2+l_2^2-2l_1l_2cos(θ_1-θ_2) = d^2$ (keep in mind here that I have defined $θ_1 < 0$ and $θ_2>0$)

From the law of cosines I get:

$θ_1 = θ_2+arccos(\frac{d^2-l_1^2-l_2^2}{-2l_1l_2})$ so I have now found what C is:

$C = arccos(\frac{d^2-l_1^2-l_2^2}{-2l_1l_2})$

Now plugging in $C$ into the new form of eq. 3:

$[gm_1l_1+gm_2l_2cos(arccos(\frac{d^2-l_1^2-l_2^2}{-2l_1l_2}))]sin(θ_1)-gm_2l_2sin(arccos(\frac{d^2-l_1^2-l_2^2}{-2l_1l_2}))cos(θ_1)-[m_1l_1^2+m_2l_2^2]\ddot{θ_1}=0$

$[gm_1l_1+gm_2l_2(\frac{d^2-l_1^2-l_2^2}{-2l_1l_2})]sin(θ_1)-gm_2l_2(\frac{\sqrt{(-2l_1l_2)^2-(d^2-l_1^2-l_2^2)^2}}{-2l_1l_2})cos(θ_1)-[m_1l_1^2+m_2l_2^2]\ddot{θ_1}=0$

Okay so now I only want to consider small oscillations about the equilibrium position $\Rightarrow θ_1\ll 1$

Then eq. 3 becomes the Linear ODE:

$g[m_1l_1-m_2(\frac{d^2-l_1^2-l_2^2}{2l_1})](θ_1)+gm_2(\frac{\sqrt{(-2l_1l_2)^2-(d^2-l_1^2-l_2^2)^2}}{2l_1})(1)-[m_1l_1^2+m_2l_2^2]\ddot{θ_1}=0$

Now this equation can be put into the form $\ddot{θ}+ω_0^2θ=f(t)$ where $f(t)$ is a constant driving force.

$\ddot{θ_1}+\frac{-g[m_1l_1-m_2(\frac{d^2-l_1^2-l_2^2}{2l_1})]}{m_1l_1^2+m_2l_2^2}θ_1=\frac{gm_2(\frac{\sqrt{(-2l_1l_2)^2-(d^2-l_1^2-l_2^2)^2}}{2l_1})}{m_1l_1^2+m_2l_2^2}$

Now then $ω_0^2 \equiv \frac{-g[m_1l_1-m_2(\frac{d^2-l_1^2-l_2^2}{2l_1})]}{m_1l_1^2+m_2l_2^2}$ (frequency of oscillation about the equilibrium point)

The equilibrium condition is given as $θ_1(0) = \frac{f(t)}{ω_0^2}$ because in equilibrium $\ddot{θ_1(t=0)}=0$ In this case $f(t) = \frac{gm_2(\frac{\sqrt{(-2l_1l_2)^2-(d^2-l_1^2-l_2^2)^2}}{2l_1})}{m_1l_1^2+m_2l_2^2}$

The general solution to eq 3. is:

(4) $θ_1(t) = Acos(ω_0t)+Bsin(ω_0t)+θ_p(t)$

$\ddot{θ_p}+ω_0^2θ_p = gm_2(\frac{\sqrt{(-2l_1l_2)^2-(d^2-l_1^2-l_2^2)^2}}{2l_1}) → θ_p = gm_2(\frac{\sqrt{(-2l_1l_2)^2-(d^2-l_1^2-l_2^2)^2}}{2ω_0^2l_1})$

$A = θ_1(0)-θ_p$ then eq. 4 becomes $θ_1(t) = [θ_1(0)-θ_p]cos(ω_0)+Bsin(ω_0t)+θ_p$

$\dot{θ_1} = Bω_0cos(ω_0t) → \dot{θ_1(0)} = Bω_0 → B=\frac{ \dot{θ_1(0)}}{ω_0}$

So the general solution is then:

$θ_1(t) = [θ_1(0)-θ_p]cos(ω_0t)+\frac{ \dot{θ_1(0)}}{ω_0}sin(ω_0t)+θ_p$

Thank you in advance for helping me out in checking my work(:

#### Attached Files:

• ###### IMG_0213.JPG
File size:
24.5 KB
Views:
57
2. Mar 30, 2014

### maajdl

What is the difference between and "extensionless string" and a "string" ?

3. Mar 30, 2014

### Wavefunction

In the context of the problem it is simply emphasizing the point that the particle is constrained to move on a fixed radius $l_i$ from point
$P$

4. Mar 30, 2014

### maajdl

Does that mean that there is no difference between a rod and a string? (in this problem)

If that is true, then the triangle (l1 ,l2 ,d) is a rigid triangle, and then the problem admits an almost trivial solution: a simple pendulum whose you need to find the parameters.
If that is true, you might be able to check your solution directly from this point of view.

However, I still have some doubts about the meaning of the question.

5. Mar 30, 2014

### Wavefunction

Yes, I suppose I could set $l_1= l_2$ and $m_1 = m_2$ because in that limit I should be able to calculate the reduced mass $\mu$ and check that the equations of motion I came up with match that of the simple pendulum. However, the point of this homework is to exercise one's skill with using Lagrangian mechanics. I really want to make sure my setup in this regard is correct more so than the equations of motion per se. Thank you for the suggestion though(:

6. Mar 30, 2014

### TSny

I haven't gotten through all of your manipulations. But I did notice a couple of things.

1) In getting to equations (3) and (4), you should still be treating $\theta_1$ and $\theta_2$ as independent variables in the Lagrange multiplier method.

So, $\frac{\partial L}{\partial \theta_2} \neq 0$. [EDIT: As discussed in the following posts, this should have been $\frac{\partial L}{\partial \dot \theta_2} \neq 0$]

2) The small oscillation approximation does not mean that $\theta_1$ (or $\theta_2$) is small. When the system hangs at rest in equilibrium, $\theta_1$ has some value $\theta_1^0$ which is not necessarily small. It's the deviation of $\theta_1$ from $\theta_1^0$ that will be small.

--------------------
Note that as a check, you can obtain the frequency of oscillation by considering the system as a physical pendulum and using the well-known formula for the frequency of a physical pendulum.

Last edited: Mar 30, 2014
7. Mar 30, 2014

### Wavefunction

In 1) were you referring to $\frac{∂L}{∂\dot{θ_2}}$ because I never got that $\frac{∂L}{∂θ_2}= 0$ I think I'm still ok here though because 2 of my 3 constraints were simple coordinate transformations. What about $\dot{θ_1}=\dot{θ_2}$? Is that correct? I got that relation 2 different ways. The first was from the law of cosines relation and the second was treating the two particles as having a constant separation $d$ in the plane.

In 2) So basically I need to reformulate the solution to 3)?

8. Mar 30, 2014

### Wavefunction

Ahhh yes I see, wow I can't believe I overlooked that $ε$ the angular displacement from $θ_1(0)$ is what is small. Thank you for pointing that out kind sir!

9. Mar 30, 2014

### TSny

Yes, sorry. I should have written $\frac{∂L}{∂\dotθ_2}\neq 0$

As I understand it, when using the Lagrange multiplier method you shouldn't use your constraint conditions until after you've derived the equations of motion from the Lagrangian (treating $\theta_1$ and $\theta_2$ as independent variables).

Yes. But you shouldn't use it until after you have derived the correct equations of motion.

10. Mar 30, 2014

### Wavefunction

Last edited: Mar 31, 2014
11. Mar 31, 2014

### TSny

Things look good to me all the way through equation (7). Then, I think you should write $\theta_1(t) = \theta_1^0 + \epsilon(t)$ where $\theta_1^0$ is a constant representing the equilibrium position for $\theta_1$. Starting with equation (8), everywhere you have $\theta_1$ you should write $\theta_1^0$.

You can solve for $\theta_1^0$ in terms of $C$ by using equation (7) when the system is hanging in equilibrium so that $\ddot \theta_1 = 0$.

Near the end you have introduced $\alpha$. Show that $\alpha = 0$.

12. Mar 31, 2014

### Wavefunction

13. Mar 31, 2014

### TSny

Looks good. You can show that your expression for $\omega$ reduces to what you expect if you treat the system as a physical pendulum.