Ex 1.28 Prequel 1

Structure and Interpretation of Classical Mechanics

.

An analogous result holds when the f_\alpha‘s depend explicitly on time.

a. Show that in this case the kinetic energy contains terms that are linear in the generalized velocities.

~~~

Eq. (1.141):

\displaystyle{  \textbf{v}_\alpha = \partial_0 f_\alpha (t,q) + \partial_1 f_\alpha (t, q) v  }

Eq. (1.142):

\displaystyle{T(t, q, v) = \frac{1}{2} \sum_{\alpha} m_\alpha v^2_\alpha}

Eq. (1.133):

\displaystyle{  \begin{aligned}  \mathcal{P}_i &= (\partial_2 L)_i \\   \end{aligned}}

where \displaystyle{\mathcal{P}} is called the generalized momentum.

.

\displaystyle{  \begin{aligned}  \mathcal{P} \dot Q &= (\partial_2 L) \dot Q  \\   &= (\partial_2 (T-V)) \dot Q  \\   &= (\partial_2 T) \dot Q  \\   \end{aligned}}

where \displaystyle{\dot Q} is the velocity selector. And V has no velocity component?

.

“… T is a homogeneous function of the generalized velocities of degree 2.”

\displaystyle{  \begin{aligned}  n &= 2 \\   (\partial_2 T) \dot Q &= ? \\   \end{aligned}}

\displaystyle{  \begin{aligned}  x Df(x) &= nf(x)  \\   \end{aligned}}

.

What does the D actually mean?

\displaystyle{ \begin{aligned}    x Df(x) &= nf(x)  \\   x \frac{d}{dx} f(x) &= nf(x)  \\   \end{aligned}}

\displaystyle{ \begin{aligned}    \mathbf{v} D T (\mathbf{v}) &= 2 T (\mathbf{v}) ? \\     \end{aligned}}

.

\displaystyle{ \begin{aligned}     \partial_{\vec 2}   = \frac{\partial}{\partial \vec{\dot q}}   &= \begin{bmatrix} \frac{\partial}{\partial \dot q_1} & \frac{\partial}{\partial \dot q_2} & ... \end{bmatrix} \\ \\      \mathcal{P} \dot Q &= (\partial_2 T) \dot Q \\ \\    \begin{bmatrix} \mathcal{P}_1 & \mathcal{P}_2 & ... \end{bmatrix}     \begin{bmatrix} \dot Q_1 \\ \dot Q_2 \\ \vdots \end{bmatrix}     &=    \begin{bmatrix} (\partial_2 T)_1 & (\partial_2 T)_2 & ... \end{bmatrix}     \begin{bmatrix} \dot Q_1 \\ \dot Q_2 \\ \vdots \end{bmatrix} \\     \\    &=    \begin{bmatrix} \frac{\partial T}{\partial \dot q_1} &  \frac{\partial T}{\partial \dot q_2}  & ... \end{bmatrix}     \begin{bmatrix} \dot Q_1 \\ \dot Q_2 \\ \vdots \end{bmatrix} \\     \\     &=    \frac{\partial T}{\partial \dot q_1} \dot Q_1 + \frac{\partial T}{\partial \dot q_2} \dot Q_2  + ...     \\       \end{aligned}}

.

Euler’s Homogeneous Function Theorem:

If

\displaystyle{ \begin{aligned}      f(t x_1, t x_2, ...) &= t^n f( x_1, x_2 , ...),  \\     \end{aligned}}

then

\displaystyle{ \begin{aligned}      \sum_{i} x_i \frac{\partial f}{\partial x_i} &= n f(\mathbf{x}) \\    \end{aligned}}

.

\displaystyle{T(t, q, v) = \frac{1}{2} \sum_{\alpha} m_\alpha v^2_\alpha}

So

\displaystyle{\begin{aligned}     T(t, q, uv)     &= \frac{1}{2} \sum_{\alpha} m_\alpha (uv)^2_\alpha \\    &= u^2 T(t, q, v) \\    \end{aligned}    }

Therefore,

\displaystyle{ \begin{aligned}     \frac{\partial T}{\partial \dot q_1} \dot Q_1 + \frac{\partial T}{\partial \dot q_2} \dot Q_2  + ...     &= 2 T \\     \end{aligned}}

— Me@2022.09.27 12:26:09 PM

.

.

2022.09.27 Tuesday (c) All rights reserved by ACHK

Homogenous function

A function f is homogenous of degree n if and only if f(ax) = a^n f(x).

— 1.8 Conserved Quantities

— Structure and Interpretation of Classical Mechanics

.

\displaystyle{\begin{aligned}     D_a f(ax)     &= \frac{d}{da} f(ax) \\     &= \frac{d}{da} a^n f(x) \\     &= f(x) \frac{d}{da} a^n  \\     &= n a^{n-1} f(x) \\     \end{aligned}}

.

\displaystyle{\begin{aligned}     D_a f(ax)     &= \frac{d}{da} f(ax) \\     &= \frac{d(ax)}{da} \frac{d}{d(ax)} f(ax) \\     &= x \frac{d}{d(ax)} f(ax) \\     &= x D_{ax} f(ax) \\     \end{aligned}}

.

\displaystyle{\begin{aligned}     x D_{ax} f(ax) &= n a^{n-1} f(x) \\    x D_{x} f(x) &= n f(x) \\    \end{aligned}}

— Me@2022.09.05 06:28:00 PM

.

.

2022.09.06 Tuesday (c) All rights reserved by ACHK

Clojupyter

SICMUtils, 4

.

The goal of this post is to run SICMUtils in Clojure in Jupyter Notebook.

.

1. Read and follow the exact steps of my post titled “SICMUtils“.

2. Do the same for my another post “Jupyter Notebook“.

.

3. Use Emacs to open the file:

~/my-stuff/project.clj

4. Replace the existing :dependencies line with this one:

  :dependencies [[org.clojure/clojure "1.11.1"]
                 [sicmutils "0.22.0"]
                 [clojupyter "0.3.3"]]

And make sure that all version numbers are the most updated ones.

5. Save the file.

.

6. In bash terminal, go to your project folder such as “~/my-stuff“:

cd ~/my-stuff

7. Run this to download all the dependencies of the project.

lein deps 

.

8. Clojupyter is a Jupyter kernel for Clojure. According to its documentation, Clojupyter has provided some command line tools. However, I could not understand how to use those commands in the bash terminal.

Finally, I found out that to run a Clojupyter command, such as “list-commands“, we just need to add the following code before it:

lein run -m clojupyter.cmdline

.

That results the whole command as

lein run -m clojupyter.cmdline list-commands

However, that would be wordy. So we create a shortcut for it.

.

9. Use Emacs to open the file:

~/my-stuff/project.clj

10. Below the entry “:dependencies“, add another one called “:aliases“.

:dependencies [[org.clojure/clojure "1.11.1"]
               [sicmutils "0.22.0"]
               [clojupyter "0.3.3"]]
;
:aliases {"cjcmd"
; 
          ["run" "-m" "clojupyter.cmdline"]}

11. Then, the shortcut is made. To test, run:

lein cjcmd list-commands

.

12. Go to your project folder:

cd ~/my-stuff

13. And then run

lein uberjar

to create a binary file named my-stuff-0.1.0-SNAPSHOT-standalone.jar, which includes not only the program itself, but also all its dependencies.

We are going to use it to generate a Jupyter kernel that includes not only the Clojure language, but also the SICMUtils mechanics library.

.

14. For the following code,

lein cjcmd install 
    --ident cj-kernel 
    --jarfile 
    ~/my-stuff/target/uberjar/standalone.jar

replace the file name

standalone.jar

with

my-stuff-0.1.0-SNAPSHOT-standalone.jar

15. In the bash terminal, run the code in one line.

.

16. In your OS, try to open the SageMath program. It will open a Jupyter notebook page.

17. Click the “New” button at the top right corner and then select “cj-kernel“.

18. There might be some error messages, such as

“The kernel appears to have died. It will restart automatically.”

However, you can actually use the program, i.e. the Clojure language with the SICMUtils mechanics library.

.

19. Type

(clojure-version)

onto the input line.

20. Hit the keys shift-enter to get the output.

.

21. Input

