# Ex 1.21 The dumbbell, 3.4.2

Structure and Interpretation of Classical Mechanics

.

e. Make a Lagrangian ( $\displaystyle{= T - V}$) for the system described with the irredundant generalized coordinates $\displaystyle{x_{cm}}$, $\displaystyle{y_{cm}}$, $\displaystyle{\theta}$ and compute the Lagrange equations from this Lagrangian. They should be the same equations as you derived for the same coordinates in part d.

~~~

[guess]


(define ((L-cm m0 m1 l) local)
(let* ((q (coordinate local))
(v (velocity local))
(x_cm (ref q 0))
(y_cm (ref q 1))
(theta (ref q 2))

(x_cm_dot (ref v 0))
(y_cm_dot (ref v 1))
(theta_dot (ref v 2))

(M (+ m0 m1))
(mu (/ 1 (+ (/ 1 m0) (/ 1 m1)))))

(+ (* (/ 1 2) M (+ (square x_cm_dot) (square y_cm_dot)))
(* (/ 1 2) mu (square l) (square theta_dot))))) $\displaystyle{ L_{cm} = \frac{1}{2} (m_0 + m_1) (\dot x_{CM}^2 + \dot y_{CM}^2 ) + \frac{1}{2} \mu l^2 \dot \theta^2 }$


(show-expression
(((Lagrange-equations
(L-cm 'm_0 'm_1 'l))

(up (literal-function 'x_cm)
(literal-function 'y_cm)
(literal-function 'theta)))
't)) [guess]

— Me@2021-12-22 01:20:55 PM

.

.