[Physics] Lagrangian of a 2D double pendulum system with a spring

classical-mechanicscoordinate systemslagrangian-formalismspring

A double pendulum with a spring connecting the masses instead of a wire

In the figure above (please excuse my Picasso drawing skills), we have the general 2D double pendulum system with a slight modification, there's a spring connecting the masses instead of the usual wire.

A few statements on the system:

  • The wire connecting $m_1$ to the pivot point is massless and has a fixed length $l$.
  • The spring connecting $m_1$ and $m_2$ is massless, has a constant $k$, an unstretched length $l_0$ and can only extend/contract in the $m_1$-$m_2$ direction, here called $r$.
  • The angles of $m_1$ and $m_2$ with respect to the $y$-axis are $\theta$ and $\phi$, respectively.
  • There's no friction involved.

Now, I've considered using $(r, \theta, \phi)$ as my generalized coordinates, however, I'm not so sure if $r$ should really be one of them. The cartesian coordinates would relate to them as

$$ \left \{ \begin{array}{lcl}x_1 = l \sin \theta \\
x_2 = l \sin \theta + r \sin \phi \\
y_1 = l \cos \theta \\
y_2 = l \cos \theta + r \cos \phi
\end{array} \right.$$

I believe that is pretty straight forward. Now, the lagrangian would be

$$ L = T – U = \left \{ \frac{1}{2}m_1 \left(\dot{x}_1^2 + \dot{y}_1^2 \right) – m_1gy_1 \right \} + \left \{ \frac{1}{2}m_2 \left(\dot{x}_2^2 + \dot{y}_2^2 \right) – m_2gy_2 \right \} – \frac{1}{2}k r^2$$

And if we rewrite this lagrangian in terms of our generalized coordinates $(r,\theta, \phi)$ we get, after some algebra,

$$L = \Bigg\{ \frac{1}{2}l^2 \dot \theta^2 \left(m_1 + m_2 \right) + \frac{1}{2}m_2 \dot r^2 + \frac{1}{2}m_2 r^2 \dot \phi^2 \\
+ m_2 l \dot r \dot \theta \sin \left( \theta – \phi \right) + m_2 l \dot r \dot \theta \dot \phi \cos \left( \theta – \phi \right) \\
-gl \cos \theta \left( m_1 + m_2\right) +m_2gr \cos \phi – \frac{1}{2} kr^2 \Bigg\}$$

Which is precisely reminiscent of the lagrangian for the general case, as seen in (9) here, with two modifications:

  • there's a spring of length $r$ connecting the masses instead of another fixed length wire.
  • there's an additional potential energy $\frac{1}{2}kr^2$ due to the spring.

My question is:

  1. Is $r$ really a generalized coordinate or can it be expressed in terms of the angles alone, and if so how?

Best Answer

I haven't done the calculation by myself but as far as I can tell you have forgotten to take the derivative of $r$ when you wrote $\dot x_2^2$ since $r$ is a variable (it contracts and stretches) you have to have something like:

$$ \dot x_2= \dot r \sin \phi + \cdots $$

I don't know whether these terms cancel out but my intuition is that they shouldn't.

Think of it this way. If I gave you the $\phi,\theta$ as initial conditions can you tell me what $r$ should be? You obviously cannot because you don't know how much I've stretched the spring and since this is the initial state I can do whatever I want. Thus you must have $r$ as a generalised coordinate.