|
16 | 16 | [mentat-collective.emmy.scheme :refer [define-1 let-scheme lambda]] |
17 | 17 | [civitas.repl :as repl])) |
18 | 18 |
|
| 19 | +;; TODO: Make a button for @path-dimension to make dimensions switchable from 4 -> 2 |
| 20 | + |
19 | 21 | ;; I investigate a Lorentz covariant Lagrangian that is not widely known. It is discussed in the textbooks of Greiner, "Systems of Particles and Hamiltonian Mechanics" (chapter 21), and also [on-line in: Cline, "Variational Principles in Classical Mechanics"](https://phys.libretexts.org/Bookshelves/Classical_Mechanics/Variational_Principles_in_Classical_Mechanics_(Cline)/17%3A_Relativistic_Mechanics/17.06%3A_Lorentz-Invariant_Formulation_of_Lagrangian_Mechanics). |
20 | 22 |
|
21 | 23 | ;; Then I derive, along deBroglie's argument, the momentum-wavelength relation of a free particle. |
|
80 | 82 | '(defn show-tex [e] |
81 | 83 | (->infix e))) |
82 | 84 |
|
| 85 | +^:kindly/hide-code |
| 86 | +(define (eq-transformation f) |
| 87 | + (lambda (tuple) |
| 88 | + (apply down (map f tuple)))) |
| 89 | + |
| 90 | +^:kindly/hide-code |
| 91 | +(kind/scittle |
| 92 | + '(defn show-eq [tuple] |
| 93 | + (->infix (simplify (down (first tuple) '= (second tuple)))))) |
| 94 | + |
83 | 95 | ^:kindly/hide-code |
84 | 96 | (def tex (comp kind/tex emmy.expression.render/->TeX)) |
85 | 97 |
|
86 | 98 | ^:kindly/hide-code |
87 | 99 | (def tex-simp (comp tex simplify)) |
88 | 100 |
|
| 101 | +^:kindly/hide-code |
| 102 | +(defn fn-show-eq [tuple] |
| 103 | + (tex-simp (down (first tuple) '= (second tuple)))) |
89 | 104 |
|
90 | 105 | ^:kindly/hide-code |
91 | 106 | (define show-exp (comp str simplify)) |
|
121 | 136 | (list 'tex e) |
122 | 137 | (reag-comp e))) |
123 | 138 |
|
| 139 | +^:kindly/hide-code |
| 140 | +(defmacro show-eq [e] |
| 141 | + (if prod |
| 142 | + (list 'fn-show-eq e) |
| 143 | + (reag-comp e))) |
| 144 | + |
124 | 145 | ^:kindly/hide-code |
125 | 146 | (define velocities velocity) |
126 | 147 |
|
|
157 | 178 | (let ((v (velocity local))) |
158 | 179 | (* 1/2 mass (square c) |
159 | 180 | (- (* (/ 1 (square c)) |
160 | | - (+ (square (ref v 1)) |
161 | | - (square (ref v 2)) |
162 | | - (square (ref v 3)))) |
| 181 | + (square (apply up (rest v)))) |
163 | 182 | (square (ref v 0)) |
164 | 183 | 1)))) |
165 | 184 |
|
|
187 | 206 | (show-tex-expression |
188 | 207 | ((Gamma Lc-test-path) 's)) |
189 | 208 |
|
| 209 | +^:kindly/hide-code |
| 210 | +(define path-dimension (atom true)) #_"true = 4D , false = 2D" |
190 | 211 |
|
191 | | -(define three-path (up (literal-function 'x) |
192 | | - (literal-function 'y) |
193 | | - (literal-function 'z))) |
| 212 | +^:kindly/hide-code |
| 213 | +(define three-path |
| 214 | + (if @path-dimension |
| 215 | + (up (literal-function 'x) |
| 216 | + (literal-function 'y) |
| 217 | + (literal-function 'z)) |
| 218 | + (up (literal-function 'x)))) |
194 | 219 |
|
195 | 220 | (show-tex-expression |
196 | 221 | ((Gamma three-path) 't)) |
197 | 222 |
|
198 | 223 | (show-tex-expression |
199 | 224 | ((compose (L-free-particle 'm) (Gamma three-path)) 't)) |
200 | 225 |
|
201 | | -(define four-path (up identity |
202 | | - (literal-function 'x) |
203 | | - (literal-function 'y) |
204 | | - (literal-function 'z))) |
| 226 | +^:kindly/hide-code |
| 227 | +(define four-path |
| 228 | + (if @path-dimension |
| 229 | + (up identity |
| 230 | + (literal-function 'x) |
| 231 | + (literal-function 'y) |
| 232 | + (literal-function 'z)) |
| 233 | + (up identity |
| 234 | + (literal-function 'x)))) |
205 | 235 |
|
206 | 236 | (show-tex-expression |
207 | 237 | ((Gamma four-path) 's)) |
|
225 | 255 |
|
226 | 256 | ;; The first $0$ is because we set $t=s$ for the path. This reduces the extended Lagrangian to the "conventional" case. Reassuring. Now we can allow arbitrary functions $t(s)$, making the path truely 4-dimensional. |
227 | 257 |
|
228 | | -(define Lc-path (up (literal-function 't) |
229 | | - (literal-function 'x) |
230 | | - (literal-function 'y) |
231 | | - (literal-function 'z))) |
| 258 | +^:kindly/hide-code |
| 259 | +(define Lc-path |
| 260 | + (if @path-dimension |
| 261 | + (up (literal-function 't) |
| 262 | + (literal-function 'x) |
| 263 | + (literal-function 'y) |
| 264 | + (literal-function 'z)) |
| 265 | + (up (literal-function 't) |
| 266 | + (literal-function 'x)))) |
232 | 267 |
|
233 | 268 | #_(define Lc-path (up (literal-function 't) |
234 | 269 | (literal-function 'x))) |
|
245 | 280 |
|
246 | 281 | ;; It is very interesting that a constant term can lead to a new formalism. Cline: "It provides a plausible manifestly-covariant Lagrangian for the one-body system, but serious problems exist extending this to the N-body system when N>1". |
247 | 282 |
|
248 | | -;; Nobody possesses a Lorentz covariant N-body mechanics. Goldstein "Classical Mechanics", chapter 7,9: "Hitherto, there does not exist a satisfying description of the relativistic many body system." |
| 283 | +;; Nobody possesses a Lorentz covariant N-body mechanics. Goldstein "Classical Mechanics", chapter 7.9: "Hitherto, there does not exist a satisfying description of the relativistic many body system." |
249 | 284 |
|
250 | | -;; This non-homogeneous business requires an implicit $L - pv = 0$ constraint (Cline Eq. 17.6.12, Struckmeier Eq. 21.9) |
| 285 | +;; ### The Constraint on the four dimensional path |
251 | 286 |
|
252 | | -(define (Lc1-Lagrange-constraint Lagrangian) |
| 287 | +;; The Lagranian above looks very nice because it is symmtreic in t, x, y, z. But there is a caveat which ultimately brings it in line with the orthodox formulation. |
| 288 | + |
| 289 | +;; Non-homogeneous but symmetric Lagrangians of this type require a general implicit constraint: $L - pv = 0$ (Cline Eq. 17.6.12, Struckmeier Eq. 21.9) |
| 290 | + |
| 291 | +(define (Lc-Lagrange-constraint Lagrangian) |
253 | 292 | (- Lagrangian (* ((partial 2) Lagrangian) velocity))) |
254 | 293 |
|
255 | | -;; By multiplication this with a constant factor, this leads to Struckmeier Eq. 21.12: |
| 294 | +;; Applied to the free particle (and multiplication with a constant factor), leads to (Struckmeier Eq. 21.12): |
256 | 295 |
|
257 | | -(define Lc1-constr (compose (* (/ 2 (square 'c) 'm_0) |
258 | | - (Lc1-Lagrange-constraint (Lc-free-particle 'm_0 'c))) (Gamma Lc-path))) |
| 296 | +(define Lc-constraint-s |
| 297 | + (down (constantly 0) (compose (* (/ 2 (square 'c) 'm_0) |
| 298 | + (Lc-Lagrange-constraint (Lc-free-particle 'm_0 'c))) |
| 299 | + (Gamma Lc-path)))) |
259 | 300 |
|
260 | | -(show-tex-expression |
261 | | - (Lc1-constr 's)) |
| 301 | +^:kindly/hide-code |
| 302 | +(show-eq |
| 303 | + (Lc-constraint-s 's)) |
262 | 304 |
|
263 | | -;; This constraint cannot be dealt with easily (contrary to constraints that do not depend on velocity but position which can be treated via Lagrange multipliers.) |
| 305 | +;; The above is a constraint, i.e. needs to be zero, needs to vanish for all physical paths. |
264 | 306 |
|
265 | | -;; Calculate $dt/ds$ |
266 | | -(define t-prime (sqrt (+ (- Lc1-constr) |
267 | | - (square (ref (ref (Gamma Lc-path) 2) 0))))) |
| 307 | +;; Contrary to constraints that depend on position, this constraint (being about velocity) cannot be easily treated via Lagrange multipliers. |
268 | 308 |
|
269 | | -(show-tex-expression |
270 | | - (t-prime 's)) |
| 309 | +;; We proceed to explicitely calculate $(Dt(s))^2$ |
271 | 310 |
|
272 | | -;; Maybe not useful, but one could also calculate $d^2t/ds^2$ |
| 311 | +(define t (literal-function 't)) |
273 | 312 |
|
274 | | -^{:kindly/kind :kind/hidden} |
275 | | -(show-tex-expression |
276 | | - ((D t-prime) 's)) |
| 313 | +(define Dt-squared |
| 314 | + ((eq-transformation |
| 315 | + #(- (square (D t)) %)) |
| 316 | + Lc-constraint-s)) |
| 317 | + |
| 318 | +^:kindly/hide-code |
| 319 | +(show-eq |
| 320 | + (Dt-squared 's)) |
277 | 321 |
|
278 | | -;; Important is that $dt/ds$ leads to $ds/dt$ and the famous $\gamma$ factor (see e.g. Cline) |
| 322 | +;; The above is meant as an equality. |
| 323 | + |
| 324 | +;; We now upgrade the parameter $s$ to a function $s(t)$ which is the inverse of $t(s)$, $s = t^{-1}$. |
| 325 | + |
| 326 | +(define s (literal-function 's)) |
| 327 | + |
| 328 | +;; Inverse means that $t(s(y)) = y$. While in the math rendering there is a minor risk of confusion, in the underlying code we do not need the auxilary `y`, the function `t` and the symbol `'t` are clearly distinct: |
| 329 | + |
| 330 | +(define t°s (down (comp t s) identity)) |
| 331 | + |
| 332 | +(show-eq |
| 333 | + (t°s 't)) |
| 334 | + |
| 335 | +;; The derivative results in the number `one` |
| 336 | + |
| 337 | +(show-eq |
| 338 | + ((D t°s) 't)) |
| 339 | + |
| 340 | +;; With this interlude, we return to the constraint. Just by formally replacing $s \rightarrow s(t)$, it reads as |
| 341 | + |
| 342 | +(show-eq |
| 343 | + (Dt-squared (s 't))) |
| 344 | + |
| 345 | +;; We'd like to get rid of the function `t` and only keep the symbol/parameter `'t`. For this, we multiply the above equation by $(Ds(t))^2$ |
| 346 | + |
| 347 | +(define eq1 |
| 348 | + ((eq-transformation |
| 349 | + #(* ((square (D s)) 't) %)) |
| 350 | + (* (Dt-squared (s 't))))) |
| 351 | + |
| 352 | +(show-eq eq1) |
| 353 | + |
| 354 | +;; We introduce the following slighly sloppy notation |
| 355 | + |
| 356 | +(show-eq |
| 357 | + ((down three-path (comp three-path s)) 't)) |
| 358 | + |
| 359 | +;; The derivative of this definition is |
| 360 | +(show-eq |
| 361 | + ((D (down three-path (comp three-path s))) 't)) |
| 362 | + |
| 363 | +;; With this the constraint becomes |
| 364 | + |
| 365 | +^:kindly/hide-code |
| 366 | +(define constraint-1 |
| 367 | + (down 1 (/ (+ (* (square 'c) |
| 368 | + ((square (D (literal-function 's))) 't)) |
| 369 | + ((square (D three-path)) 't)) |
| 370 | + (square 'c)))) |
| 371 | + |
| 372 | +(show-eq |
| 373 | + constraint-1) |
| 374 | + |
| 375 | +;; Remember that, as shown above, the number `one` appears because of $s = t^{-1}$ |
| 376 | + |
| 377 | +;; Isolating $Ds(t)$ on the right hand side |
| 378 | + |
| 379 | +(show-eq |
| 380 | + ((eq-transformation |
| 381 | + #(sqrt (- % (/ ((square (D three-path)) 't) (square 'c))))) |
| 382 | + constraint-1)) |
| 383 | + |
| 384 | +;; The above equation, which is just another expression of the constraint $L - pv = 0$, is conventionally written as below, introducing the famous $\gamma$ factor of Special Relativity. |
279 | 385 |
|
280 | 386 | ^:kindly/hide-code |
281 | 387 | (kind/tex |
282 | 388 | "\\frac{ds}{dt} = \\sqrt{1- \\frac{v^2}{c^2}} = \\sqrt{1 - \\beta ^ 2} = \\frac{1}{\\gamma}") |
283 | 389 |
|
| 390 | +;; Thus, the function $s(t)$ is nothing but the proper time. |
| 391 | + |
284 | 392 | ;; ## The deBroglie wavelength |
285 | 393 |
|
286 | 394 | ^:kindly/hide-code |
|
0 commit comments