C-h ?


C-h w command-name

C-h k key-sequence

C-h f function-name

— Me@2022-06-18 12:52:10 PM

.

.

2022.06.19 Sunday (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

3Blue1Brown

(defun 3b1b ()

    (interactive)

    (setq is-python-mode (string= major-mode "python-mode"))

    (if (not is-python-mode)
        (print "This is not a python file.")


        (print buffer-file-name)

        (setq the-command (format "%s %s %s" 
                                "manim -p"
                                buffer-file-name  
                                "JustAShape")) 

        (print the-command)                        

        (shell-command the-command) 
    )  
)

(global-set-key (kbd "C-p") '3b1b)

(global-set-key (kbd "C-/") 'comment-region)

(global-set-key (kbd "C-.") 'uncomment-region)

— Me@2022-06-05 04:00:37 PM

.

.

2022.06.05 Sunday (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

Lisp macros 3

Power

Macros are one of the things that make Lisp so extensible, because they let you transform arbitrary code into other arbitrary code. This is true for macros in languages like C too, but Common Lisp macros are different because they’re part of the language.

In C you have a layer of macros on top, written in a preprocessor macro language. The macro layer and the language layer are separate from each other, with the macro layer providing one one extra level of abstractive power (which, don’t get me wrong, is certainly useful).

In Common Lisp, you write macros in Common Lisp itself. You can then use those macros to write functions, and use those functions to write more macros. Instead of two stratified layers it’s a feedback loop of abstractive power.

— A Road to Common Lisp

— Steve Losh

.

.

2022.05.22 Sunday ACHK

Watermelon

1990s, 19

.

(package-initialize)

(custom-set-variables
 '(cua-mode t nil (cua-base))
 '(custom-enabled-themes (quote (leuven))))
(custom-set-faces
 )

(set-register ?e '(file . "~/.emacs"))

(prefer-coding-system 'utf-8)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defun backup-dot-emacs ()
  (interactive)

  (save-buffer)

  (setq backup-path (format "%s%s%s" 
              "/path_to_the_backup_folder/ubuntu_dot_emacs_" 
              (format-time-string "%Y_%m_%d_%I_%M_%S_%p")  
              ".el"))
  
  (write-file backup-path 'confirm)

  (setq original-cursor (point))

  (kill-buffer) 
  (find-file "~/.emacs")

  (goto-char original-cursor)
)

(global-set-key (kbd "C-`") 'backup-dot-emacs)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(set-register ?d '(file . "/path_to_the_blog_folder/dialogue59.txt"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(defun backup-blogging-tray ()
  (interactive)
  (save-buffer)

  (setq return-file-name (buffer-file-name))

  (setq backup-path (format "%s%s%s" 
                "/path_to_the_backup_folder/blogging_tray_" 
                (format-time-string "%Y_%m_%d_%I_%M_%S_%p")  
                ".txt"))

  (write-file backup-path 'confirm)

  (setq original-cursor (point))

  (kill-buffer) 

  (find-file return-file-name)

  (goto-char original-cursor)
 
)

(global-set-key (kbd "C-x C-a") 'backup-blogging-tray)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

— Me@2022.05.14 05:10:49 PM

.

.

2022.05.14 Saturday (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

Junkions

output = system.exec_command("date +%Y.%m.%d")
output += " "
output += system.exec_command("date +%I:%M:%S")
output += " "
output += system.exec_command("date +%p")

clipboard.fill_clipboard(output.upper())
keyboard.send_keys("<ctrl>+v")

output = system.exec_command("date +%Y.%m.%d")
output += " "
output += system.exec_command("date +%A")
output += " (c) All rights reserved by "

clipboard.fill_clipboard(output)
keyboard.send_keys("<ctrl>+v")

.

output = system.exec_command("date +_%Y_%m_%d_")
output += system.exec_command("date +_%H_%M_%S_%p")

clipboard.fill_clipboard(output.upper())
keyboard.send_keys("<ctrl>+v")

— Me@2022.05.07 11:27:28 AM

.

.

2022.05.07 Saturday (c) All rights reserved by ACHK

The Lisp debugger

oo101 7 days ago [-]

There are a few ways in which the shared objects method you suggest does not match the full power of Lisp debugging.

First of all, when a C program crashes, it just crashes. There is no REPL. There is only a core dump. So any live-debugging you plan to do is after the fact. After you have seen a crash, you would now begin to prepare for the next crash by launching your process via GDB or restarting your process and attaching a GDB to it. Whether a similar crash would occur again or not or when it would occur again depends on the nature of the bug. Now contrast this with Lisp debugging when your program crashes, it stops there and offers you an REPL to interact with the program right then. There is no need to wait for the next crash.

Secondly, when you debug with GDB, you would be dealing with syntaxes: The syntax of C that we are so familiar with. The GDB syntax to investigate the problem that we may be less familiar with. When the Lisp debugger offers the REPL to you, you are working with Lisp again. Your compiler, debugger, program, etc. all are part of the same unified environment where you just execute Lisp code to debug your issue.

Finally, putting your code in shared objects and reloading them requires you to go through the complete write-build-test-debug cycle. And then what do you do if your shared object itself crashes? With Lisp you skip the write-build-test part when all you want to do is debug an error. You jump straight to the debug part of the cycle and begin investigating the runtime state. And it works the same in a uniform manner whether your main program crashes or a dependency crashes.

— A Road to Common Lisp

— Hacker News

.

.

2022.05.05 Thursday ACHK

AutoKey

First photo, 3 | 1990, 3

.


output = system.exec_command("date +%Y.%m.%d")
keyboard.send_keys(output + " ")
output = system.exec_command("date +%I:%M")
keyboard.send_keys(output + " ")
output = system.exec_command("date +%p")
keyboard.send_keys(output)


output = system.exec_command("date +%Y.%m.%d")
keyboard.send_keys(output + " ")
output = system.exec_command("date +%A")
keyboard.send_keys(output)
output = " (c) All rights reserved by "
keyboard.send_keys(output)


output = system.exec_command("date +_%Y_%m_%d_")
keyboard.send_keys(output)
output = system.exec_command("date +_%H_%M_%S_%p")
keyboard.send_keys(output)

— Me@2022.04.28 09:04 AM

.

.

2022.04.28 Thursday (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

C and Lisp

numeromancer on Jan 25, 2010 [-]

In every art there is a dichotomy between the practical and the theoretical, and each has their fundamentals. In Comp. Sci., those two sets of fundamentals are these: sets of machine instructions, which come in several varieties; and lambda calculus, or one of the equivalent (by Church’s Thesis) formal systems. C and Lisp are similar in that they represent the first steps in each case to reach the other: C is a level above machine code, providing some abstraction and portability to the use of machine code, the fundamental elements of practical computing; lisp is a level above lambda calculus, providing a practical system for using functions, the fundamental elements of theoretical computing.

In short, mastery of C is concomitant with the ability to measure the cost of computation (sometimes, regardless of the value of it); mastery of Lisp is concomitant with the ability to measure the value of computation (sometimes, regardless of the cost).

Since C and Lisp lie on opposite borders of the universe of computation, knowing both will allow you to better measure the scope of that universe.

— Ask HN: Why does learning lisp make you a better C-programmer?

— Hacker News

.

.

2022.04.07 Thursday 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

程式員頭腦 15

數學教育 7

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

.

But while you don’t literally need math for most kinds of hacking, in the sense of knowing 1001 tricks for differentiating formulas, math is very much worth studying for its own sake. It’s a valuable source of metaphors for almost any kind of work.[3] I wish I’d studied more math in college for that reason.

[3] Eric Raymond says the best metaphors for hackers are in set theory, combinatorics, and graph theory.

— Undergraduation

— March 2005

— Paul Graham

.

(安:另外,他提的另一個,有關學習數學的要點是,即使假設你在大學中,學到的數學,在日常生活中沒有用,單單是為獲取,那些嶄新的元素概念本身,就已經能夠令你有超能力;令你有一些,常人沒有的思考工具、比喻語言。)

.

那和我之前,叫你學 programming(電腦編程),意思是一樣的。

那本 programming 教科書《SICP》(Structure and Interpretation of Computer Programs),竟然教曉我,時間的定義和數字的定義等。

— Me@2022-02-13 10:46:08 AM

.

.

2022.02.13 Sunday (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