(require '[sicmutils.env :as env])

and hit shift-enter.

22. Also

(env/bootstrap-repl!) 

There might be some WARNING messages. But you can just ignore them.

.

23. Code

(->TeX (simplify ((D cube) 'x)))

will result

3\\,{x}^{2}

.

24. Test some code examples provided by the official website of Clojupyter.

.

25. Go to the official website of SICMUtils. Go to its jupyter directory to read the example notebooks.

sicmutils/jupyter/

.

26. Go to the documentation of SICMUtils. Read the page “Comparison to scmutils“.

— Me@2022-07-30 12:18:50 PM

— Me@2022-08-18 09:07:36 AM

.

.

2022.08.18 Thursday (c) All rights reserved by ACHK

Cyclic coordinate

A generalized coordinate component that does not appear explicitly in the Lagrangian is called a cyclic coordinate. The generalized momentum component conjugate to any cyclic coordinate is a constant of the motion.

— 1.8 Conserved Quantities

— Structure and Interpretation of Classical Mechanics

.

This is a special case of Noether’s theorem. Such coordinates are called “cyclic” or “ignorable”.

— Wikipedia on Lagrangian mechanics

.

If only the cyclic coordinate \displaystyle{q(t)} varies with time (if it doesn’t, \displaystyle{q} is superfluous), the Lagrangian, or the essential physical situation, doesn’t vary. Hence the initial value of \displaystyle{q} doesn’t determine the path, which is only possible if the path is closed.

— edited Jul 28, 2014 at 15:55

— ACuriousMind

— answered Jul 28, 2014 at 15:50

— Pieter Kockx

— Why are they called “cyclic” coordinates?

— Physics Stack Exchange

.

.

2022.07.22 Friday ACHK

Matrix calculus

1.7 Evolution of Dynamical State, 2.3

Structure and Interpretation of Classical Mechanics

.

\displaystyle{ \begin{aligned}     \partial_1 L \circ \Gamma[q]     &= D ( \partial_2 L \circ \Gamma[q]) \\ \\    &= \partial_0 ( \partial_2 L \circ \Gamma[q]) Dt +  \partial_1 ( \partial_2 L \circ \Gamma[q]) Dq + \partial_2 ( \partial_2 L \circ \Gamma[q]) Dv \\ \\     &= \partial_0 \partial_2 L \circ \Gamma[q] +  ( \partial_1 \partial_2 L \circ \Gamma[q]) Dq + (\partial_2 \partial_2 L \circ \Gamma[q]) D^2 q \\ \\     \end{aligned}}

.

\displaystyle{ \begin{aligned}      (\partial_2 \partial_2 L \circ \Gamma[q]) D^2 q     &=     \partial_1 L \circ \Gamma[q]     - \partial_0 \partial_2 L \circ \Gamma[q]     - (\partial_1 \partial_2 L \circ \Gamma[q]) Dq  \\ \\         D^2 q     &=     \left[ \partial_2 \partial_2 L \circ \Gamma[q] \right]^{-1}    \left\{ \partial_1 L \circ \Gamma[q]     - \partial_0 \partial_2 L \circ \Gamma[q]     - (\partial_1 \partial_2 L \circ \Gamma[q]) Dq  \right\} \\ \\      \end{aligned}}

where \displaystyle{\left[ \partial_2 \partial_2 L \circ \Gamma \right]} is a structure that can be represented by a symmetric square matrix, so we can compute its inverse.

~~~

[guess]

\displaystyle{   \begin{aligned} D \left( \frac{\partial}{\partial \dot q_1} L \circ \Gamma[\begin{bmatrix} q_1 \\ q_2 \\ \vdots \end{bmatrix}] \right) - \left(\frac{\partial}{\partial q_1} L \circ \Gamma[\begin{bmatrix} q_1 \\ q_2 \\ \vdots \end{bmatrix}]\right)   &= 0 \\     D \left( \frac{\partial}{\partial \dot q_2} L \circ \Gamma[\begin{bmatrix} q_1 \\ q_2 \\ \vdots \end{bmatrix}] \right) - \left(\frac{\partial}{\partial q_2} L \circ \Gamma[\begin{bmatrix} q_1 \\ q_2 \\ \vdots \end{bmatrix}]\right) &= 0 \\     &\vdots \\   \end{aligned}}

.

\displaystyle{   \begin{aligned} D \left( \frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right)   - \left(\frac{\partial}{\partial q_1} L \circ \Gamma[\vec q]\right)   &= 0 \\     D \left( \frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right) - \left(\frac{\partial}{\partial q_2} L \circ \Gamma[\vec q]\right) &= 0 \\     &\vdots \\   \end{aligned}}

.

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

\displaystyle{ \begin{aligned}  \partial_{\vec 1}   = \frac{\partial}{\partial \vec q}   &= \begin{bmatrix} \frac{\partial}{\partial q_1} & \frac{\partial}{\partial q_2} & ... \end{bmatrix} \\    \\  \partial_{\vec 2}   = \frac{\partial}{\partial \vec{\dot q}}   &= \begin{bmatrix} \frac{\partial}{\partial \dot q_1} & \frac{\partial}{\partial \dot q_2} & ... \end{bmatrix} \\    \end{aligned}}

\displaystyle{ \begin{aligned}  \vec \partial_{1}   = \left( \frac{\partial}{\partial \vec q} \right)^T  &= \begin{bmatrix} \frac{\partial}{\partial q_1} \\ \frac{\partial}{\partial q_2} \\ \vdots \end{bmatrix} \\    \\  \vec \partial_{2}   = \left( \frac{\partial}{\partial \vec{\dot q}} \right)^T  &= \begin{bmatrix} \frac{\partial}{\partial \dot q_1} \\ \frac{\partial}{\partial \dot q_2} \\ \vdots \end{bmatrix} \\    \end{aligned}}

.

\displaystyle{   \begin{aligned}   \vec \partial_1 L \circ \Gamma[\vec q]   &= D \left( \vec \partial_2 L \circ \Gamma[\vec q] \right) \\ \\    &= \partial_0 \left( \vec \partial_2 L \circ \Gamma[\vec q] \right) Dt    \\    &+ \partial_{q_1} \left( \vec \partial_2 L \circ \Gamma[\vec q] \right) Dq_1    + \partial_{\dot q_1} \left( \vec \partial_2 L \circ \Gamma[\vec q] \right) D \dot q_1 \\    &+ \partial_{q_2} \left( \vec \partial_2 L \circ \Gamma[\vec q] \right) Dq_2    + \partial_{\dot q_2} \left( \vec \partial_2 L \circ \Gamma[\vec q] \right) D \dot q_2 \\    &+ ... \\ \\      &= \partial_0 \left( \vec \partial_2 L \circ \Gamma[\vec q] \right)     \\    &+ \begin{bmatrix} \partial_{q_1} & \partial_{q_2} & ... \end{bmatrix}    \left( \vec \partial_2 L \circ \Gamma[\vec q] \right) D \begin{bmatrix} q_1  \\ q_2 \\ \vdots \end{bmatrix} \\    &+ \begin{bmatrix} \partial_{\dot q_1} & \partial_{\dot q_2} & ... \end{bmatrix}    \left( \vec \partial_2 L \circ \Gamma[\vec q] \right) D^2 \begin{bmatrix} q_1  \\ q_2 \\ \vdots \end{bmatrix} \\    \end{aligned}}

.

\displaystyle{\begin{aligned}    \vec \partial_1 L \circ \Gamma[\vec q]      &= \partial_0 \left( \vec \partial_2 L \circ \Gamma[\vec q] \right) Dt    + \frac{\partial}{\partial \vec q}     \left( \vec \partial_2 L \circ \Gamma[\vec q] \right) D \vec q     + \frac{\partial}{\partial \vec {\dot q}}     \left( \vec \partial_2 L \circ \Gamma[\vec q] \right) D^2   \vec q \\    \end{aligned}}

[guess]

— Me@2022-07-09 09:09:28 PM

.

.

2022.07.13 Wednesday (c) All rights reserved by ACHK

1.7 Evolution of Dynamical State, 2.2

Structure and Interpretation of Classical Mechanics

.

\displaystyle{ \begin{aligned}     \partial_1 L \circ \Gamma[q]     &= D ( \partial_2 L \circ \Gamma[q]) \\ \\    &= \partial_0 ( \partial_2 L \circ \Gamma[q]) Dt +  \partial_1 ( \partial_2 L \circ \Gamma[q]) Dq + \partial_2 ( \partial_2 L \circ \Gamma[q]) Dv \\ \\     &= \partial_0 \partial_2 L \circ \Gamma[q] +  ( \partial_1 \partial_2 L \circ \Gamma[q]) Dq + (\partial_2 \partial_2 L \circ \Gamma[q]) D^2 q \\ \\     \end{aligned}}

.

\displaystyle{ \begin{aligned}      (\partial_2 \partial_2 L \circ \Gamma[q]) D^2 q     &=     \partial_1 L \circ \Gamma[q]     - \partial_0 \partial_2 L \circ \Gamma[q]     - (\partial_1 \partial_2 L \circ \Gamma[q]) Dq  \\ \\         D^2 q     &=     \left[ \partial_2 \partial_2 L \circ \Gamma[q] \right]^{-1}    \left\{ \partial_1 L \circ \Gamma[q]     - \partial_0 \partial_2 L \circ \Gamma[q]     - (\partial_1 \partial_2 L \circ \Gamma[q]) Dq  \right\} \\ \\      \end{aligned}}

where \displaystyle{\left[ \partial_2 \partial_2 L \circ \Gamma \right]} is a structure that can be represented by a symmetric square matrix, so we can compute its inverse.

~~~

[guess]

The Lagrange equation:

\displaystyle{ \begin{aligned} D \left( \frac{\partial}{\partial \dot q_1} L \circ \Gamma[\begin{bmatrix} q_1 \\ q_2 \end{bmatrix}] \right) - \left(\frac{\partial}{\partial q_1} L \circ \Gamma[\begin{bmatrix} q_1 \\ q_2 \end{bmatrix}]]\right) &= 0 \\ \end{aligned}}

\displaystyle{ \begin{aligned} D \left( \frac{\partial}{\partial \dot q_2} L \circ \Gamma[\begin{bmatrix} q_1 \\ q_2 \end{bmatrix}]] \right) - \left(\frac{\partial}{\partial q_2} L \circ \Gamma[\begin{bmatrix} q_1 \\ q_2 \end{bmatrix}]]\right) &= 0 \\ \end{aligned}}

\displaystyle{ \begin{aligned}   \frac{d}{dt} \left( \frac{\partial}{\partial \dot q_1} L (t, q_1(t), \dot q_1(t), q_2(t), \dot q_2(t)) \right) - \frac{\partial}{\partial q_1} L (t, q_1(t), \dot q_1(t), q_2(t), \dot q_2(t))    &= 0       \end{aligned}}

\displaystyle{ \begin{aligned}   \frac{d}{dt} \left( \frac{\partial}{\partial \dot q_2} L (t, q_1(t), \dot q_1(t), q_2(t), \dot q_2(t)) \right) - \frac{\partial}{\partial q_2} L (t, q_1(t), \dot q_1(t), q_2(t), \dot q_2(t))    &= 0       \end{aligned}}

.

\displaystyle{   \begin{aligned} D \left( \begin{bmatrix} \frac{\partial}{\partial \dot q_1}  \\ \frac{\partial}{\partial \dot q_2}  \end{bmatrix}       L \circ \Gamma[q_1, q_2] \right)     - \left(     \begin{bmatrix} \frac{\partial}{\partial q_1}  \\ \frac{\partial}{\partial  q_2}  \end{bmatrix}     L \circ \Gamma[q_1, q_2]\right) &= 0 \\       D \left(     \vec \partial_2    L \circ \Gamma[q_1, q_2] \right)     - \left(     \vec \partial_1     L \circ \Gamma[q_1, q_2]\right) &= 0 \\       \end{aligned}}

.

\displaystyle{ \begin{aligned}         \vec \partial_1 L \circ \Gamma[q] &= D ( \vec \partial_2 L \circ \Gamma[q]) \\ \\         \begin{bmatrix} \frac{\partial}{\partial q_1}  \\ \frac{\partial}{\partial  q_2}  \end{bmatrix}     L \circ \Gamma[q_1, q_2]     &=     D \left( \begin{bmatrix} \frac{\partial}{\partial \dot q_1}  \\ \frac{\partial}{\partial \dot q_2}  \end{bmatrix}       L \circ \Gamma[q_1, q_2] \right)   \\  \\    \frac{\partial}{\partial q_1}      L \circ \Gamma[q_1, q_2]     &=     \partial_0 \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \partial_{q_1} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D q_1     + \partial_{v_1} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D v_1 \\    &+ \partial_{q_2} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D q_2     + \partial_{v_2} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D v_2       \\       \frac{\partial}{\partial  q_2}      L \circ \Gamma[q_1, q_2]     &=     ...      \\      \end{aligned}}

.

\displaystyle{ \begin{aligned}         \frac{\partial}{\partial q_1}      L \circ \Gamma[q_1, q_2]     &=     \partial_0 \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \frac{\partial}{\partial q_1}  \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D q_1       + \frac{\partial}{\partial q_2}  \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D q_2 \\    &+ \frac{\partial}{\partial \dot q_1}  \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D^2 q_1     + \frac{\partial}{\partial \dot q_2} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D^2 q_2       \\      \frac{\partial}{\partial  q_2}      L \circ \Gamma[q_1, q_2]     &=     \partial_0 \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \frac{\partial}{\partial q_1}  \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) D q_1       + \frac{\partial}{\partial q_2}  \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) D q_2 \\    &+ \frac{\partial}{\partial \dot q_1}  \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) D^2 q_1     + \frac{\partial}{\partial \dot q_2} \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) D^2 q_2         \\           \end{aligned}}

