Ex 1.22 Driven pendulum, 2.1

Structure and Interpretation of Classical Mechanics

.

Show that the Lagrangian (1.89) …

~~~

[guess]

The Lagrangian (1.89):

Formally, we can reproduce Newton’s equations with the Lagrangian:

\displaystyle{ L(t;x, F; \dot x, \dot F)}

\displaystyle{= \sum_\alpha \frac{1}{2} m_\alpha \dot{\mathbf{x}_\alpha}^2  - V(t, x) - \sum_{\{ \alpha, \beta | \alpha < \beta, \alpha \leftrightarrow \beta \}} \frac{F_{\alpha \beta}}{2 l_{\alpha \beta}} \left[ (\mathbf{x}_\beta - \mathbf{x}_\alpha)^2 - l_{\alpha \beta}^2 \right] }

.


(define (KE-particle m v)
  (* 1/2 m (square v)))

(define ((extract-particle pieces) local i)
  (let* ((indices (apply up (iota pieces (* i pieces))))
         (extract (lambda (tuple)
                    (vector-map (lambda (i)
                                  (ref tuple i))
                                indices))))
    (up (time local)
        (extract (coordinate local))
        (extract (velocity local)))))

(define (U-constraint q0 q1 F l)
  (* (/ F (* 2 l))
     (- (square (- q1 q0))
        (square l))))

(define ((U-gravity g m) q)
  (let* ((y (ref q 1)))
    (* m g y))) 

(define ((L-driven-free m l x_s y_s U) local)
  (let* ((extract (extract-particle 2))
	 
     (p (extract local 0))
     (q (coordinate p))
     (qdot (velocity p))
     
     (F (ref (coordinate local) 2)))
  
    (- (KE-particle m qdot)
       (U q)
       (U-constraint (up (x_s (time local)) (y_s (time local)))
		     q
		     F
		     l))))

(let* ((U (U-gravity 'g 'm))
       (x_s (literal-function 'x_s))
       (y_s (literal-function 'y_s))
       (L (L-driven-free 'm 'l x_s y_s U))
       (q-rect (up (literal-function 'x)
		           (literal-function 'y)
		           (literal-function 'F))))
  (show-expression
   ((compose L (Gamma q-rect)) 't)))

\displaystyle{     L     =     \frac{1}{2} m \left[(Dx)^2 + (Dy)^2 \right] - mgy     - \frac{F}{2l} \left[ (x-x_s)^2 + (y-y_s)^2 - l^2 \right] }

[guess]

— Me@2022-01-13 01:19:34 PM

.

.

2022.01.14 Friday (c) All rights reserved by ACHK