Ex 1.21 The dumbbell, 3.3

Structure and Interpretation of Classical Mechanics

.

c. Make a change of coordinates to a coordinate system with center of mass coordinates \displaystyle{x_{cm}}, \displaystyle{y_{cm}}, angle \displaystyle{\theta}, distance between the particles \displaystyle{c}, and tension force \displaystyle{F}. Write the Lagrangian in these coordinates, and write the Lagrange equations.

~~~

[guess]


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

(define ((L-free-constrained m0 m1 l) local)
  (let* ((extract (extract-particle 2))
     (p0 (extract local 0))
     (q0 (coordinate p0))
     (qdot0 (velocity p0))
  
     (p1 (extract local 1))
     (q1 (coordinate p1))
     (qdot1 (velocity p1))
  
     (F (ref (coordinate local) 4)))
 
    (- (+ (KE-particle m0 qdot0)
          (KE-particle m1 qdot1))
       (U-constraint q0 q1 F l))))

(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))))

(let ((L (L-free-constrained 'm_0 'm_1 'l))
      (q-rect (up (literal-function 'x_0)
                  (literal-function 'y_0)
                  (literal-function 'x_1)
                  (literal-function 'y_1)
                  (literal-function 'F))))
  (show-expression
   ((compose L (Gamma q-rect)) 't)))

\displaystyle{ \frac{1}{2} m_0 \left( \dot x_0^2 + \dot y_0^2 \right) + \frac{1}{2} m_1 \left( \dot x_1^2 + \dot y_1^2 \right) + \frac{F}{2 l} \left( l^2 - y_1^2 + 2 y_0 y_1 - x_1^2 + 2 x_0 x_1 - y_0^2 - x_0^2 \right) }

\displaystyle{ = \frac{1}{2} m_0 \left( \dot x_0^2 + \dot y_0^2 \right) + \frac{1}{2} m_1 \left( \dot x_1^2 + \dot y_1^2 \right) - \frac{F}{2 l} \left[ (y_1 - y_0)^2 + (x_1 - x_0)^2 - l^2 \right] }


(define ((q->r m0 m1) local)
  (let ((q (coordinate local)))
    (let ((x_cm (ref q 0))
          (y_cm (ref q 1))
          (theta (ref q 2)) 
          (c (ref q 3))
	      (F (ref q 4))
	      (M (+ m0 m1)))
      (let ((x0 (- x_cm (* (/ m1 M) c (cos theta))))
            (y0 (- y_cm (* (/ m1 M) c (sin theta))))
            (x1 (+ x_cm (* (/ m0 M) c (cos theta))))
            (y1 (+ y_cm (* (/ m0 M) c (sin theta)))))
        (up x0 y0 x1 y1 F)))))

(let ((q (up (literal-function 'x_cm)
	         (literal-function 'y_cm)
	         (literal-function 'theta)
	         (literal-function 'c)
	         (literal-function 'F))))
  (show-expression (q 't)))

 
(show-expression
 (up 't
     (up 'x_cm 'y_cm 'theta 'c 'F)
     (up 'xdot_cm 'ydot_cm 'thetadot 'cdot 'Fdot)))


(show-expression
  ((q->r 'm_0 'm_1) 
     (up 't
         (up 'x_cm 'y_cm 'theta 'c 'F)
         (up 'xdot_cm 'ydot_cm 'thetadot 'cdot 'Fdot))))


(let ((q (up (literal-function 'x_cm)
             (literal-function 'y_cm)
             (literal-function 'theta)
             (literal-function 'c)
             (literal-function 'F))))
  (show-expression ((q->r 'm_0 'm_1) ((Gamma q) 't))))


(show-expression
  ((F->C (q->r 'm_0 'm_1)) 
     (up 't
         (up 'x_cm 'y_cm 'theta 'c 'F)
         (up 'xdot_cm 'ydot_cm 'thetadot 'cdot 'Fdot))))

(define (L-cm m0 m1 l)
  (compose
   (L-free-constrained m0 m1 l) (F->C (q->r m0 m1))))

(show-expression
 ((L-cm 'm_0 'm_1 'l)
     (up 't
         (up 'x_cm 'y_cm 'theta 'c 'F)
         (up 'xdot_cm 'ydot_cm 'thetadot 'cdot 'Fdot))))

\displaystyle{    \frac{1}{\mu} = \frac{1}{m_0} + \frac{1}{m_1}    }

\displaystyle{    L_{cm}     }

\displaystyle{  = \frac{    ( c^2 \dot \theta^2 + \dot c^2 ) l m_0 m_1                   + (l m_0^2 + 2 l m_0 m_1 + l m_1^2) (\dot x_{cm}^2 + \dot y_{cm}^2)  + F ( l^2 - c^2 )(m_0 + m_1)  }{2 l (m_0 + m_1)}    }

\displaystyle{  = \frac{    ( c^2 \dot \theta^2 + \dot c^2 ) l m_0 m_1                   + l (m_0 + m_1)^2 (\dot x_{cm}^2 + \dot y_{cm}^2)  + F ( l^2 - c^2 )(m_0 + m_1)  }{2 l (m_0 + m_1)}    }

\displaystyle{  =   \frac{1}{2} ( c^2 \dot \theta^2 + \dot c^2 ) \mu                   +  \frac{1}{2} (m_0 + m_1) (\dot x_{cm}^2 + \dot y_{cm}^2)  +  \frac{1}{2l} F ( l^2 - c^2 )   }


(show-expression
 (((Lagrange-equations
    (L-cm 'm_0 'm_1 'l))
   (up (literal-function 'x_cm)
       (literal-function 'y_cm)
       (literal-function 'theta)
       (literal-function 'c)
       (literal-function 'F)))
  't))


(show-expression
 (((Lagrange-equations
    (L-cm 'm_0 'm_1 'l))
   (up (literal-function 'x_cm)
       (literal-function 'y_cm)
       (literal-function 'theta)
       (lambda (t) 'l)
       (literal-function 'F)))
  't))

[guess]

— Me@2021-09-17 06:35:51 AM

.

.

2021.09.18 Saturday (c) All rights reserved by ACHK

上山尋寶, 2

重點副作用 6.2 | The non-side-effect-ness of side-effects, 6.2

這段改編自 2010 年 4 月 24 日的對話。

.

其實,我們可以考慮改變方案。雖然有些課題,可能幾個小時,就可以完成,但是,我們可以每個星期,也講不同的課題。

留意,雖然個別課題的成果,只會花幾小時,但是那是指,事先已有課題的情況下。那些有趣而深刻的課題,簡稱「勁題目」,並不會從天而降。那些勁題目本身,大部分情況下,只會在你開始研究,將會花「幾年加幾年」的苦功知識時,才會引發得到。

所以,我們先企圖進攻那些大題目,無論它們長遠是否,對你直接有用;因為,過程之中,自然會引發很多技術細節。而那些技術細節,很多是你直接可用。

例如,剛才因為跟你研究,大學力學課本《Structure and Interpretation of Classical Mechanics》(SICM),而提及到一個程式語言 Scheme programming language。而又因為研究該程式語言,而提及了一個,特別的文字編輯程式 Notepad++。雖然,大學力學和程式語言 Scheme 本身,對你而言,只是工餘興趣,但是,Notepad++ 卻是日常生活也有用。

原初辛苦上山的目的是,傳說中,山頂上的寶藏。但是,上到山頂後,才發現最珍貴的寶藏,反而是沿途找到的那些。

— Me@2021-08-16 04:31:19 PM

.

.

2021.08.16 Monday (c) All rights reserved by ACHK

Ex 1.21 The dumbbell, 3.2

Structure and Interpretation of Classical Mechanics

.

c. Make a change of coordinates to a coordinate system with center of mass coordinates \displaystyle{x_{cm}}, \displaystyle{y_{cm}}, angle \displaystyle{\theta}, distance between the particles \displaystyle{c}, and tension force \displaystyle{F}. Write the Lagrangian in these coordinates, and write the Lagrange equations.

~~~

[guess]

\displaystyle{ \begin{aligned}   m_0 \ddot y_0 &= F \sin \theta \\   m_0 \ddot x_0 &= F \cos \theta \\   m_1 \ddot y_1 &= -F \sin \theta \\   m_1 \ddot x_1 &= -F \cos \theta \\   \end{aligned}}

\displaystyle{ \begin{aligned}   y_{cm} &= \frac{m_0 y_0 + m_1 y_1}{m_0 + m_1} \\   x_{cm} &= \frac{m_0 x_0 + m_1 x_1}{m_0 + m_1} \\   \end{aligned}}

\displaystyle{ \begin{aligned}   \ddot y_{cm} &= \frac{F \sin \theta - F \sin \theta}{m_0 + m_1} = 0 \\   \ddot x_{cm} &= \frac{F \cos \theta - F \cos \theta}{m_0 + m_1} = 0 \\   \end{aligned}}

.

\displaystyle{ \begin{aligned}   y_0 &= y_{cm} - \frac{m_1}{M} c(t) \sin \theta \\   x_0 &= x_{cm} - \frac{m_1}{M} c(t) \cos \theta \\     y_1 &= y_{cm} + \frac{m_0}{M} c(t) \sin \theta \\   x_1 &= x_{cm} + \frac{m_0}{M} c(t) \cos \theta \\   \end{aligned}}

\displaystyle{ \begin{aligned}   x_1 - x_0 &= \frac{m_0}{M} c(t) \cos \theta + \frac{m_1}{M} c(t) \cos \theta \\   &= c(t) \cos \theta \\   \end{aligned}}

\displaystyle{ \begin{aligned}   \dot x_1 - \dot x_0 &= \dot c(t) \cos \theta - c(t) \dot \theta \sin \theta \\   \end{aligned}}

\displaystyle{ \begin{aligned}   \ddot x_1 - \ddot x_0 &=   \ddot c(t) \cos \theta - \dot c(t) \dot \theta \sin \theta   - \dot c(t) \dot \theta \sin \theta - c(t) \ddot \theta \sin \theta - c(t) \dot \theta^2 \cos \theta\\   \end{aligned}}

\displaystyle{ \begin{aligned}   y_1 - y_0 &= c(t) \sin \theta \\   \dot y_1 - \dot y_0 &= \dot c(t) \sin \theta + c(t) \dot \theta \cos \theta \\   \ddot y_1 - \ddot y_0   &=   \ddot c(t) \sin \theta + \dot c(t) \dot \theta \cos \theta   + \dot c(t) \dot \theta \cos \theta + c(t) \ddot \theta \cos \theta - c(t) \dot \theta^2 \sin \theta   \\   \end{aligned}}

.

\displaystyle{ \begin{aligned}   m_0 \ddot y_0 &= F \sin \theta \\   m_0 \ddot x_0 &= F \cos \theta \\   m_1 \ddot y_1 &= -F \sin \theta \\   m_1 \ddot x_1 &= -F \cos \theta \\   \end{aligned}}

When \displaystyle{\dot c(t) = 0} and \displaystyle{\ddot c(t) = 0},

\displaystyle{ \begin{aligned}   \ddot x_1 - \ddot x_0 &= - c(t) \ddot \theta \sin \theta - c(t) \dot \theta^2 \cos \theta \\     - \left( \frac{1}{m_1} + \frac{1}{m_1} \right) F \cos \theta &= - c(t) \ddot \theta \sin \theta - c(t) \dot \theta^2 \cos \theta\\   \end{aligned}}

\displaystyle{ \begin{aligned}     \ddot y_1 - \ddot y_0 &= ... \\     - \left( \frac{1}{m_1} + \frac{1}{m_0} \right) F \sin \theta &= c(t) \ddot \theta \cos \theta - c(t) \dot \theta^2 \sin \theta \\   \end{aligned}}

.

\displaystyle{ \begin{aligned}   \tan \theta &= \frac{ c(t) \ddot \theta \cos \theta - c(t) \dot \theta^2 \sin \theta }{- c(t) \ddot \theta \sin \theta - c(t) \dot \theta^2 \cos \theta} \\   &= \frac{ \ddot \theta - \dot \theta^2 \tan \theta }{- \ddot \theta \tan \theta - \dot \theta^2} \\   \end{aligned}}

\displaystyle{ \begin{aligned}   \tan \theta \left( - \ddot \theta \tan \theta - \dot \theta^2 \right) &= \ddot \theta - \dot \theta^2 \tan \theta \\   &... \\   0 &= \ddot \theta (1 + \tan^2 \theta) \\   \ddot \theta &= 0 \\   \end{aligned}}

.

\displaystyle{ \begin{aligned}   - \left( \frac{1}{m_1} + \frac{1}{m_0} \right) F \sin \theta &= c(t) \ddot \theta \cos \theta - c(t) \dot \theta^2 \sin \theta \\   - \left( \frac{1}{m_1} + \frac{1}{m_1} \right) F \cos \theta &= - c(t) \ddot \theta \sin \theta - c(t) \dot \theta^2 \cos \theta\\   \end{aligned}}

Let \displaystyle{\frac{1}{\mu} = \left( \frac{1}{m_1} + \frac{1}{m_1} \right)} and since \displaystyle{\ddot \theta = 0},

\displaystyle{ \begin{aligned}   - \frac{1}{\mu} F \sin \theta &= - c(t) \dot \theta^2 \sin \theta \\   - \frac{1}{\mu} F \cos \theta &= - c(t) \dot \theta^2 \cos \theta\\   \end{aligned}}

Since \displaystyle{\sin \theta} and \displaystyle{\cos \theta} cannot be both zero at the same time,

\displaystyle{ \begin{aligned}   - \frac{1}{\mu} F &= - c(t) \dot \theta^2 \\   \end{aligned}}

Put \displaystyle{c(t) = l},

\displaystyle{ \begin{aligned}   \frac{1}{\mu} F &= l \dot \theta^2 \\   \dot \theta^2 &= \frac{1}{l \mu} F \\   \end{aligned}}

[guess]

— Me@2021-08-08 05:41:21 PM

.

.

2021.08.10 Tuesday (c) All rights reserved by ACHK

Ex 1.21 The dumbbell, 2.2.2

[guess]


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

(define ((L-free-constrained m0 m1 l) local)
  (let* ((extract (extract-particle 2))
	 (p0 (extract local 0))
	 (q0 (coordinate p0))
	 (qdot0 (velocity p0))
 
	 (p1 (extract local 1))
	 (q1 (coordinate p1))
	 (qdot1 (velocity p1))
 
	 (F (ref (coordinate local) 4)))

    (- (+ (KE-particle m0 qdot0)
	      (KE-particle m1 qdot1))
          (U-constraint q0 q1 F l))))

(let ((L (L-free-constrained 'm_0 'm_1 'l)))
  (show-expression
   ((compose L (Gamma q-rect)) 't)))

\displaystyle{  \frac{1}{2} m_0 \left( \dot x_0^2 + \dot y_0^2 \right)  + \frac{1}{2} m_1 \left( \dot x_1^2 + \dot y_1^2 \right)  + \frac{F}{2 l} \left( l^2 - y_1^2 + 2 y_0 y_1 - x_1^2 + 2 x_0 x_1 - y_0^2 - x_0^2 \right)  }

\displaystyle{  = \frac{1}{2} m_0 \left( \dot x_0^2 + \dot y_0^2 \right)  + \frac{1}{2} m_1 \left( \dot x_1^2 + \dot y_1^2 \right)  - \frac{F}{2 l} \left[ (y_1 - y_0)^2 + (x_1 - x_0)^2 - l^2 \right]  }


(define ((local_ m0 m1 l) local)
  (let* ((extract (extract-particle 2))
	 (p0 (extract local 0))
	 (q0 (coordinate p0))
	 (qdot0 (velocity p0))
 
	 (p1 (extract local 1))
	 (q1 (coordinate p1))
	 (qdot1 (velocity p1))
 
	 (F (ref (coordinate local) 4)))
    local))

(show-expression
 ((compose (local_ 'm_0 'm_1 'l) (Gamma q-rect)) 't))


(define ((p0_ m0 m1 l) local)
  (let* ((extract (extract-particle 2))
	 (p0 (extract local 0))
	 (q0 (coordinate p0))
	 (qdot0 (velocity p0))
 
	 (p1 (extract local 1))
	 (q1 (coordinate p1))
	 (qdot1 (velocity p1))
 
	 (F (ref (coordinate local) 4)))
    p0))
 
(show-expression
 ((compose (p0_ 'm_0 'm_1 'l) (Gamma q-rect)) 't))


(define ((p1_ m0 m1 l) local)
  (let* ((extract (extract-particle 2))
	 (p0 (extract local 0))
	 (q0 (coordinate p0))
	 (qdot0 (velocity p0))
 
	 (p1 (extract local 1))
	 (q1 (coordinate p1))
	 (qdot1 (velocity p1))
 
	 (F (ref (coordinate local) 4)))
    p1))
 
(show-expression
 ((compose (p1_ 'm_0 'm_1 'l) (Gamma q-rect)) 't))

[guess]

— based on /sicmutils/sicm-exercises

— Me@2021-04-27 05:03:59 PM

.

.

2021.05.11 Tuesday (c) All rights reserved by ACHK

Ex 1.21 The dumbbell, 2.2.1

Structure and Interpretation of Classical Mechanics

.

b. Write the formal Lagrangian

\displaystyle{L(t;x_0, y_0, x_1, y_1, F; \dot x_0, \dot y_0, \dot x_1, \dot y_1, \dot F)}

such that Lagrange’s equations will yield the Newton’s equations you derived in part a.

~~~

[guess]


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

(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 q-rect
  (up (literal-function 'x_0)
      (literal-function 'y_0)
      (literal-function 'x_1)
      (literal-function 'y_1)
      (literal-function 'F)))

(show-expression q-rect)


(show-expression (q-rect 't))


(show-expression (Gamma q-rect))


(show-expression ((Gamma q-rect) 'w))


(show-expression ((Gamma q-rect) 't))


(show-expression (time ((Gamma q-rect) 't)))


(show-expression (coordinate ((Gamma q-rect) 't)))

[guess]

— based on /sicmutils/sicm-exercises

— Me@2021-04-27 05:03:59 PM

.

.

2021.04.28 Wednesday (c) All rights reserved by ACHK

Ex 1.21 The dumbbell, 3

Structure and Interpretation of Classical Mechanics

.

c. Make a change of coordinates to a coordinate system with center of mass coordinates x_{cm}, y_{cm}, angle \theta, distance between the particles c, and tension force F. Write the Lagrangian in these coordinates, and write the Lagrange equations.

~~~

[guess]

\displaystyle{ \begin{aligned}   y_{cm} &= \frac{m_0 y_0 + m_1 y_1}{m_0 + m_1} \\   x_{cm} &= \frac{m_0 x_0 + m_1 x_1}{m_0 + m_1} \\   \end{aligned}}

\displaystyle{ \begin{aligned}   y_{cm} &= \frac{m_0 y_0 + m_1 (y_0 + c(t) \sin \theta)}{m_0 + m_1} \\   x_{cm} &= \frac{m_0 x_0 + m_1 (x_0 + c(t) \cos \theta)}{m_0 + m_1} \\   \end{aligned}}

.

Let \displaystyle{M = m_0 + m_1}.

\displaystyle{ \begin{aligned}   y_{cm} &= \frac{M y_0 + m_1 c(t) \sin \theta}{M} \\   x_{cm} &= \frac{M x_0 + m_1 c(t) \cos \theta}{M} \\   \end{aligned}}

\displaystyle{ \begin{aligned}   y_0 &= y_{cm} - \frac{m_1}{M} c(t) \sin \theta \\   x_0 &= x_{cm} - \frac{m_1}{M} c(t) \cos \theta \\   \end{aligned}}

\displaystyle{ \begin{aligned}   y_1 &= y_{cm} + \frac{m_0}{M} c(t) \sin \theta \\   x_1 &= x_{cm} + \frac{m_0}{M} c(t) \cos \theta \\   \end{aligned}}

.

The Lagrangian

\displaystyle{ \begin{aligned}   L &= \frac{1}{2} m_0 (\dot x_0^2 + \dot y_0^2) + \frac{1}{2} m_1 (\dot x_1^2 + \dot y_1^2) + \lambda \left[ (x_1(t) - x_0(t))^2 + (y_1(t) - y_0(t))^2 - l^2 \right] \\     &= \frac{1}{2} m_0 (\dot x_0^2 + \dot y_0^2) + \frac{1}{2} m_1 (\dot x_1^2 + \dot y_1^2)   - \frac{F}{2l} \left[ (c(t))^2 - l^2 \right] \\   \end{aligned}}

.

\displaystyle{ \begin{aligned}   \dot y_0 &= \dot y_{cm} - \frac{m_1}{M} \dot c(t) \sin \theta - \frac{m_1}{M} c(t) \dot \theta \cos \theta\\  \dot x_0 &= \dot x_{cm} - \frac{m_1}{M} \dot c(t) \cos \theta - \frac{m_1}{M} c(t) \dot \theta \sin \theta \\   \end{aligned}}

[guess]

— Me@2021-04-17 05:40:46 PM

.

.

2021.04.18 Sunday (c) All rights reserved by ACHK

Ex 1.21 The dumbbell, 2

Structure and Interpretation of Classical Mechanics

.

Notice that these forces of constraint are proportional to the normal to the constraint surface at each instant and thus do no work for motions that obey the constraint.

b. Write the formal Lagrangian

\displaystyle{L(t;x_0, y_0, x_1, y_1, F; \dot x_0, \dot y_0, \dot x_1, \dot y_1, \dot F)}

such that Lagrange’s equations will yield the Newton’s equations you derived in part a.

~~~

[guess]

Eq (1.99):

\displaystyle{L(t;x,\lambda; \dot x, \dot \lambda) = \sum_\alpha \frac{1}{2} m_\alpha \dot{\mathbf{x}}_\alpha^2 - V(t,x) + \lambda \phi(t,x)}

\displaystyle{  \begin{aligned}  L &= \frac{1}{2} m_0 (\dot x_0^2 + \dot y_0^2) + \frac{1}{2} m_1 (\dot x_1^2 + \dot y_1^2) + \lambda \left[ (x_1(t) - x_0(t))^2 + (y_1(t) - y_0(t))^2 - l^2 \right] \\   \end{aligned}}

.

The Lagrange equation:

\displaystyle{ \begin{aligned}   D ( \partial_2 L \circ \Gamma[q]) - (\partial_1 L \circ \Gamma[q]) &= 0 \\   \end{aligned}}

\displaystyle{ \begin{aligned}   \frac{d}{dt} \frac{\partial L}{\partial \dot x_0} - \frac{\partial L}{\partial x_0} &= 0 \\   \frac{d}{dt} \frac{\partial L}{\partial \dot x_1} - \frac{\partial L}{\partial x_1} &= 0 \\   \frac{d}{dt} \frac{\partial L}{\partial \dot y_0} - \frac{\partial L}{\partial y_0} &= 0 \\   \frac{d}{dt} \frac{\partial L}{\partial \dot y_1} - \frac{\partial L}{\partial y_1} &= 0 \\   \frac{d}{dt} \frac{\partial L}{\partial \dot \lambda} - \frac{\partial L}{\partial \lambda} &= 0 \\  \end{aligned}}

\displaystyle{ \begin{aligned}   \frac{d}{dt} \left( m_0 \dot x_0 \right) + \left( \lambda 2 (x_1 - x_0)\right) &= 0 \\   \frac{d}{dt} \left( m_0 \dot x_1 \right) - \left( \lambda 2 (x_1 - x_0)\right) &= 0 \\   \frac{d}{dt} \left( m_0 \dot y_0 \right) + \left( \lambda 2 (y_1 - y_0)\right) &= 0 \\   \frac{d}{dt} \left( m_0 \dot y_1 \right) - \left( \lambda 2 (y_1 - y_0)\right) &= 0 \\   \frac{d}{dt} \left( 0 \right) - \left[ (x_1(t) - x_0(t))^2 + (y_1(t) - y_0(t))^2 - l^2 \right] &= 0 \\  \end{aligned}}

\displaystyle{ \begin{aligned}   m_0 \ddot x_0 &= - 2 \lambda (x_1 - x_0) \\   m_0 \ddot x_1 &= 2 \lambda (x_1 - x_0) \\   m_0 \ddot y_0 &= - 2 \lambda (y_1 - y_0) \\   m_0 \ddot y_1 &= 2 \lambda (y_1 - y_0) \\   (x_1(t) - x_0(t))^2 + (y_1(t) - y_0(t))^2 - l^2 &= 0 \\  \end{aligned}}

.

Let \displaystyle{\lambda = - \frac{F}{2l}}:

\displaystyle{ \begin{aligned}   m_0 \ddot x_0 &= F \frac{(x_1 - x_0)}{l} \\   m_0 \ddot x_1 &= -F \frac{(x_1 - x_0)}{l} \\   m_0 \ddot y_0 &= F \frac{(y_1 - y_0)}{l} \\   m_0 \ddot y_1 &= -F \frac{(y_1 - y_0)}{l} \\   \end{aligned}}

\displaystyle{ \begin{aligned}   m_0 \ddot y_0 &= F \sin \theta \\   m_0 \ddot x_0 &= F \cos \theta \\   m_0 \ddot y_1 &= -F \sin \theta \\   m_0 \ddot x_1 &= -F \cos \theta \\   \end{aligned}}

[guess]

— Me@2021-04-09 11:18:07 PM

.

.

2021.04.10 Saturday (c) All rights reserved by ACHK

Ex 1.21 The dumbbell

Consider two massive particles in the plane constrained by a massless rigid rod to remain a distance l apart, as in figure 1.5.

a. Write Newton’s equations for the balance of forces for the four rectangular coordinates of the two particles, given that the scalar tension in the rod is F.

~~~

[guess]

\displaystyle{m_0 \ddot y_0 = F \sin \theta}

\displaystyle{m_0 \ddot x_0 = F \cos \theta}

\displaystyle{m_1 \ddot y_1 = - F \sin \theta}

\displaystyle{m_1 \ddot x_1 = - F \cos \theta}

[guess]

— Me@2021-04-04 03:51:05 PM

.

.

2021.04.04 Sunday (c) All rights reserved by ACHK

Ex 1.20 Sliding pendulum

Structure and Interpretation of Classical Mechanics

.

Consider a pendulum of length l attached to a support that is free to move horizontally, as shown in figure 1.4. Let the mass of the support be m_1 and the mass of the pendulum be m_2. Formulate a Lagrangian and derive Lagrange’s equations for this system.

~~~

[guess]


(define ((F->C F) local)
  (->local (time local)
           (F local)
           (+ (((partial 0) F) local)
              (* (((partial 1) F) local) 
                 (velocity local)))))

;

(define ((q->r l y1) local)
  (let ((q (coordinate local)))
    (let ((x1 (ref q 0))
          (theta (ref q 1)))
      (let ((x2 (+ x1 (* l (sin theta))))
            (y2 (- y1 (* l (cos theta)))))
        (up x1 y1 x2 y2)))))

(show-expression
  ((q->r 'l 'y_1) 
     (up 't
         (up 'x_1 'theta)
         (up 'xdot_1 'thetadot))))

;
 
(define (KE m vx vy)
  (* 1/2 m (+ (square vx) (square vy))))

(define ((T-rect m1 m2) local)
  (let ((q (coordinate local))
        (v (velocity local)))
    (let ((x1dot (ref v 0))
          (y1dot (ref v 1))
          (x2dot (ref v 2))
          (y2dot (ref v 3)))
      (+ (KE m1 x1dot y1dot)
         (KE m2 x2dot y2dot)))))

(show-expression
 ((T-rect 'm_1 'm_2)
    (up 't
        (up 'x_1 'y_1 'x_2 'y_2)
        (up 'xdot_1 'ydot_1 'xdot_2 'ydot_2))))
 
;

(define ((U-rect g m1 m2) local)
   (let* ((q (coordinate local))
     (y1 (ref q 1))
     (y2 (ref q 3)))
     (* g (+ (* m1 y1)
             (* m2 y2)))))

(show-expression
 ((U-rect 'g 'm_1 'm_2)
    (up 't
        (up 'x_1 'y_1 'x_2 'y_2)
        (up 'xdot_1 'ydot_1 'xdot_2 'ydot_2))))

;

(define (L-rect g m1 m2)
  (- (T-rect m1 m2) (U-rect g m1 m2)))

(show-expression
 ((L-rect 'g 'm_1 'm_2)
    (up 't
        (up 'x_1 'y_1 'x_2 'y_2)
        (up 'xdot_1 'ydot_1 'xdot_2 'ydot_2))))

;

(define (L-l l y1 g m_1 m_2)
  (compose
   (L-rect g m_1 m_2) (F->C (q->r l y1))))

(show-expression
 ((L-l 'l 'y_1 'g 'm_1 'm_2)
  (->local 't
	   (up 'x_1 'theta)
	   (up 'xdot_1 'thetadot))))

; 

(show-expression
 (((Lagrange-equations
    (L-l 'l 'y_1 'g 'm_1 'm_2))
   (up
    (literal-function 'x_1)
    (literal-function 'theta)))
  't))

;

[guess]

— Me@2021-03-26 08:22:01 PM

.

.

2021.03.28 Sunday (c) All rights reserved by ACHK

Ex 1.19 A two-bar linkage, 2

Structure and Interpretation of Classical Mechanics

.

… Formulate a Lagrangian that describes the system and find the Lagrange equations of motion …

~~~

[guess]


(define ((U-rect g m1 m2 m3) local)
   (let* ((q (coordinate local))
 	 (y1 (ref q 1))
 	 (y2 (ref q 3))
 	 (y3 (ref q 5)))
     (* g (+ (* m1 y1)
	         (* m2 y2)
	         (* m3 y3)))))

;

(define (L-rect g m1 m2 m3)
  (- (T-rect m1 m2 m3) (U-rect g m1 m2 m3)))

(show-expression
 ((L-rect 'g 'm_1 'm_2 'm_3)
    (up 't
        (up 'x_1 'y_1 'x_2 'y_2 'x_3 'y_3)
        (up 'xdot_1 'ydot_1 'xdot_2 'ydot_2 'xdot_3 'ydot_3))))

;

(define (L-l l1 l2 g m_1 m_2 m_3)
  (compose
   (L-rect g m_1 m_2 m_3) (F->C (q->r l1 l2))))

(show-expression
 ((L-l 'l_1 'l_2 'g 'm_1 'm_2 'm_3)
  (->local 't
	       (up 'x_2 'y_2 'theta 'phi)
	       (up 'xdot_2 'ydot_2 'thetadot 'phidot))))

;

(show-expression
 (((Lagrange-equations
    (L-l 'l_1 'l_2 'g 'm_1 'm_2 'm_3))
   (up
    (literal-function 'x_2)
    (literal-function 'y_2)
    (literal-function 'theta)
    (literal-function 'phi)))
  't))

;

[guess]

— Me@2021-03-20 05:01:21 PM

.

.

2021.03.20 Saturday (c) All rights reserved by ACHK

Ex 1.19 A two-bar linkage

Structure and Interpretation of Classical Mechanics

.

The two-bar linkage shown in figure 1.3 is constrained to move in the plane. It is composed of three small massive bodies interconnected by two massless rigid rods in a uniform gravitational field with vertical acceleration \displaystyle{g}. The rods are pinned to the central body by a hinge that allows the linkage to fold. The system is arranged so that the hinge is completely free: the members can go through all configurations without collision. Formulate a Lagrangian that describes the system and find the Lagrange equations of motion. Use the computer to do this, because the equations are rather big.

~~~

[guess]


(define ((F->C F) local)
  (->local (time local)
           (F local)
           (+ (((partial 0) F) local)
              (* (((partial 1) F) local) 
                 (velocity local)))))
 
;

(define ((q->r l1 l2) local)
  (let ((q (coordinate local)))
    (let ((x2 (ref q 0))
	      (y2 (ref q 1))
	      (theta (ref q 2)) 
          (phi (ref q 3)))
      (let ((x1 (+ x2 (* l1 (cos theta))))
	        (y1 (+ y2 (* l1 (sin theta))))
	        (x3 (+ x2 (* l2 (cos phi))))
	        (y3 (+ y2 (* l2 (sin phi)))))
        (up x1 y1 x2 y2 x3 y3)))))

;

(show-expression
  ((q->r 'l_1 'l_2) 
     (up 't
	     (up 'x_2 'y_2 'theta 'phi)
	     (up 'xdot_2 'ydot_2 'thetadot 'phidot))))

;

(define (KE m vx vy)
  (* 1/2 m (+ (square vx) (square vy))))

(define ((T-rect m1 m2 m3) local)
  (let ((q (coordinate local))
        (v (velocity local)))
    (let ((x1dot (ref v 0))
          (y1dot (ref v 1))
	      (x2dot (ref v 2))
	      (y2dot (ref v 3))
	      (x3dot (ref v 4))
	      (y3dot (ref v 5)))
      (+ (KE m1 x1dot y1dot)
  	     (KE m2 x2dot y2dot)
	     (KE m3 x3dot y3dot)))))

(show-expression
 ((T-rect 'm_1 'm_2 'm_3)
    (up 't
	    (up 'x_1 'y_1 'x_2 'y_2 'x_3 'y_3)
	    (up 'xdot_1 'ydot_1 'xdot_2 'ydot_2 'xdot_3 'ydot_3))))

;

[guess]

— Me@2021-03-12 05:37:27 PM

.

.

2021.03.14 Sunday (c) All rights reserved by ACHK

Ex 1.18 Bead on a triaxial surface, 2

Structure and Interpretation of Classical Mechanics

.

A bead of mass m moves without friction on a triaxial ellipsoidal surface. In rectangular coordinates the surface satisfies

\displaystyle{\frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} = 1}

for some constants a, b, and c. Identify suitable generalized coordinates, formulate a Lagrangian, and find Lagrange’s equations.

~~~

[guess]

The generalized coordinates:

\displaystyle{\begin{aligned}  x &= a \sin(\theta )\cos(\varphi),\\  y &= b \sin(\theta )\sin(\varphi),\\  z &= c \cos(\theta),  \end{aligned}}

where

{\displaystyle 0\leq \theta \leq \pi ,\qquad 0\leq \varphi <2\pi .}

.

{\displaystyle {\begin{aligned} \dot x &= a \dot \theta \cos(\theta) \cos(\varphi) - a \dot \varphi\sin(\theta ) \sin(\varphi) \\ \dot y &= b \dot \theta \cos(\theta) \sin(\varphi) + b \dot \varphi \sin(\theta) \cos(\varphi) \\ \dot z &= - c \dot \theta \sin(\theta) \end{aligned}}}


(define ((F->C F) local)
  (->local (time local)
           (F local)
           (+ (((partial 0) F) local)
              (* (((partial 1) F) local) 
                 (velocity local)))))

;

(define ((e->r a b c) local)
  (let ((q (coordinate local)))
    (let ((theta (ref q 0)) 
          (phi (ref q 1)))
      (let ((x (* a (sin theta) (cos phi)))
	    (y (* b (sin theta) (sin phi)))
	    (z (* c (cos theta))))
        (up x y z)))))

;

(define ((L-rect m) local)
  (let ((q (coordinate local))
        (v (velocity local)))
    (* 1/2 m (square v))))

(define (L-e m a b c)
  (compose (L-rect m) (F->C (e->r a b c))))

;

(show-expression
  ((L-e 'm 'a 'b 'c)
   (->local 't
             (up 'theta 'phi) 
             (up 'thetadot 'phidot))))

;

(show-expression
 (((Lagrange-equations
    (L-e 'm 'a 'b 'c))
   (up (literal-function 'theta) (literal-function 'phi)))
  't))
 

[guess]

— Me@2021-03-01 06:22:50 PM

.

.

2021.03.02 Tuesday (c) All rights reserved by ACHK

Ex 1.18 Bead on a triaxial surface

Structure and Interpretation of Classical Mechanics

.

A bead of mass m moves without friction on a triaxial ellipsoidal surface. In rectangular coordinates the surface satisfies

\displaystyle{\frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} = 1}

for some constants a, b, and c. Identify suitable generalized coordinates, formulate a Lagrangian, and find Lagrange’s equations.

~~~

[guess]

The generalized coordinates:

{\displaystyle {\begin{aligned}x&=a\sin(\theta )\cos(\varphi),\\y&=b\sin(\theta )\sin(\varphi),\\z&=c\cos(\theta),\end{aligned}}\,\!}

where

{\displaystyle 0\leq \theta \leq \pi ,\qquad 0\leq \varphi <2\pi .}

.

{\displaystyle {\begin{aligned}  \dot x &= a \dot \theta \cos(\theta) \cos(\varphi) - a \dot \varphi\sin(\theta ) \sin(\varphi) \\  \dot y &= b \dot \theta \cos(\theta) \sin(\varphi) + b \dot \varphi \sin(\theta) \cos(\varphi) \\  \dot z &= - c \dot \theta \sin(\theta)   \end{aligned}}}


(define theta (literal-function 'theta))

(define phi (literal-function 'phi))

; 

(define (x t) (* 'a (sin (theta t)) (cos (phi t))))

((D x) 't)

(show-expression ((D x) 't))

;

(define (y t) (* 'b (sin (theta t)) (sin (phi t))))

(show-expression (y 't))

((D y) 't)

(show-expression ((D y) 't))

[guess]

— Me@2021-02-16 07:20:25 AM

.

.

2021.02.18 Thursday (c) All rights reserved by ACHK

Ex 1.17 Bead on a helical wire

Structure and Interpretation of Classical Mechanics

.

A bead of mass m is constrained to move on a frictionless helical wire. The helix is oriented so that its axis is horizontal. The diameter of the helix is d and its pitch (turns per unit length) is h. The system is in a uniform gravitational field with vertical acceleration g. Formulate a Lagrangian that describes the system and find the Lagrange equations of motion.

~~~

[guess]

The coordinates of the bead is

\displaystyle{\left( \frac{d}{2} \cos \theta, \frac{d}{2} \sin \theta, \frac{\theta}{2 \pi} h \right)},

where the \displaystyle{x}-direction is horizontal, the \displaystyle{y}-direction points upwards, and the \displaystyle{z}-direction is along the axis of the helix.

.

Lagrangian \displaystyle{L = T - V}, where the kinetic energy, \displaystyle{T = \frac{1}{2} m \left( \dot x^2 + \dot y^2 + \dot z^2 \right)} and the potential energy, \displaystyle{V = m g y}.

\displaystyle{ (\dot x, \dot y, \dot z) = \left( \frac{-d}{2} (\sin \theta) \dot \theta, \frac{d}{2} (\cos \theta) \dot \theta, \frac{h}{2 \pi} \dot \theta \right)}

\displaystyle{L = \frac{1}{2} m \left( \frac{d^2}{4} + \frac{h^2}{4 \pi^2} \right) \dot \theta^2 - \frac{d}{2} m g \sin \theta}

\displaystyle{\frac{\partial L}{\partial \dot \theta} = m \left( \frac{d^2}{4} + \frac{h^2}{4 \pi^2} \right) \dot \theta}
\displaystyle{\frac{\partial L}{\partial \theta} = - \frac{d}{2} m g \cos \theta}

.

The Lagrange equation:

\displaystyle{ \begin{aligned} D ( \partial_2 L \circ \Gamma[q]) - (\partial_1 L \circ \Gamma[q]) &= 0 \\   \frac{d}{dt} \frac{\partial L}{\partial \dot \theta} - \frac{\partial L}{\partial \theta} &= 0 \\    m \left( \frac{d^2}{4} + \frac{h^2}{4 \pi^2} \right) \ddot{\theta} + \frac{d}{2} m g \cos \theta &= 0 \\   \end{aligned}}

.


(define ((T-hl d h m g) local)
  (let ((t (time local))
        (thetadot (velocity local)))    
    (* 1/8 m (square thetadot) 'H)))

;; (+ (square d) 
;; (/ (square h) (square 'pi))))))

(show-expression
  ((T-hl 'd 'h 'm 'g)
    (->local 't
             'theta
             'thetadot)))

(define ((V-hl d h m g) local)
  (let ((t (time local))
        (theta (coordinate local)))
    (let ((y (* 1/2 d (sin theta))))
      (* m g y))))


(show-expression
  ((V-hl 'd 'h 'm 'g)
    (->local 't
             'theta
             'thetadot)))

(define L-hl (- T-hl V-hl))

(show-expression
  ((L-hl 'd 'h 'm 'g)
    (->local 't
             'theta
             'thetadot)))

(show-expression
 (((Lagrange-equations
    (L-hl 'd 'h 'm 'g))
   (literal-function 'theta))
  't))

[guess]

— Me@2021-02-05 04:23:02 PM

.

.

2021.02.06 Saturday (c) All rights reserved by ACHK

Ex 1.15 Central force motion

Structure and Interpretation of Classical Mechanics

.

Find Lagrangians for central force motion in three dimensions in rectangular coordinates and in spherical coordinates. First, find the Lagrangians analytically, then check the results with the computer by generalizing the programs that we have presented.

~~~

The Lagrangians in rectangular coordinates:

\displaystyle{ \begin{aligned}   &L (t; x, y, x; v_x, v_y, v_z) \\  &= \frac{1}{2} m \left( v_x^2 + v_y^2 + v_z^2 \right) - U \left( \sqrt{x^2 + y^2 + z^2} \right) \\   \end{aligned}}

The Lagrangians in spherical coordinates:

\displaystyle{ \begin{aligned}   &L (t; r, \theta, \phi; \dot r, \dot \theta, \dot \phi) \\  &= \frac{1}{2} m r^2 \dot \phi^2 (\sin \theta)^2 + \frac{1}{2} m \dot \theta^2 r^2 + \frac{1}{2} m \dot r^2 - U (r) \\   &= \frac{1}{2} m \left( \dot r^2 + r^2 \dot \theta^2 + r^2 (\sin^2 \theta) \dot \phi^2 \right) - U (r) \\   \end{aligned}}

.


(define ((F->C F) local)
  (->local (time local)
           (F local)
           (+ (((partial 0) F) local)
              (* (((partial 1) F) local) 
                 (velocity local)))))

(define (p->r local)
  (let ((polar-tuple (coordinate local)))
    (let ((r (ref polar-tuple 0)) 
          (theta (ref polar-tuple 1))
	  (phi (ref polar-tuple 2)))
      (let ((x (* r (sin theta) (cos phi))) 
            (y (* r (sin theta) (sin phi)))
	    (z (* r (cos theta))))
        (up x y z)))))

(define ((L-central-rectangular m U) local)
  (let ((q (coordinate local))
        (v (velocity local)))
    (- (* 1/2 m (square v))
       (U (sqrt (square q))))))

(define (L-central-polar m U)
  (compose (L-central-rectangular m U) (F->C p->r)))

(show-expression
  ((L-central-polar 'm (literal-function 'U))
   (->local 't 
             (up 'r 'theta 'phi) 
             (up 'rdot 'thetadot 'phidot))))

.

— Me@2021-01-22 02:59:11 PM

.

.

2021.01.22 Friday (c) All rights reserved by ACHK

Ex 1.14 Lagrange equations for L’, 2

Structure and Interpretation of Classical Mechanics

.

Show by direct calculation that the Lagrange equations for \displaystyle{L'} are satisfied if the Lagrange equations for \displaystyle{L} are satisfied.

~~~

\displaystyle{x = F(t, x')}

\displaystyle{x' = G(t, x)}

.

\displaystyle{ \begin{aligned} &\partial_2 L \circ \Gamma[q] \\   &= \frac{\partial}{\partial v} L(t, x, v) \\   &= \frac{\partial}{\partial v} L'(t, x', v') \\   &= \frac{\partial}{\partial x'} L'(t, x', v') \frac{\partial x'}{\partial v} + \frac{\partial}{\partial v'} L'(t, x', v') \frac{\partial v'}{\partial v} \\   &= \frac{\partial}{\partial v'} L'(t, x', v') \frac{\partial v'}{\partial v} \\  \end{aligned}}

.

\displaystyle{v' = \partial_0 G(t, x) + \partial_1 G(t,x) v}

\displaystyle{ \begin{aligned}   \frac{\partial v'}{\partial v} &= \partial_1 G(t,x) = \frac{\partial x'}{\partial x}  \\  \end{aligned}}

.

\displaystyle{ \begin{aligned} &\partial_2 L \circ \Gamma[q] \\   &= \frac{\partial L'}{\partial v'} \frac{\partial x'}{\partial x}  \\  \end{aligned}}

.

The Lagrange equation:

\displaystyle{ \begin{aligned} D ( \partial_2 L \circ \Gamma[q]) - (\partial_1 L \circ \Gamma[q]) &= 0 \\ \end{aligned}}

.

\displaystyle{   \begin{aligned}   &\partial_1 L \circ \Gamma[q] \\  &= \partial_1 L' \circ \Gamma[q'] \\    &= \frac{\partial}{\partial x} L' (t, x', v') \\    &= \frac{\partial L'}{\partial x'}  \frac{\partial x'}{\partial x} + \frac{\partial L'}{\partial v'} \frac{\partial v'}{\partial x} \\    \end{aligned}}

.

\displaystyle{ \begin{aligned}   D ( \partial_2 L \circ \Gamma[q]) - (\partial_1 L \circ \Gamma[q]) &= 0 \\   D \left(  \frac{\partial L'}{\partial v'} \frac{\partial x'}{\partial x} \right) - \left( \frac{\partial L'}{\partial x'}  \frac{\partial x'}{\partial x} + \frac{\partial L'}{\partial v'} \frac{\partial v'}{\partial x} \right) &= 0 \\   D \left(  \frac{\partial L'}{\partial v'} \right) \frac{\partial x'}{\partial x}   + \frac{\partial L'}{\partial v'} D \left( \frac{\partial x'}{\partial x} \right)   - \left( \frac{\partial L'}{\partial x'} \frac{\partial x'}{\partial x} + \frac{\partial L'}{\partial v'} \frac{\partial v'}{\partial x} \right) &= 0 \\   \end{aligned}}

\displaystyle{ \begin{aligned}   \left[ D \left(  \frac{\partial L'}{\partial v'} \right) - \frac{\partial L'}{\partial x'} \right] \frac{\partial x'}{\partial x}  + \frac{\partial L'}{\partial v'} D \left( \frac{\partial x'}{\partial x} \right)   - \frac{\partial L'}{\partial v'} \frac{\partial v'}{\partial x} &= 0 \\   \end{aligned}}

.

\displaystyle{ \begin{aligned}   &D \left( \frac{\partial x'}{\partial x} \right) \\   &= \frac{d}{dt} \left( \frac{\partial x'}{\partial x} \right) \\   &=     \frac{\partial}{\partial t} \left( \frac{\partial x'}{\partial x} \right) \frac{\partial t}{\partial t}  + \frac{\partial}{\partial x'} \left( \frac{\partial x'}{\partial x} \right) \frac{\partial x'}{\partial t}  + \frac{\partial}{\partial v'} \left( \frac{\partial x'}{\partial x} \right) \frac{\partial v'}{\partial t} \\   &=     \frac{\partial}{\partial t} \left( \frac{\partial x'}{\partial x} \right)   + \frac{\partial}{\partial x} \left( \frac{\partial x'}{\partial x'} \right) \frac{\partial x'}{\partial t}  + \frac{\partial}{\partial x} \left( \frac{\partial x'}{\partial v'} \right) \frac{\partial v'}{\partial t} \\   &=     \frac{\partial}{\partial t} \left( \frac{\partial x'}{\partial x} \right)   + \frac{\partial}{\partial x} \left( 1 \right) \frac{\partial x'}{\partial t}  + \frac{\partial}{\partial x} \left( 0 \right) \frac{\partial v'}{\partial t} \\   &=     \frac{\partial}{\partial x} \left( \frac{\partial x'}{\partial t} \right)   + 0  + 0 \\   &=     \frac{\partial v'}{\partial x} \\   \end{aligned}}

.

\displaystyle{ \begin{aligned}   \left[ D \left(  \frac{\partial L'}{\partial v'} \right) - \frac{\partial L'}{\partial x'} \right] \frac{\partial x'}{\partial x}   + \frac{\partial L'}{\partial v'} \frac{\partial v'}{\partial x}     - \frac{\partial L'}{\partial v'} \frac{\partial v'}{\partial x} &= 0 \\   \left[ D \left(  \frac{\partial L'}{\partial v'} \right) - \frac{\partial L'}{\partial x'} \right] \frac{\partial x'}{\partial x} &= 0 \\   D \left(  \frac{\partial L'}{\partial v'} \right) - \frac{\partial L'}{\partial x'} &= 0 \\   \end{aligned}}

— Me@2021-01-06 08:10:46 PM

.

.

2021.01.09 Saturday (c) All rights reserved by ACHK

Ex 1.14 Lagrange equations for L’

Structure and Interpretation of Classical Mechanics

.

Show by direct calculation that the Lagrange equations for \displaystyle{L'} are satisfied if the Lagrange equations for \displaystyle{L} are satisfied.

~~~

Equation (1.69):

\displaystyle{C \circ \Gamma[q'] = \Gamma[q]}

Equation (1.70):

\displaystyle{L' = L \circ C}

Equation (1.71):

\displaystyle{L' \circ \Gamma[q'] = L \circ C \circ \Gamma[q'] = L \circ \Gamma[q]}

The Lagrange equation:

\displaystyle{ \begin{aligned} D ( \partial_2 L \circ \Gamma[q]) - (\partial_1 L \circ \Gamma[q]) &= 0 \\ \end{aligned}}

.

\displaystyle{ \begin{aligned}   &\partial_2 L \circ \Gamma[q] \\  &= \frac{\partial}{\partial v} L(t, x, v) \\   &= \frac{\partial}{\partial v} L'(t, x', v') \\   &= \frac{\partial}{\partial x'} L'(t, x', v') \frac{\partial x'}{\partial v} + \frac{\partial}{\partial v'} L'(t, x', v') \frac{\partial v'}{\partial v} \\   \end{aligned}}

.

Since it is just a coordinate transformation \displaystyle{x = F(t, x')}, \displaystyle{x} has no explicitly dependent on \displaystyle{v'}. Similarly, if we consider the coordinate transformation \displaystyle{x' = G(t, x)}, \displaystyle{x'} has no explicitly dependent on \displaystyle{v}. So

\displaystyle{ \begin{aligned}   \frac{\partial x'}{\partial v} &= 0 \\   \end{aligned}}

.

\displaystyle{ \begin{aligned}   &\partial_2 L \circ \Gamma[q] \\  &= \frac{\partial}{\partial v'} L'(t, x', v') \frac{\partial v'}{\partial v} \\   \end{aligned}}

— Me@2020-12-28 04:03:24 PM

.

.

2020.12.28 Monday (c) All rights reserved by ACHK

How to Find Lagrangians

Lagrange’s equations are a system of second-order differential equations. In order to use them to compute the evolution of a mechanical system, we must find a suitable Lagrangian for the system. There is no general way to construct a Lagrangian for every system, but there is an important class of systems for which we can identify Lagrangians in a straightforward way in terms of kinetic and potential energy. The key idea is to construct a Lagrangian L such that Lagrange’s equations are Newton’s equations \displaystyle{\vec F = m \vec a}.

— 1.6 How to Find Lagrangians

— Structure and Interpretation of Classical Mechanics

.

.

2020.12.06 Sunday ACHK

Possion’s Lagrange Equation

Structure and Interpretation of Classical Mechanics

.

Ex 1.10 Higher-derivative Lagrangians

Derive Lagrange’s equations for Lagrangians that depend on accelerations. In particular, show that the Lagrange equations for Lagrangians of the form \displaystyle{L(t, q, \dot q, \ddot q)} with \displaystyle{\ddot{q}} terms are

\displaystyle{D^2(\partial_3L \circ \Gamma[q]) - D(\partial_2 L \circ \Gamma[q]) + \partial_1 L \circ \Gamma[q] = 0}

In general, these equations, first derived by Poisson, will involve the fourth derivative of \displaystyle{q}. Note that the derivation is completely analogous to the derivation of the Lagrange equations without accelerations; it is just longer. What restrictions must we place on the variations so that the critical path satisfies a differential equation?


Varying the action

\displaystyle{ \begin{aligned}   S[q] (t_1, t_2) &= \int_{t_1}^{t_2} L \circ \Gamma [q] \\   \eta(t_1) &= \eta(t_2) = 0 \\   \end{aligned}}

\displaystyle{ \begin{aligned}   \delta_\eta S[q] (t_1, t_2) &= 0 \\   \end{aligned}}

\displaystyle{ \begin{aligned}   \delta_\eta S[q] (t_1, t_2) &= \int_{t_1}^{t_2} \delta_\eta \left( L \circ \Gamma [q] \right) \\   \end{aligned}}

\displaystyle{ \begin{aligned}     \delta_\eta I [q] &= \eta \\  \delta_\eta g[q] &= D \eta~~~\text{with}~~~g[q] = Dq \\   \end{aligned}}

.

Let \displaystyle{h[q] = D^2 q}.

\displaystyle{ \begin{aligned}   \delta_\eta h[q]   &= \lim_{\epsilon \to 0} \frac{h[q+\epsilon \eta] - h[q]}{\epsilon} \\   &= \lim_{\epsilon \to 0} \frac{D^2 (q+\epsilon \eta) - D^2 q}{\epsilon} \\   &= \lim_{\epsilon \to 0} \frac{D^2 q + D^2 \epsilon \eta - D^2 q}{\epsilon} \\   &= \lim_{\epsilon \to 0} \frac{D^2 \epsilon \eta}{\epsilon} \\   &= D^2 \eta \\   \end{aligned}}

\displaystyle{ \begin{aligned}   \Gamma [q] (t) &= (t, q(t), D q(t), D^2 q(t)) \\  \delta_\eta \Gamma [q] (t) &= (0, \eta (t), D \eta (t), D^2 \eta (t)) \\  \end{aligned}}

.

Chain rule of functional variation

\displaystyle{ \begin{aligned} &\delta_\eta F[g[q]] \\   &= \delta_\eta (F \circ g)[q] \\   &= \delta_{ \left( \delta_\eta g[q] \right)} F[g] \\ \end{aligned}}

Since variation commutes with integration,

\displaystyle{ \begin{aligned}   \delta_\eta S[q] (t_1, t_2)   &= \delta_\eta \int_{t_1}^{t_2} L \circ \Gamma [q] \\   &= \int_{t_1}^{t_2} \delta_\eta \left( L \circ \Gamma [q] \right) \\   \end{aligned}}

By the chain rule of functional variation:

\displaystyle{ \begin{aligned}   \delta_\eta L \circ \Gamma [q] = \delta_{ \left( \delta_\eta \Gamma[q] \right)} L[\Gamma[q]] \\   \end{aligned}}

If \displaystyle{L} is path-independent,

\displaystyle{ \begin{aligned}   \delta_\eta \left( L \circ \Gamma [q] \right) = \left( DL \circ \Gamma[q] \right) \delta_\eta \Gamma[q] \\   \end{aligned}}

But is \displaystyle{L} path-independent?

The \displaystyle{L \circ \Gamma [.]} is path-dependent. Its input is a path \displaystyle{q}, not just \displaystyle{q(t)}, the value of \displaystyle{q} at the time \displaystyle{t}. However, \displaystyle{L(.)} itself is a path-independent function, because its input is not a path \displaystyle{q}, but a quadruple of values \displaystyle{(t, q(t), Dq(t), D^2 q(t))}.

\displaystyle{ \begin{aligned}   L \circ \Gamma [q] = L(t, q(t), Dq(t), D^2 q(t)) \\   \end{aligned}}

Since \displaystyle{L} is path-independent,

\displaystyle{ \begin{aligned}   \delta_\eta \left( L \circ \Gamma [q] \right)   = \left( DL \circ \Gamma[q] \right) \delta_\eta \Gamma[q] \\   \end{aligned}}

\displaystyle{ \begin{aligned}   &\delta_\eta S[q] (t_1, t_2) \\  &= \int_{t_1}^{t_2} \delta_\eta L \circ \Gamma [q] \\   &= \int_{t_1}^{t_2} \left( D \left( L \circ \Gamma[q] \right) \right) \delta_\eta \Gamma[q]  \\   &= \int_{t_1}^{t_2} \left( D \left( L(t, q, D q, D^2 q) \right) \right) (0, \eta (t), D \eta (t), D^2 \eta (t))  \\   &= \int_{t_1}^{t_2} \left[ \partial_0 L \circ \Gamma[q], \partial_1 L \circ \Gamma[q], \partial_2 L \circ \Gamma[q], \partial_3 L \circ \Gamma[q] \right] (0, \eta (t), D \eta (t), D^2 \eta (t))  \\   &= \int_{t_1}^{t_2} (\partial_1 L \circ \Gamma[q]) \eta + (\partial_2 L \circ \Gamma[q]) D \eta + (\partial_3 L \circ \Gamma[q]) D^2 \eta \\                        &=   \int_{t_1}^{t_2} (\partial_1 L \circ \Gamma[q]) \eta      + \left[ \left. (\partial_2 L \circ \Gamma[q]) \eta \right|_{t_1}^{t_2} - \int_{t_1}^{t_2} D(\partial_2 L \circ \Gamma[q]) \eta \right]     + \int_{t_1}^{t_2} (\partial_3 L \circ \Gamma[q]) D^2 \eta \\                        \end{aligned}}

Since \displaystyle{\eta(t_1) = 0} and \displaystyle{\eta(t_2) = 0},

\displaystyle{ \begin{aligned}   \delta_\eta S[q] (t_1, t_2)   &=   \int_{t_1}^{t_2} (\partial_1 L \circ \Gamma[q]) \eta      - \int_{t_1}^{t_2} D(\partial_2 L \circ \Gamma[q]) \eta      + \int_{t_1}^{t_2} (\partial_3 L \circ \Gamma[q]) D^2 \eta \\                        \end{aligned}}

Here is a trick for integration by parts:

As long as the boundary term \displaystyle{\left. u(t)v(t) \right|_{t_1}^{t_2} = 0},

\displaystyle{\int_{t_1}^{t_2} u(t) dv(t) = - \int_{t_1}^{t_2} v(t) du(t)}

So if \displaystyle{D \eta(t_1) = 0} and \displaystyle{D \eta(t_2) = 0},

\displaystyle{ \begin{aligned}   \delta_\eta S[q] (t_1, t_2)   &= \int_{t_1}^{t_2} (\partial_1 L \circ \Gamma[q]) \eta        - \int_{t_1}^{t_2} D(\partial_2 L \circ \Gamma[q]) \eta        - \int_{t_1}^{t_2} D(\partial_3 L \circ \Gamma[q]) D \eta \\                        \end{aligned}}

Since \displaystyle{\eta(t_1) = 0} and \displaystyle{\eta(t_2) = 0},

\displaystyle{ \begin{aligned}   \delta_\eta S[q] (t_1, t_2)   &= \int_{t_1}^{t_2} (\partial_1 L \circ \Gamma[q]) \eta        - \int_{t_1}^{t_2} D(\partial_2 L \circ \Gamma[q]) \eta        + \int_{t_1}^{t_2} D^2 (\partial_3 L \circ \Gamma[q]) \eta \\                        \end{aligned}}

\displaystyle{ \begin{aligned}   \delta_\eta S[q] (t_1, t_2)   &= \int_{t_1}^{t_2} \left[ (\partial_1 L \circ \Gamma[q]) - D(\partial_2 L \circ \Gamma[q]) + D^2 (\partial_3 L \circ \Gamma[q]) \right] \eta \\                        \end{aligned}}

By the principle of stationary action, \displaystyle{ \delta_\eta S[q] (t_1, t_2) = 0}. So

\displaystyle{ \begin{aligned}   0   &= \int_{t_1}^{t_2} \left[ (\partial_1 L \circ \Gamma[q]) - D(\partial_2 L \circ \Gamma[q]) + D^2 (\partial_3 L \circ \Gamma[q]) \right] \eta \\                        \end{aligned}}

Since this is true for any function \displaystyle{\eta(t)} that satisfies \displaystyle{\eta(t_1) = \eta(t_2) = 0} and \displaystyle{D\eta(t_1) = D\eta(t_2) = 0},

\displaystyle{ \begin{aligned}   (\partial_1 L \circ \Gamma[q]) - D(\partial_2 L \circ \Gamma[q]) + D^2 (\partial_3 L \circ \Gamma[q]) &= 0 \\                        D^2 (\partial_3 L \circ \Gamma[q]) - D(\partial_2 L \circ \Gamma[q]) + \partial_1 L \circ \Gamma[q] &= 0 \\                        \end{aligned}}

.

Note:

The notation of the path function \displaystyle{\Gamma} is \displaystyle{\Gamma[q](t)}, not \displaystyle{\Gamma[q(t)]}.

The notation \displaystyle{\Gamma[q](t)} means that \displaystyle{\Gamma} takes a path \displaystyle{q} as input. And then returns a path-independent function \displaystyle{\Gamma[q]}, which takes time \displaystyle{t} as input, returns a value \displaystyle{\Gamma[q](t)}.

The other notation \displaystyle{\Gamma[q(t)]} makes no sense, because \displaystyle{\Gamma[.]} takes a path \displaystyle{q}, not a value \displaystyle{q(t)}, as input.

— Me@2020-11-11 05:37:13 PM

.

.

2020.11.11 Wednesday (c) All rights reserved by ACHK

Ex 1.9 Lagrange’s equations

Structure and Interpretation of Classical Mechanics

.

Derive the Lagrange equations for the following systems, showing all of the intermediate steps as in the harmonic oscillator and orbital motion examples.

b. An ideal planar pendulum consists of a bob of mass \displaystyle{m} connected to a pivot by a massless rod of length \displaystyle{l} subject to uniform gravitational acceleration \displaystyle{g}. A Lagrangian is \displaystyle{L(t, \theta, \dot \theta) = \frac{1}{2} m l^2 \dot \theta^2 + mgl \cos \theta}. The formal parameters of \displaystyle{L} are \displaystyle{t}, \displaystyle{\theta}, and \displaystyle{\dot \theta}; \displaystyle{\theta} measures the angle of the pendulum rod to a plumb line and \displaystyle{\dot \theta} is the angular velocity of the rod.

~~~

\displaystyle{ \begin{aligned}   L (t, \xi, \eta) &= \frac{1}{2} m l^2 \eta^2 + m g l \cos \xi \\  \end{aligned}}

\displaystyle{ \begin{aligned}   \partial_1 L (t, \xi, \eta) &= - m g l \sin \xi \\  \partial_2 L (t, \xi, \eta) &= m l^2 \eta  \\  \end{aligned}}

Put \displaystyle{q = \theta},

\displaystyle{ \begin{aligned}   \Gamma[q](t) &= (t; \theta(t); D\theta(t)) \\   \end{aligned}}

\displaystyle{ \begin{aligned}   \partial_1 L \circ \Gamma[q] (t) &= - m g l \sin \theta \\  \partial_2 L \circ \Gamma[q] (t) &= m l^2 D \theta  \\  \end{aligned}}

The Lagrange equation:

\displaystyle{ \begin{aligned}   D ( \partial_2 L \circ \Gamma[q]) - (\partial_1 L \circ \Gamma[q]) &= 0 \\   D (  m l^2 D \theta  ) - ( - m g l \sin \theta ) &= 0 \\   D^2 \theta + \frac{g}{l} \sin \theta &= 0 \\   \end{aligned}}

— Me@2020-09-28 05:40:42 PM

.

.

2020.09.30 Wednesday (c) All rights reserved by ACHK