.

\displaystyle{\begin{aligned}    \vec \partial_1    L \circ \Gamma[q_1, q_2]     &=     \partial_0 \left(\vec \partial_2 L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \frac{\partial}{\partial q_1}  \left(    \vec \partial_2    L \circ \Gamma[q_1, q_2] \right) D q_1       + \frac{\partial}{\partial q_2}  \left(    \vec \partial_2     L \circ \Gamma[q_1, q_2] \right) D q_2 \\    &+ \frac{\partial}{\partial \dot q_1}  \left(    \vec \partial_2     L \circ \Gamma[q_1, q_2] \right) D^2 q_1     + \frac{\partial}{\partial \dot q_2} \left(    \vec \partial_2  L \circ \Gamma[q_1, q_2] \right) D^2 q_2       \\ \\    \end{aligned}}

\displaystyle{\begin{aligned}    \begin{bmatrix}     \frac{\partial}{\partial q_1} \\    \frac{\partial}{\partial q_2}    \end{bmatrix}    L \circ \Gamma[q_1, q_2]     &=     \partial_0 \left(  \begin{bmatrix}     \frac{\partial}{\partial \dot q_1} \\    \frac{\partial}{\partial \dot q_2}    \end{bmatrix}   L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \frac{\partial}{\partial q_1}  \left(    \begin{bmatrix}     \frac{\partial}{\partial \dot q_1} \\    \frac{\partial}{\partial \dot q_2}    \end{bmatrix}      L \circ \Gamma[q_1, q_2] \right) D q_1       + \frac{\partial}{\partial q_2}  \left(    \begin{bmatrix}     \frac{\partial}{\partial \dot q_1} \\    \frac{\partial}{\partial \dot q_2}    \end{bmatrix}       L \circ \Gamma[q_1, q_2] \right) D q_2 \\    &+ \frac{\partial}{\partial \dot q_1}  \left(    \begin{bmatrix}     \frac{\partial}{\partial \dot q_1} \\    \frac{\partial}{\partial \dot q_2}    \end{bmatrix}       L \circ \Gamma[q_1, q_2] \right) D^2 q_1     + \frac{\partial}{\partial \dot q_2} \left(    \begin{bmatrix}     \frac{\partial}{\partial \dot q_1} \\    \frac{\partial}{\partial \dot q_2}    \end{bmatrix}    L \circ \Gamma[q_1, q_2] \right) D^2 q_2       \\ \\    \end{aligned}}

.

\displaystyle{ \begin{aligned}     \frac{\partial}{\partial \dot q_1} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right) D^2 q_1 + \frac{\partial}{\partial \dot q_2} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right) D^2 q_2    &= \frac{\partial}{\partial q_1} L \circ \Gamma[\vec q]     - \partial_0 \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right) Dt \\     &- \frac{\partial}{\partial q_1} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right) D q_1 - \frac{\partial}{\partial q_2} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right) D q_2 \\      \\      \frac{\partial}{\partial \dot q_1} \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right) D^2 q_1 + \frac{\partial}{\partial \dot q_2} \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right) D^2 q_2      &= \frac{\partial}{\partial q_2} L \circ \Gamma[\vec q] - \partial_0 \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right) Dt \\     &- \frac{\partial}{\partial q_1} \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right) D q_1 - \frac{\partial}{\partial q_2} \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right) D q_2 \\       \end{aligned}}

\displaystyle{ \begin{aligned}     &\begin{bmatrix}  \frac{\partial}{\partial \dot q_1} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right) &    \frac{\partial}{\partial \dot q_2} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right) \\       \frac{\partial}{\partial \dot q_1} \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right) &    \frac{\partial}{\partial \dot q_2} \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right)    \end{bmatrix} \begin{bmatrix}  D^2 q_1 \\ D^2 q_2 \end{bmatrix} \\      &= \begin{bmatrix} \frac{\partial}{\partial q_1} L \circ \Gamma[\vec q]     - \partial_0 \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right) Dt      - \frac{\partial}{\partial q_1} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right) D q_1 - \frac{\partial}{\partial q_2} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right) D q_2 \\      \\    \frac{\partial}{\partial q_2} L \circ \Gamma[\vec q] - \partial_0 \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right) Dt      - \frac{\partial}{\partial q_1} \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right) D q_1 - \frac{\partial}{\partial q_2} \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right) D q_2 \\   \end{bmatrix}      \end{aligned}}

.

\displaystyle{ \begin{aligned}     &\left(\begin{bmatrix}  \frac{\partial}{\partial \dot q_1} \left(\frac{\partial}{\partial \dot q_1} \right) &    \frac{\partial}{\partial \dot q_2} \left(\frac{\partial}{\partial \dot q_1} \right) \\       \frac{\partial}{\partial \dot q_1} \left(\frac{\partial}{\partial \dot q_2} \right) &    \frac{\partial}{\partial \dot q_2} \left(\frac{\partial}{\partial \dot q_2} \right)    \end{bmatrix} L \circ \Gamma[\vec q] \right)\begin{bmatrix}  D^2 q_1 \\ D^2 q_2 \end{bmatrix} \\      &=     \begin{bmatrix} \frac{\partial}{\partial q_1}       \\    \frac{\partial}{\partial q_2}   \end{bmatrix} L \circ \Gamma[\vec q]    -    \left( \partial_0    \begin{bmatrix}      \frac{\partial}{\partial \dot q_1} \\    \frac{\partial}{\partial \dot q_2}       \end{bmatrix} L \circ \Gamma[\vec q] \right) Dt    -    \left(  \begin{bmatrix}        \frac{\partial}{\partial q_1} \left(\frac{\partial}{\partial \dot q_1}  \right)      & \frac{\partial}{\partial q_2} \left(\frac{\partial}{\partial \dot q_1}  \right)  \\      \\         \frac{\partial}{\partial q_1} \left(\frac{\partial}{\partial \dot q_2} \right)     & \frac{\partial}{\partial q_2} \left(\frac{\partial}{\partial \dot q_2} \right)  \\   \end{bmatrix}    L \circ \Gamma[\vec q] \right)    \begin{bmatrix}  D q_1 \\ D q_2 \end{bmatrix} \\      \end{aligned}}

.

\displaystyle{ \begin{aligned}     &\left(    \begin{bmatrix}  \frac{\partial}{\partial \dot q_1} \\    \frac{\partial}{\partial \dot q_2} \\    \end{bmatrix}     \begin{bmatrix}  \frac{\partial}{\partial \dot q_1} &    \frac{\partial}{\partial \dot q_2} \\       \end{bmatrix}         L \circ \Gamma[\vec q] \right)\begin{bmatrix}  D^2 q_1 \\ D^2 q_2 \end{bmatrix} \\      &=     \begin{bmatrix} \frac{\partial}{\partial q_1}       \\    \frac{\partial}{\partial q_2}   \end{bmatrix} L \circ \Gamma[\vec q]    -    \left( \partial_0    \begin{bmatrix}      \frac{\partial}{\partial \dot q_1} \\    \frac{\partial}{\partial \dot q_2}       \end{bmatrix} L \circ \Gamma[\vec q] \right) Dt    -    \left(    \begin{bmatrix}        \frac{\partial}{\partial \dot q_1} \\    \frac{\partial}{\partial \dot q_2}     \end{bmatrix}      \begin{bmatrix}        \frac{\partial}{\partial q_1}   &    \frac{\partial}{\partial q_2}         \end{bmatrix}    L \circ \Gamma[\vec q] \right)    \begin{bmatrix}  D q_1 \\ D q_2 \end{bmatrix} \\      \end{aligned}}

.

\displaystyle{ \begin{aligned}     &\left( \vec \partial_2 \vec \partial_2^T     L \circ \Gamma[\vec q] \right) D^2 \vec q \\    &= \vec \partial_1 L \circ \Gamma[\vec q]    - \left( \partial_0 \vec \partial_2 L \circ \Gamma[\vec q] \right)     - \left( \vec \partial_2 \vec \partial_1^T L \circ \Gamma[\vec q] \right) D \vec q \\      \end{aligned}}

[guess]

— Me@2022-07-07 05:20:38 PM

.

.

2022.07.09 Saturday (c) All rights reserved by ACHK

1.7 Evolution of Dynamical State, 2.1

Structure and Interpretation of Classical Mechanics

.

\displaystyle{ \begin{aligned}      (\partial_2 \partial_2 L \circ \Gamma[q]) D^2 q     &=     \partial_1 L \circ \Gamma[q]     - \partial_0 \partial_2 L \circ \Gamma[q]     - (\partial_1 \partial_2 L \circ \Gamma[q]) Dq  \\ \\         D^2 q     &=     \left[ \partial_2 \partial_2 L \circ \Gamma[q] \right]^{-1}    \left\{ \partial_1 L \circ \Gamma[q]     - \partial_0 \partial_2 L \circ \Gamma[q]     - (\partial_1 \partial_2 L \circ \Gamma[q]) Dq  \right\} \\ \\      \end{aligned}}

where \displaystyle{\left[ \partial_2 \partial_2 L \circ \Gamma \right]} is a structure that can be represented by a symmetric square matrix, so we can compute its inverse.

~~~

[guess]

Eq. (1.110):

\displaystyle{  \left(D \Gamma[q] \right)(t)   = \left( 1, Dq(t), D^2 q(t), ... \right)  = \begin{bmatrix} 1 \\ Dq(t) \\ D^2 q(t) \\ ... \\ \end{bmatrix} \\   }

.

\displaystyle{ \Gamma[q](t) = \left( t, q(t), D q(t), D^2 q(t), ... \right)  = \begin{bmatrix} t \\ q(t) \\ D q(t) \\ D^2 q(t) \\ ... \\ \end{bmatrix} \\   }

\displaystyle{ \Gamma[q] = \begin{bmatrix} I \\ q \\ D q \\ D^2 q \\ ... \\ \end{bmatrix} \\   },

where I(t) = t.

\displaystyle{ \Gamma[q_1, q_2](t) = \left( t, \begin{bmatrix} q_1(t) \\ q_2(t) \end{bmatrix},   D \begin{bmatrix} q_1(t) \\ q_2(t) \end{bmatrix},   D^2 \begin{bmatrix} q_1(t) \\ q_2(t) \end{bmatrix},   ... \right) = \begin{bmatrix} t \\ \begin{bmatrix} q_1(t) \\ q_2(t) \end{bmatrix} \\   D \begin{bmatrix} q_1(t) \\ q_2(t) \end{bmatrix} \\   D^2 \begin{bmatrix} q_1(t) \\ q_2(t) \end{bmatrix} \\   ... \\ \end{bmatrix} \\ }

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} \left( \frac{\partial}{\partial \dot q} L (t, q(t), \dot q(t)) \right) - \frac{\partial}{\partial q} L (t, q(t), \dot q(t))    &= 0     \end{aligned}}

.

\displaystyle{ \begin{aligned} D \left( \frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) - \left(\frac{\partial}{\partial q_1} L \circ \Gamma[q_1, q_2]\right) &= 0 \\ \end{aligned}}

\displaystyle{ \begin{aligned} D \left( \frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) - \left(\frac{\partial}{\partial q_2} L \circ \Gamma[q_1, q_2]\right) &= 0 \\ \end{aligned}}

\displaystyle{ \begin{aligned}   \frac{d}{dt} \left( \frac{\partial}{\partial \dot q_1} L (t, q_1(t), \dot q_1(t), q_2(t), \dot q_2(t)) \right) - \frac{\partial}{\partial q_1} L (t, q_1(t), \dot q_1(t), q_2(t), \dot q_2(t))    &= 0       \end{aligned}}

\displaystyle{ \begin{aligned}   \frac{d}{dt} \left( \frac{\partial}{\partial \dot q_2} L (t, q_1(t), \dot q_1(t), q_2(t), \dot q_2(t)) \right) - \frac{\partial}{\partial q_2} L (t, q_1(t), \dot q_1(t), q_2(t), \dot q_2(t))    &= 0       \end{aligned}}

.

\displaystyle{   \begin{aligned} D \left( \begin{bmatrix} \frac{\partial}{\partial \dot q_1}  \\ \frac{\partial}{\partial \dot q_2}  \end{bmatrix}       L \circ \Gamma[q_1, q_2] \right)     - \left(     \begin{bmatrix} \frac{\partial}{\partial q_1}  \\ \frac{\partial}{\partial  q_2}  \end{bmatrix}     L \circ \Gamma[q_1, q_2]\right) &= 0 \\       D \left(     \vec \partial_2    L \circ \Gamma[q_1, q_2] \right)     - \left(     \vec \partial_1     L \circ \Gamma[q_1, q_2]\right) &= 0 \\       \end{aligned}}

.

\displaystyle{ \begin{aligned}         \vec \partial_1 L \circ \Gamma[q] &= D ( \vec \partial_2 L \circ \Gamma[q]) \\ \\         \begin{bmatrix} \frac{\partial}{\partial q_1}  \\ \frac{\partial}{\partial  q_2}  \end{bmatrix}     L \circ \Gamma[q_1, q_2]     &=     D \left( \begin{bmatrix} \frac{\partial}{\partial \dot q_1}  \\ \frac{\partial}{\partial \dot q_2}  \end{bmatrix}       L \circ \Gamma[q_1, q_2] \right)   \\  \\        \frac{\partial}{\partial q_1}      L \circ \Gamma[q_1, q_2]     &=     D \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right)   \\       \frac{\partial}{\partial  q_2}      L \circ \Gamma[q_1, q_2]     &=     D \left( \frac{\partial}{\partial \dot q_2}        L \circ \Gamma[q_1, q_2] \right)   \\  \\      \frac{\partial}{\partial q_1}      L \circ \Gamma[q_1, q_2]     &=     \partial_0 \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \partial_{q_1} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D q_1     + \partial_{v_1} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D v_1 \\    &+ \partial_{q_2} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D q_2     + \partial_{v_2} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D v_2       \\       \frac{\partial}{\partial  q_2}      L \circ \Gamma[q_1, q_2]     &= ... \\      \end{aligned}}

.

\displaystyle{ \begin{aligned}         \frac{\partial}{\partial q_1}      L \circ \Gamma[q_1, q_2]     &=     \partial_0 \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \frac{\partial}{\partial q_1}  \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D q_1       + \frac{\partial}{\partial q_2}  \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D q_2 \\    &+ \frac{\partial}{\partial \dot q_1}  \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D^2 q_1     + \frac{\partial}{\partial \dot q_2} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D^2 q_2       \\      \frac{\partial}{\partial  q_2}      L \circ \Gamma[q_1, q_2]     &=     \partial_0 \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \frac{\partial}{\partial q_1}  \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) D q_1       + \frac{\partial}{\partial q_2}  \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) D q_2 \\    &+ \frac{\partial}{\partial \dot q_1}  \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) D^2 q_1     + \frac{\partial}{\partial \dot q_2} \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) D^2 q_2         \\           \end{aligned}}

.

This part is wrong.

\displaystyle{\begin{aligned}    \vec \partial_1    L \circ \Gamma[q_1, q_2]     &=     \partial_0 \left(\vec \partial_2 L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \frac{\partial}{\partial q_1}  \left(    \vec \partial_2    L \circ \Gamma[q_1, q_2] \right) D q_1       + \frac{\partial}{\partial q_2}  \left(    \vec \partial_2     L \circ \Gamma[q_1, q_2] \right) D q_2 \\    &+ \frac{\partial}{\partial \dot q_1}  \left(    \vec \partial_2     L \circ \Gamma[q_1, q_2] \right) D^2 q_1     + \frac{\partial}{\partial \dot q_2} \left(    \vec \partial_2  L \circ \Gamma[q_1, q_2] \right) D^2 q_2       \\ \\    &= \partial_0 \left(\vec \partial_2 L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \begin{bmatrix}  \frac{\partial}{\partial q_1} &  \frac{\partial}{\partial q_2} \\ \end{bmatrix}       \begin{bmatrix} \left(    \vec \partial_2    L \circ \Gamma[q_1, q_2] \right) D q_1    \\ \left(    \vec \partial_2     L \circ \Gamma[q_1, q_2] \right) D q_2 \\ \end{bmatrix}      +     \begin{bmatrix}  \frac{\partial}{\partial \dot q_1} &  \frac{\partial}{\partial \dot q_2} \\ \end{bmatrix}         \begin{bmatrix} \left(    \vec \partial_2    L \circ \Gamma[q_1, q_2] \right) D^2 q_1    \\ \left(    \vec \partial_2     L \circ \Gamma[q_1, q_2] \right) D^2 q_2 \\ \end{bmatrix} \\        \\           \end{aligned}}

\displaystyle{\begin{aligned}    &= \partial_0 \left(\vec \partial_2 L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \begin{bmatrix}  \frac{\partial}{\partial q_1} &  \frac{\partial}{\partial q_2} \\ \end{bmatrix}       \left(    \vec \partial_2    L \circ \Gamma[q_1, q_2] \right) D \begin{bmatrix} q_1    \\  q_2 \\ \end{bmatrix}      +     \begin{bmatrix}  \frac{\partial}{\partial \dot q_1} &  \frac{\partial}{\partial \dot q_2} \\ \end{bmatrix}         \left(    \vec \partial_2    L \circ \Gamma[q_1, q_2] \right) D^2 \begin{bmatrix} q_1    \\  q_2 \\ \end{bmatrix} \\       \\    \vec \partial_1    L \circ \Gamma[\vec q]       &= \partial_0 \left(\vec \partial_2 L \circ \Gamma[q_1, q_2] \right) + \vec \partial_1^T \left( \vec \partial_2 L \circ \Gamma[\vec q] \right) D \vec q     + \vec \partial_2^T \left( \vec \partial_2 L \circ \Gamma[\vec q] \right) D^2 \vec q \\        \end{aligned}}

This can be proven wrong by just checking the dimensions of the matrix products.

The source of the errors is the second step. It puts the column matrix \displaystyle{\vec \partial_2 = \begin{bmatrix} \frac{\partial}{\partial \dot q_1} & \frac{\partial}{\partial \dot q_2} \end{bmatrix}^T} into each equation. Instead, each row of \displaystyle{\vec \partial_2} should match only one of the two equations.

[guess]

— Me@2022-07-07 05:20:38 PM

.

.

2022.07.09 Saturday (c) All rights reserved by ACHK

1.7 Evolution of Dynamical State

Lagrange’s equations are ordinary differential equations that the path must
satisfy. They can be used to test if a proposed path is a realizable path of the
system. However, we can also use them to develop a path, starting with initial
conditions.

Assume that the state of a system is given by the tuple \displaystyle{(t, q, v)}. If we are
given a prescription for computing the acceleration \displaystyle{a = A(t, q, v)}, then

\displaystyle{D^2 q = A \circ \Gamma[q]}

and we have as a consequence

\displaystyle{D^3 q = D( A \circ \Gamma[q]) = D_t A \circ \Gamma[q]}

and so on.

So the higher-derivative components of the local tuple are given by functions \displaystyle{D_t A, D_t^2 A, \dots}. Each of these functions depends on lower-derivative components of the local tuple. All we need to deduce the path from the state is a function that gives the next-higher derivative component of the local description from the state. We use the Lagrange equations to find this function.

— Structure and Interpretation of Classical Mechanics

.

Eq. (1.113):

\displaystyle{  D_t F \circ \Gamma[q] = D(F \circ \Gamma[q])  }

.

Eq. (1.114):

\displaystyle{  \begin{aligned}  D_t F (t, q, v, a, ...)   &= \partial_0 F(t, q, v, a, ...) + \partial_1 F(t, q, v, a, ...) v + \partial_2 F(t, q, v, a, ...) a + ...   \\   \end{aligned}  }

\displaystyle{  \begin{aligned}  D_t F \circ \Gamma[q] (t)  &= \partial_0 F(t, q, v, a, ...) + \partial_1 F(t, q, v, a, ...) v(t) + \partial_2 F(t, q, v, a, ...) a(t) + ...   \\   \end{aligned}  }

.

The Lagrange equation:

\displaystyle{ \begin{aligned}     \frac{d}{dt} \left( \frac{\partial}{\partial \dot q} L (t, q(t), \dot q(t)) \right) - \frac{\partial}{\partial q} L (t, q(t), \dot q(t))    &= 0     \end{aligned}}

.

\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]     &= D ( \partial_2 L \circ \Gamma[q]) \\ \\    &= \partial_0 ( \partial_2 L \circ \Gamma[q]) Dt +  \partial_1 ( \partial_2 L \circ \Gamma[q]) Dq + \partial_2 ( \partial_2 L \circ \Gamma[q]) Dv \\ \\     &= \partial_0 \partial_2 L \circ \Gamma[q] +  ( \partial_1 \partial_2 L \circ \Gamma[q]) Dq + (\partial_2 \partial_2 L \circ \Gamma[q]) D^2 q \\ \\     \end{aligned}}

.

\displaystyle{ \begin{aligned}      (\partial_2 \partial_2 L \circ \Gamma[q]) D^2 q     &=     \partial_1 L \circ \Gamma[q]     - \partial_0 \partial_2 L \circ \Gamma[q]     - (\partial_1 \partial_2 L \circ \Gamma[q]) Dq  \\ \\         D^2 q     &=     \left[ \partial_2 \partial_2 L \circ \Gamma[q] \right]^{-1}    \left\{ \partial_1 L \circ \Gamma[q]     - \partial_0 \partial_2 L \circ \Gamma[q]     - (\partial_1 \partial_2 L \circ \Gamma[q]) Dq  \right\} \\ \\      \end{aligned}}

where \displaystyle{\left[ \partial_2 \partial_2 L \circ \Gamma \right]} is a structure that can be represented by a symmetric square matrix, so we can compute its inverse.

— Me@2022-06-30 11:33:27 AM

.

.

2022.06.30 Thursday (c) All rights reserved by ACHK

Ex 1.27 Identifying total time derivatives

Structure and Interpretation of Classical Mechanics

.

From equation (1.112), we see that \displaystyle{G} must be linear in the generalized velocities

\displaystyle{    G(t, q, v) = G_0(t, q, v) + G_1(t, q, v) v    }

where neither \displaystyle{G_1} nor \displaystyle{G_0} depend on the generalized velocities: \displaystyle{\partial_2 G_1 = \partial_2 G_0 = 0}.

.

So if \displaystyle{G} is the total time derivative of \displaystyle{F} then

\displaystyle{    \partial_0 G_1 = \partial_1 G_0    }

For each of the following functions, either show that it is not a total time derivative or produce a function from which it can be derived.

~~~

[guess]

a. \displaystyle{G(t, x, v_x) = m v_x}

\displaystyle{    \begin{aligned}     G_0 &= 0 \\    G_1 &= m \\ \\    \partial_0 G_1 &= 0 \\     \partial_1 G_0 &= 0 \\ \\     \end{aligned}     }

.

\displaystyle{    \begin{aligned}     \partial_0 F &= 0 \\    F &= k_0(x, v_x) \\ \\    \partial_1 F &= m \\     F &= m x + k_1(t, v_x) \\     \end{aligned}     }

.

Let

\displaystyle{    \begin{aligned}     k_0(x, v_x) &= mx \\     k_1(t, v_x) &= 0 \\     \end{aligned}     }

.

Then

\displaystyle{    \begin{aligned}     F &= mx \\     \end{aligned}     }

[guess]

— Me@2022-06-17 05:10:38 PM

.

.

2022.06.17 Friday (c) All rights reserved by ACHK

Ex 1.26 Lagrange equations for total time derivatives

Structure and Interpretation of Classical Mechanics

.

Let \displaystyle{F(t, q)} be a function of \displaystyle{t} and \displaystyle{q} only, with total time derivative

\displaystyle{D_t F = \partial_0 F + \partial_1 F \dot Q}

Show explicitly that the Lagrange equations for \displaystyle{D_t F} are identically zero, …

~~~

[guess]

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} \left( \frac{\partial}{\partial \dot q} L (t, q(t), \dot q(t)) \right) - \frac{\partial}{\partial q} L (t, q(t), \dot q(t))    &= 0     \end{aligned}}

.

Eq. (1.114):

\displaystyle{  \begin{aligned}  D_t F (t, q, v, a, ...)   &= \partial_0 F(t, q, v, a, ...) + \partial_1 F(t, q, v, a, ...) v + \partial_2 F(t, q, v, a, ...) a + ...   \\   \end{aligned}  }

\displaystyle{  \begin{aligned}  D_t F \circ \Gamma[q] (t)  &= \partial_0 F(t, q, v, a, ...) + \partial_1 F(t, q, v, a, ...) v(t) + \partial_2 F(t, q, v, a, ...) a(t) + ...   \\   \end{aligned}  }

.

Put \displaystyle{ D_t F (t, q, Dq, ...) } into the Lagrange equation:

\displaystyle{     \begin{aligned}     &\frac{d}{dt} \left( \frac{\partial}{\partial \dot q}     D_t F (t, q, Dq, ...)  \right) - \frac{\partial}{\partial q}     D_t F (t, q, Dq, ...) \\ \\    &= \frac{d}{dt} \left[ \frac{\partial}{\partial \dot q}     \left( \partial_0 F(t, q, v, a, ...) + \partial_1 F(t, q, v, a, ...) v + \partial_2 F(t, q, v, a, ...) a + ... \right) \right] \\    &- \frac{\partial}{\partial q}     \left( \partial_0 F(t, q, v, a, ...) + \partial_1 F(t, q, v, a, ...) v + \partial_2 F(t, q, v, a, ...) a + ... \right)   \\     \\    &=\frac{d}{dt} \left[        \partial_2 \partial_0 F  + \partial_2 (v \partial_1 F)   + \partial_2 (a \partial_2 F) + ...  \right] \\    &- \left[    \partial_1 \partial_0 F  + \partial_1 (v \partial_1 F)   + \partial_1 (a \partial_2 F) + ... \right]   \\    \\    &= \partial_0 \left[          \partial_1 \partial_0 F  + \partial_1 (v \partial_1 F)   + \partial_1 (a \partial_2 F) + ...  \right] \\     &+ \partial_1 \left[          \partial_1 \partial_0 F  + \partial_1 (v \partial_1 F)   + \partial_1 (a \partial_2 F) + ...   \right] v \\    &+ \partial_2 \left[          \partial_1 \partial_0 F  + \partial_1 (v \partial_1 F)   + \partial_1 (a \partial_2 F) + ...   \right] a + ... \\    &- \left[      \partial_1 \partial_0 F  + \partial_1 (v \partial_1 F)   + \partial_1 (a \partial_2 F) + ...  \right]   \\        \\    &= ... \\     \end{aligned}    }

.

Assume that \displaystyle{\frac{\partial \dot F}{\partial \dot q} = \frac{\partial F}{\partial q}}:

\displaystyle{     \begin{aligned}     &\frac{d}{dt} \left( \frac{\partial}{\partial \dot q}     D_t F (t, q, Dq, ...)  \right) - \frac{\partial}{\partial q}     D_t F (t, q, Dq, ...) \\ \\    &= \frac{d}{dt} \left( \frac{\partial  \dot F }{\partial \dot q}       \right) - \frac{\partial}{\partial q} \frac{d F}{dt}  \\ \\    &= \frac{d}{dt} \left( \frac{\partial F}{\partial q} \right) - \frac{\partial}{\partial q} \frac{dF}{dt} \\ \\    &= \frac{d}{dt} \left( \frac{\partial F}{\partial q} \right) - \frac{\partial}{\partial q} \left( \frac{\partial F}{\partial t}     + \frac{\partial F}{\partial q} \dot q     + \frac{\partial F}{\partial \dot q} \ddot q + ...  \right) \\ \\ \end{aligned}}

\displaystyle{\begin{aligned}  &= \frac{d}{dt} \left( \frac{\partial F}{\partial q} \right) - \left( \frac{\partial \frac{\partial F}{\partial q}}{\partial t}    + \frac{\partial \frac{\partial F}{\partial q}}{\partial q} \dot q     + \frac{\partial F}{\partial q} \frac{\partial}{\partial q} \dot q     + \frac{\partial \frac{\partial F}{\partial q}}{\partial \dot q} \ddot q     + \frac{\partial F}{\partial \dot q} \frac{\partial}{\partial q}    \ddot q     + ... \right) \\ \\     &= \frac{d}{dt} \left( \frac{\partial F}{\partial q} \right) - \left( \frac{\partial \frac{\partial F}{\partial q}}{\partial t}    + \frac{\partial \frac{\partial F}{\partial q}}{\partial q} \dot q     + \frac{\partial F}{\partial q} (0)    + \frac{\partial \frac{\partial F}{\partial q}}{\partial \dot q} \ddot q     + \frac{\partial F}{\partial \dot q} (0)    + ... \right) \\ \\     &= \frac{d}{dt} \left( \frac{\partial F}{\partial q} \right) -      \left( \frac{\partial \frac{\partial F}{\partial q}}{\partial t}     + \frac{\partial \frac{\partial F}{\partial q}}{\partial q} \dot q     + \frac{\partial \frac{\partial F}{\partial q}}{\partial \dot q} \ddot q + ...  \right) \\ \\    &= \frac{d}{dt} \left( \frac{\partial F}{\partial q} \right) -      \frac{d}{dt} \left( \frac{\partial F}{\partial q} \right)  \\ \\    &= 0 \\ \\     \end{aligned}    }

.

Prove that \displaystyle{\frac{\partial \dot F}{\partial \dot q} = \frac{\partial F}{\partial q}}.

\displaystyle{\begin{aligned}            &\frac{\partial \dot F}{\partial \dot q} \\ \\      &=     \frac{\partial }{\partial \dot q} \left( \frac{\partial F}{\partial t}     + \frac{\partial F}{\partial q} \dot q + \frac{\partial F}{\partial \dot q} \ddot q + ... \right)   \\ \\    &= \frac{\partial }{\partial \dot q} \frac{\partial F}{\partial t}     + \left( \frac{\partial }{\partial \dot q}\frac{\partial F}{\partial q} \right) \dot q   + \frac{\partial F}{\partial q} \frac{\partial }{\partial \dot q}\dot q      + \left( \frac{\partial }{\partial \dot q}\frac{\partial F}{\partial \dot q} \right) \ddot q    + \frac{\partial F}{\partial \dot q} \frac{\partial }{\partial \dot q}\ddot q     + ... \\ \\        &= \frac{\partial }{\partial \dot q} \frac{\partial F}{\partial t}     + \left( \frac{\partial }{\partial \dot q}\frac{\partial F}{\partial q} \right) \dot q   + \frac{\partial F}{\partial q} (1)      + \left( \frac{\partial }{\partial \dot q}\frac{\partial F}{\partial \dot q} \right) \ddot q    + \frac{\partial F}{\partial \dot q} (0)     + ... \\ \\      &= \frac{\partial }{\partial \dot q} \frac{\partial F}{\partial t}     + \left( \frac{\partial }{\partial \dot q}\frac{\partial F}{\partial q} \right)\dot q   + \frac{\partial F}{\partial q}       + \left( \frac{\partial }{\partial \dot q}\frac{\partial F}{\partial \dot q}\right) \ddot q         + ... \\ \\            &=       \left[ \frac{\partial \frac{\partial }{\partial \dot q} F}{\partial t}     + \left( \frac{\partial \frac{\partial }{\partial \dot q} F}{\partial q} \right)\dot q         + \left( \frac{\partial \frac{\partial }{\partial \dot q} F}{\partial \dot q}\right) \ddot q      + ... \right]      + \frac{\partial F}{\partial q}     \\ \\          &= \frac{d}{dt} \frac{\partial F }{\partial \dot q}     + \frac{\partial F}{\partial q}      \\ \\    \end{aligned}}

.

If \displaystyle{ L' = L + D_t F } depends on \displaystyle{ \{t, q, Dq\} } only, then \displaystyle{ F } will depend on \displaystyle{ \{t, q\} } only.

\displaystyle{\begin{aligned}     \frac{\partial \dot F}{\partial \dot q}     &= \frac{d}{dt} \frac{\partial F }{\partial \dot q} + \frac{\partial F}{\partial q} \\ \\     &= \frac{d}{dt} (0) + \frac{\partial F}{\partial q} \\ \\     &= \frac{\partial F}{\partial q} \\ \\     \end{aligned}}

[guess]

— Me@2022-06-03 09:04:37 PM

.

.

2022.06.05 Sunday (c) All rights reserved by ACHK

Ex 1.25 Properties of Dt, 2

Structure and Interpretation of Classical Mechanics

.

Demonstrate that …

b. \displaystyle{D_t (c F) = c D_t F}

c. \displaystyle{D_t (F G) = F D_t G + (D_t F) G}

~~~

\displaystyle{  \begin{aligned}  &D_t (c F) \circ \Gamma[q] (t) \\  \end{aligned}  }

\displaystyle{  \begin{aligned}      &= \partial_0 \left[c F(t, q, v, a, ...) \right]     + \partial_1 \left[c F(t, q, v, a, ...) \right] v(t)     + \partial_2 \left[c F(t, q, v, a, ...) \right] a(t) + ... \end{aligned}  }

\displaystyle{  \begin{aligned}      &= c \partial_0 F(t, q, v, a, ...) + c \partial_1 F(t, q, v, a, ...) v(t) + c \partial_2 F(t, q, v, a, ...) a(t) + ... \end{aligned}  }

\displaystyle{  \begin{aligned}      &= c \left[ \partial_0 F(t, q, v, a, ...) + \partial_1 F(t, q, v, a, ...) v(t) + \partial_2 F(t, q, v, a, ...) a(t) + ... \right] \end{aligned}  }

\displaystyle{  \begin{aligned}  &= c D_t F \circ \Gamma[q] (t) \\  \end{aligned}  }

.

\displaystyle{  \begin{aligned}  &D_t (FG) \circ \Gamma[q] (t) \\  \end{aligned}  }

\displaystyle{  \begin{aligned}      &= \partial_0 \left[ F(t, q, v, a, ...) G(t, q, v, a, ...) \right] \\   &+ \partial_1 \left[ F(t, q, v, a, ...) G(t, q, v, a, ...) \right] v(t) \\   &+ \partial_2 \left[ F(t, q, v, a, ...) G(t, q, v, a, ...) \right] a(t) + ... \\     \end{aligned}  }

\displaystyle{  \begin{aligned}      &= \left[ \partial_0 F(t, q, v, a, ...) \right] G(t, q, v, a, ...) + F(t, q, v, a, ...) \partial_0 G(t, q, v, a, ...) \\   &+ \left\{ \left[ \partial_1 F(t, q, v, a, ...) \right] G(t, q, v, a, ...) + F(t, q, v, a, ...) \partial_1 G(t, q, v, a, ...) \right\} v(t) \\   &+ \left\{ \left[ \partial_2 F(t, q, v, a, ...) \right] G(t, q, v, a, ...) + F(t, q, v, a, ...) \partial_2 G(t, q, v, a, ...) \right\} a(t) + ... \\     \end{aligned}  }

\displaystyle{  \begin{aligned}      &=    \left[ \partial_0 F(t, q, v, a, ...) \right] G(t, q, v, a, ...) \\    &+ \left[ \partial_1 F(t, q, v, a, ...) \right] G(t, q, v, a, ...) v(t) \\   &+ \left[ \partial_2 F(t, q, v, a, ...) \right] G(t, q, v, a, ...) a(t) + ... \\ \\    &+ F(t, q, v, a, ...) \partial_0 G(t, q, v, a, ...) \\   &+ F(t, q, v, a, ...) \partial_1 G(t, q, v, a, ...) v(t) \\   &+ F(t, q, v, a, ...) \partial_2 G(t, q, v, a, ...) a(t) + ... \\     \end{aligned}  }

\displaystyle{  \begin{aligned}      &=    \left[ \partial_0 F(t, q, v, a, ...)   + \partial_1 F(t, q, v, a, ...) v(t)    + \partial_2 F(t, q, v, a, ...) a(t) + ... \right] G(t, q, v, a, ...) \\     &+ F(t, q, v, a, ...) \left[ \partial_0 G(t, q, v, a, ...) + \partial_1 G(t, q, v, a, ...) v(t) + \partial_2 G(t, q, v, a, ...) a(t) + ... \right] \\     \end{aligned}  }

\displaystyle{  \begin{aligned}      &= \left\{  D_t F \circ \Gamma[q] (t) \right\} G(t, q, v, a, ...) + F(t, q, v, a, ...) D_t G \circ \Gamma[q] (t) \\     \end{aligned}  }

\displaystyle{  \begin{aligned}      &= \left\{  D_t F \circ \Gamma[q] (t) \right\} G \circ \Gamma[q] (t) + F \circ \Gamma[q] (t) D_t G \circ \Gamma[q] (t) \\     \end{aligned}  }

The meaning of \displaystyle{\delta_\eta (fg)[q]} is

\displaystyle{\delta_\eta (f[q]g[q])}

\displaystyle{  \begin{aligned}  &D_t (FG) \circ \Gamma[q] (t) \\  \end{aligned}  }

\displaystyle{  \begin{aligned}      &= \left\{  D_t F \circ \Gamma[q] (t) \right\} G \circ \Gamma[q] (t) + F \circ \Gamma[q] (t) D_t G \circ \Gamma[q] (t) \\     \end{aligned}  }

\displaystyle{  \begin{aligned}      &= \left[  (D_t F) G + F D_t G \right] \circ \Gamma[q] (t) \\     \end{aligned}  }

.

\displaystyle{  \begin{aligned}      D_t (FG) \circ \Gamma[q] (t) &= \left[  (D_t F) G + F D_t G \right] \circ \Gamma[q] (t) \\ \\    D_t (FG) &= (D_t F) G + F D_t G \\     \end{aligned}  }

— Me@2022.05.12 07:02:30 PM

.

.

2022.05.14 Saturday (c) All rights reserved by ACHK

Ex 1.25 Properties of Dt

Structure and Interpretation of Classical Mechanics

.

The total time derivative \displaystyle{D_t F} is not the derivative of the function \displaystyle{F}. Nevertheless, the total time derivative shares many properties with the derivative. Demonstrate that \displaystyle{D_t} has the following properties …

\displaystyle{D_t (F + G) = D_t F + D_t G}

~~~

Eq. (1.108):

\displaystyle{  D(F \circ \Gamma[q]) = (DF\circ\Gamma[q])D\Gamma[q]   }

Eq. (1.109):

\displaystyle{  DF \circ \Gamma[q] = \left[ \partial_0 F \circ \Gamma[q], \partial_1 F \circ \Gamma[q], \partial_2 F \circ \Gamma[q], ...  \right]   }

Eq. (1.110):

\displaystyle{  \left(D \Gamma[q] \right)(t)   = \left( 1, Dq(t), D^2 q(t), ... \right)  = \begin{bmatrix} 1 \\ Dq(t) \\ D^2 q(t) \\ ... \\ \end{bmatrix} \\   }

.

\displaystyle{  \begin{aligned}  D(F \circ \Gamma[q])(t)   &= (DF\circ\Gamma[q])D\Gamma[q](t) \\   &= \left[ \partial_0 F \circ \Gamma[q], \partial_1 F \circ \Gamma[q], \partial_2 F \circ \Gamma[q], ...  \right]    \begin{bmatrix} 1 \\ Dq(t) \\ D^2 q(t) \\ ... \\ \end{bmatrix}   \\   &= \partial_0 F \circ \Gamma[q] + \partial_1 F \circ \Gamma[q] D q(t) + \partial_2 F \circ \Gamma[q] D^2 q(t) + ...   \\   &= \partial_0 F \circ \Gamma[q] u(t) + \partial_1 F \circ \Gamma[q] D q(t) + \partial_2 F \circ \Gamma[q] D^2 q(t) + ...   \\   \end{aligned}  },

where \displaystyle{u(t) \equiv 1}.

.

\displaystyle{  \begin{aligned}  D(F \circ \Gamma[q])  &= \partial_0 F \circ \Gamma[q] u + \partial_1 F \circ \Gamma[q] D q + \partial_2 F \circ \Gamma[q] D^2 q + ...    \\   &= \partial_0 F \circ \Gamma[q] J_0 \circ \Gamma[q] + \partial_1 F \circ \Gamma[q] J_1 \circ \Gamma[q] + \partial_2 F \circ \Gamma[q] J_2 \circ \Gamma[q] + ...  \\   \end{aligned}  }

where

\displaystyle{  \begin{aligned}  I_0 \circ \Gamma[q] &= t \\ \\  I_{n>0} \circ \Gamma[q]   &= I_{n>0} (t, q, v, a, ...) \\   &= I_{n>0} (t, q, Dq, D^2 q, ...) \\   &= D^{(n-1)} q \\     \\  J_{n} \circ \Gamma[q]   &= D(I_n (t, q, v, a, ...)) \\   \end{aligned}  }

.

The meaning of \displaystyle{\delta_\eta (fg)[q]} is

\displaystyle{\delta_\eta (f[q]g[q])}

— Me@2019-04-27 07:02:38 PM

\displaystyle{  \begin{aligned}  D(F \circ \Gamma[q])  &= \partial_0 F \circ \Gamma[q] J_0 \circ \Gamma[q] + \partial_1 F \circ \Gamma[q] J_1 \circ \Gamma[q] + \partial_2 F \circ \Gamma[q] J_2 \circ \Gamma[q] + ...  \\   &= \left[(\partial_0 F) J_0 + (\partial_1 F) J_1 + (\partial_2 F) J_2 + ... \right] \circ \Gamma[q]   \\   \end{aligned}  }

.
Eq. (1.113):

\displaystyle{  D_t F \circ \Gamma[q] = D(F \circ \Gamma[q])  }

\displaystyle{  \begin{aligned}  D_t F \circ \Gamma[q]   &= \left[(\partial_0 F) J_0 + (\partial_1 F) J_1 + (\partial_2 F) J_2 + ... \right] \circ \Gamma[q]   \\ \\  D_t F   &= (\partial_0 F) J_0 + (\partial_1 F) J_1 + (\partial_2 F) J_2 + ...    \\   \end{aligned}  }

Eq. (1.114):

\displaystyle{  \begin{aligned}  D_t F (t, q, v, a, ...)   &= \partial_0 F(t, q, v, a, ...) + \partial_1 F(t, q, v, a, ...) v + \partial_2 F(t, q, v, a, ...) a + ...   \\   \end{aligned}  }

.

\displaystyle{  \begin{aligned}  D_t F \circ \Gamma[q] (t)  &= \partial_0 F(t, q, v, a, ...) + \partial_1 F(t, q, v, a, ...) v(t) + \partial_2 F(t, q, v, a, ...) a(t) + ...   \\   \end{aligned}  }

\displaystyle{  \begin{aligned}  &D_t (F + G) \circ \Gamma[q] (t) \\  \end{aligned}  }

\displaystyle{  \begin{aligned}  &= \partial_0 \left[F(t, q, v, a, ...) + G(t, q, v, a, ...)\right] \\    &+ \partial_1 \left[F(t, q, v, a, ...) + G(t, q, v, a, ...)\right] v(t) \\    &+ \partial_2 \left[F(t, q, v, a, ...) + G(t, q, v, a, ...)\right] a(t) + ... \\   \end{aligned}  }

\displaystyle{  \begin{aligned}  &= \left[ \partial_0 F(t, q, v, a, ...) + \partial_0 G(t, q, v, a, ...)\right] \\    &+ \left[ \partial_1 F(t, q, v, a, ...) + \partial_1 G(t, q, v, a, ...)\right] v(t) \\    &+ \left[ \partial_2 F(t, q, v, a, ...) + \partial_2 G(t, q, v, a, ...)\right] a(t) + ... \\   \end{aligned}  }

\displaystyle{  \begin{aligned}  &= \partial_0 F(t, q, v, a, ...) + \partial_1 F(t, q, v, a, ...) v(t) + \partial_2 F(t, q, v, a, ...) a(t) + ... \\    &+ \partial_0 G(t, q, v, a, ...) + \partial_1 G(t, q, v, a, ...) v(t) + \partial_2 G(t, q, v, a, ...) a(t) + ... \\  \end{aligned}  }

\displaystyle{  \begin{aligned}  &= D_t F \circ \Gamma[q] (t) + D_t G \circ \Gamma[q] (t) \\  \end{aligned}  }

.

In short,

\displaystyle{  \begin{aligned}  D_t (F + G) \circ \Gamma[q] (t)   &= D_t F \circ \Gamma[q] (t) + D_t G \circ \Gamma[q] (t) \\   \end{aligned}  }

So

\displaystyle{  \begin{aligned}  D_t (F + G) \circ \Gamma[q] (t)   &= (D_t F + D_t G) \circ \Gamma[q] (t) \\   \\         D_t (F + G) \circ \Gamma[q]    &= (D_t F + D_t G) \circ \Gamma[q]  \\   \\         D_t (F + G)     &= D_t F + D_t G   \\   \end{aligned}  }

— Me@2022-04-20 11:42:52 AM

.

.

2022.04.21 Thursday (c) All rights reserved by ACHK

Ex 1.24 Constraint forces, 1.3

Structure and Interpretation of Classical Mechanics

.

Find the tension in an undriven planar pendulum.

~~~

Tangential component:

\displaystyle{\begin{aligned}  \left(F_{\text{net}}\right)_t &= m a_t \\  - mg \sin \theta &= m l \ddot \theta \\  \end{aligned}}

Radial component:

\displaystyle{\begin{aligned}  \left(F_{\text{net}}\right)_r &= m a_r \\  F(t) - mg \cos \theta &= m l \dot \theta^2 \\  \end{aligned}}

— Me@2022-04-10 04:22:27 PM

.

.

2022.04.10 Sunday (c) All rights reserved by ACHK

Ex 1.24 Constraint forces, 1.2

Ex 1.22 Driven pendulum, 3.2

Structure and Interpretation of Classical Mechanics

.

Find the tension in an undriven planar pendulum.

~~~

[guess]


(define ((q->r x_s y_s l) local)
  (let* ((q (coordinate local))
         (t (time local))
         (theta (ref q 0))
         (c (ref q 1))
         (F (ref q 2)))
    (up (+ (x_s t) (* c (sin theta)))
        (- (y_s t) (* c (cos theta)))
        F)))

(let* ((xs (literal-function 'x_s))
       (ys (literal-function 'y_s))
       (q (up (literal-function 'theta)
              (literal-function 'c)
              (literal-function 'F))))
  (show-expression ((compose (q->r xs ys 'l) (Gamma q)) 't)))


(define (L-theta m l x_s y_s U)
  (compose
   (L-driven-free m l x_s y_s U) (F->C (q->r x_s y_s l))))

(let* ((U (U-gravity 'g 'm))
       (xs (literal-function 'x_s))
       (ys (literal-function 'y_s))
       (q (up (literal-function 'theta)
              (literal-function 'c)             
              (literal-function 'F)))
       (L (L-theta 'm 'l xs ys U)))
  (show-expression (L ((Gamma q) 't))))
(/
 (+ (* l m ((D x_s) t) (c t) ((D theta) t) (cos (theta t)))
    (* 1/2 l m (expt (c t) 2) (expt ((D theta) t) 2))
    (* l m (c t) ((D theta) t) (sin (theta t)) ((D y_s) t))
    (* g l m (c t) (cos (theta t)))
    (* l m ((D x_s) t) ((D c) t) (sin (theta t)))
    (* -1 l m ((D c) t) (cos (theta t)) ((D y_s) t))
    (* -1 g l m (y_s t))
    (* 1/2 l m (expt ((D x_s) t) 2))
    (* 1/2 l m (expt ((D c) t) 2))
    (* 1/2 l m (expt ((D y_s) t) 2))
    (* 1/2 (expt l 2) (F t))
    (* -1/2 (expt (c t) 2) (F t)))
 l)

(let* ((U (U-gravity 'g 'm))
       (xs (literal-function 'x_s))
       (ys (literal-function 'y_s))
       (q (up (literal-function 'theta)
              (literal-function 'c)
              (literal-function 'F)))
       (L (L-theta 'm 'l xs ys U)))
  (show-expression (((Lagrange-equations L) q) 't)))

.


(let* ((U (U-gravity 'g 'm))
       (xs (lambda (t) 0))
       (ys (lambda (t) 'l))
       (q (up (literal-function 'theta)
              (lambda (t) 'l)
              (literal-function 'F)))
       (L (L-theta 'm 'l xs ys U)))
  (show-expression (((Lagrange-equations L) q) 't)))

.

\displaystyle{F(t) = l m \left[D \theta(t)\right]^2 + g m \cos \theta(t)}

.

[guess]

— Me@2022-04-05 04:16:51 PM

.

.

2022.04.05 Tuesday (c) All rights reserved by ACHK

Ex 1.22 Driven pendulum, 3.1

Ex 1.24 Constraint forces, 1.1

Structure and Interpretation of Classical Mechanics

.

~~~

[guess]

\displaystyle{ \begin{aligned} m \ddot{y} &= F \cos \theta - mg \\ m \ddot{x} &= - F \sin \theta \\ \end{aligned}}

\displaystyle{ \begin{aligned} m \ddot{y} &= F \frac{y_s - y}{l} - mg \\ m \ddot{x} &= - F \frac{x - x_s}{l} \\ \sqrt{(x_s - x)^2 + (y_s - y)^2} &= l \\ \end{aligned}}

.

\displaystyle{ \begin{aligned}  y_s &= l \\  x_s &= 0 \\  \end{aligned}}

\displaystyle{ \begin{aligned}  m \ddot{y} &= F \frac{l - y}{l} - mg \\  m \ddot{x} &= - F \frac{x}{l} \\  \sqrt{x^2 + (l - y)^2} &= l \\  \end{aligned}}

.


(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] }


(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
   (((Lagrange-equations L) q-rect) 't)))

\displaystyle{ \begin{aligned} mD^2x(t) + \frac{F(t)}{l} \left[x(t) - x_s(t)\right] &= 0 \\ mg + m D^2y(t) + \frac{F(t)}{l} [y(t) - y_s(t)] &= 0 \\ -l^2 + [y(t)-y_s(t)]^2 + [x(t)-x_s(t)]^2 &= 0 \\ \end{aligned}}


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

(define ((q->r x_s y_s l) local)
  (let* ((q (coordinate local))
         (t (time local))
         (theta (ref q 0))
         (F (ref q 1)))
    (up (+ (x_s t) (* l (sin theta)))
        (- (y_s t) (* l (cos theta)))
        F)))

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


(let* ((x_s (literal-function 'x_s))
       (y_s (literal-function 'y_s))
       (q (up (literal-function 'theta)             
              (literal-function 'F))))
  (show-expression ((Gamma q) 't)))


(let* ((xs (literal-function 'x_s))
       (ys (literal-function 'y_s))
       (q (up (literal-function 'theta)             
              (literal-function 'F))))
  (show-expression ((compose (q->r xs ys 'l) (Gamma q)) 't)))


(let* ((xs (literal-function 'x_s))
       (ys (literal-function 'y_s))
       (q (up (literal-function 'theta)             
              (literal-function 'F))))
  (show-expression ((F->C (q->r xs ys 'l)) ((Gamma q) 't))))



(define (L-theta m l x_s y_s U)
  (compose
   (L-driven-free m l x_s y_s U) (F->C (q->r x_s y_s l))))

(let* ((U (U-gravity 'g 'm))
       (xs (literal-function 'x_s))
       (ys (literal-function 'y_s))
       (q (up (literal-function 'theta)             
              (literal-function 'F))))
  (show-expression ((Gamma
                    (compose (q->r xs ys 'l) (Gamma q)))
                    't)))



(let* ((U (U-gravity 'g 'm))
       (xs (literal-function 'x_s))
       (ys (literal-function 'y_s))
       (q (up (literal-function 'theta)             
              (literal-function 'F))))
  (show-expression (U ((compose (q->r xs ys 'l) (Gamma q)) 't))))


(let* ((U (U-gravity 'g 'm))
       (xs (literal-function 'x_s))
       (ys (literal-function 'y_s))
       (q (up (literal-function 'theta)             
              (literal-function 'F))))
  (show-expression ((L-driven-free 'm 'l xs ys U)
		    ((Gamma (compose (q->r xs ys 'l) (Gamma q))) 't))))




(let* ((U (U-gravity 'g 'm))
       (xs (literal-function 'x_s))
       (ys (literal-function 'y_s))
       (q (up (literal-function 'theta)             
              (literal-function 'F))))
  (show-expression ((L-theta 'm 'l xs ys U) ((Gamma q) 't))))

\displaystyle{ \begin{aligned}   L_\theta     &=   \frac{1}{2} m (D x_s(t))^2  + \frac{1}{2} m (D y_s(t))^2  -  m g \left[ y_s(t) - l \cos \theta(t)  \right] \\  &+ \frac{1}{2} m l^2 (D \theta(t))^2   + lm D \theta(t) \left[     D x_s(t) \cos \theta(t) + \sin \theta(t) D y_s(t)  \right]    \\   \end{aligned}}

[guess]

— Me@2022-03-24 04:38:10 PM

.

.

2022.03.26 Saturday (c) All rights reserved by ACHK

Ex 1.23 Fill in the details

Structure and Interpretation of Classical Mechanics

.

Show that the Lagrange equations for Lagrangian (1.97) are the same as the Lagrange equations for Lagrangian (1.95) with the substitution \displaystyle{c(t) = l}, \displaystyle{Dc(t) = D^2 c(t) = 0}.

~~~

[guess]

The Lagrange equation:

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

.

Eq. 1.97:

\displaystyle{ L''(t,q,\dot q)}

\displaystyle{ = \sum_\alpha \frac{1}{2} m_\alpha \left( \partial_0 f_\alpha (t, q) + \partial_1 f_\alpha (t, q) \dot q \right)^2 - V(t, f(t,q,l)) }

.

Eq. 1.95:

\displaystyle{ L'(t;q,c,F; \dot q, \dot c, \dot F)}

\displaystyle{ = \sum_\alpha \frac{1}{2} m_\alpha \left( \partial_0 f_\alpha (t, q, c) + \partial_1 f_\alpha (t, q,c) \dot q + \partial_2 f_\alpha (t, q, c) \dot c \right)^2 }

\displaystyle{ - V(t, f(t,q,c)) - \sum_{\{ \alpha, \beta | \alpha < \beta, \alpha \leftrightarrow \beta \}} \frac{F_{\alpha \beta}}{2 l_{\alpha \beta}} \left[ c_{\alpha \beta}^2 - l_{\alpha \beta}^2 \right] }

.

\displaystyle{ \begin{aligned}   &L'(t;q,c,F; \dot q, \dot c, \dot F) \\   &= L'(t;\{q_{\alpha i}\}, \{c_{\alpha \beta}\}, \{F_{\alpha \beta}\}; \{\dot q_{\alpha i}\}, \{\dot c_{\alpha \beta}\}, \{\dot F_{\alpha \beta}\})  \\   \end{aligned}}

\displaystyle{ \begin{aligned}     &= \sum_\alpha \frac{1}{2} m_\alpha \left( \partial_0 f_\alpha (t;\{q_{\alpha i}\}, \{c_{\alpha \beta}\}) + \partial_1 f_\alpha (t;\{q_{\alpha i}\}, \{c_{\alpha \beta}\}) \dot q + \partial_2 f_\alpha (t;\{q_{\alpha i}\}, \{c_{\alpha \beta}\}) \dot c \right)^2 \\     &- V(t, f(t;\{q_{\alpha i}\}, \{c_{\alpha \beta}\})) - \sum_{\{ \alpha, \beta | \alpha < \beta, \alpha \leftrightarrow \beta \}} \frac{F_{\alpha \beta}}{2 l_{\alpha \beta}} \left[ c_{\alpha \beta}^2 - l_{\alpha \beta}^2 \right] \\    \end{aligned}}

\displaystyle{ \begin{aligned}     &= \sum_\alpha \frac{1}{2} m_\alpha \left( \frac{\partial f_\alpha}{\partial t} + \sum_i \frac{\partial f_\alpha}{\partial q_{\alpha i}} \dot q_{\alpha i} + \sum_\beta \frac{\partial f_\alpha}{\partial c_{\alpha \beta}} \dot c_{\alpha \beta} \right)^2 \\     &- V(t, f(t;\{q_{\alpha i}\}, \{c_{\alpha \beta}\})) - \sum_{\{ \alpha, \beta | \alpha < \beta, \alpha \leftrightarrow \beta \}} \frac{F_{\alpha \beta}}{2 l_{\alpha \beta}} \left[ c_{\alpha \beta}^2 - l_{\alpha \beta}^2 \right] \\    \end{aligned}}

.

Consider the mass \displaystyle{m_\alpha}:

\displaystyle{ \begin{aligned} \frac{d}{dt} \left( \frac{\partial L}{\partial \dot q_{\alpha i}} \right) - \frac{\partial L}{\partial q_{\alpha i}} &= 0 \\ \end{aligned}}

\displaystyle{ \begin{aligned} \frac{d}{dt} \left( \frac{\partial L}{\partial \dot c_{\alpha \beta}} \right) - \frac{\partial L}{\partial c_{\alpha \beta}} &= 0 \\ \end{aligned}}

.

\displaystyle{ \begin{aligned}   &\frac{\partial L}{\partial q_{\alpha i}} \\    &= \frac{\partial}{\partial q_{\alpha i}}     \left[ \sum_\alpha \frac{1}{2} m_\alpha \left( \frac{\partial f_\alpha}{\partial t} + \sum_j \frac{\partial f_\alpha}{\partial q_{\alpha j}} \dot q_{\alpha j} + \sum_\beta \frac{\partial f_\alpha}{\partial c_{\alpha \beta}} \dot c_{\alpha \beta} \right)^2     - V(t, f) \right] - 0 \\    &=       \sum_\alpha \frac{1}{2} m_\alpha \frac{\partial}{\partial q_{\alpha i}} \left( G \right)^2     - \frac{\partial}{\partial q_{\alpha i}} V(t, f(t;\{q_{\alpha j}\}, \{c_{\alpha \beta}\}))   \\    &=   \sum_\alpha m_\alpha     G    \frac{\partial G}{\partial q_{\alpha i}}     - \frac{\partial V}{\partial q_{\alpha i}}    \\      \end{aligned}}

.

\displaystyle{ \begin{aligned}     G &= \left( \frac{\partial f_\alpha}{\partial t} + \sum_j \frac{\partial f_\alpha}{\partial q_{\alpha j}} \dot q_{\alpha j} + \sum_\beta \frac{\partial f_\alpha}{\partial c_{\alpha \beta}} \dot c_{\alpha \beta} \right) \\    \frac{\partial G}{\partial q_{\alpha i}}     &= \frac{\partial}{\partial q_{\alpha i}} \left( \frac{\partial f_\alpha}{\partial t} + \sum_j \frac{\partial f_\alpha}{\partial q_{\alpha j}} \dot q_{\alpha j} + \sum_\beta \frac{\partial f_\alpha}{\partial c_{\alpha \beta}} \dot c_{\alpha \beta} \right) \\    &= \left( \frac{\partial}{\partial q_{\alpha i}} \frac{\partial f_\alpha}{\partial t} + \sum_j \frac{\partial}{\partial q_{\alpha i}} \frac{\partial f_\alpha}{\partial q_{\alpha j}} \dot q_{\alpha j} + \sum_\beta \frac{\partial}{\partial q_{\alpha i}} \frac{\partial f_\alpha}{\partial c_{\alpha \beta}} \dot c_{\alpha \beta} \right) \\      \end{aligned}}

[guess]

— Me@2022-03-06 05:24:18 PM

.

.

2022.03.07 Monday (c) All rights reserved by ACHK

Ex 1.22 Driven pendulum, 2.2

Structure and Interpretation of Classical Mechanics

.

Derive the equations of motion using the Newtonian constraint force prescription, and show that they are the same as the Lagrange equations.

~~~

[guess]


(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
   (((Lagrange-equations L) q-rect) 't)))

.

.

\displaystyle{ \begin{aligned}   mD^2x(t) + \frac{F(t)}{l} \left[x(t) - x_s(t)\right] &= 0 \\   mg + m D^2y(t) + \frac{F(t)}{l} [y(t) - y_s(t)] &= 0 \\   -l^2 + [y(t)-y_s(t)]^2 + [x(t)-x_s(t)]^2 &= 0 \\  \end{aligned}}

[guess]

— Me@2022-02-08 10:04:45 AM

.

.

2022.02.08 Tuesday (c) All rights reserved by ACHK

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

SICM, 4.2

This was a virtual machine running the installation of MS-DOS 6.22 in the program VMware Player.

VMware Player was able to run virtual machines, but not to create one. Luckily, there was a website that helped me create virtual machine files. A virtual machine file is just a VMware-formatted text file. It defines the specifications of that virtual machine.

Running MS-DOS 6.22 was just for nostalgia. The real reason for learning virtual machines was to use the mechanics software library of the textbook “Structure and Interpretation of Classical Mechanics”. That library was available only for Linux.

— Me@2021-12-31 01:29:46 PM

.

.

2021.12.31 Friday (c) All rights reserved by ACHK