SICM Exercise 1.06
Solution to exercise 1.6 of Structure and Interpretation of Classical Mechanics by Gerald Jay Sussman and Jack Wisdom.
Minimizing action
🛈 Note
Suppose we try to obtain a path by minimizing an action for an impossible problem. For example, suppose we have a free particle and we impose endpoint conditions on the velocities as well as the positions that are inconsistent with the particle being free. Does the formalism protect itself from such an unpleasant attack? You may find it illuminating to program it and see what happens.
(define (Lagrangian-action L q t1 t2)
(definite-integral (compose L (Gamma q)) t1 t2))
(define (find-path Lagrangian ti qi t0 q0 t1 q1 tf qf n)
(let ((initial-qs (append (list qi)
(linear-interpolants q0 q1 n)
(list qf))))
(let ((minimizing-qs
(multidimensional-minimize
(parametric-path-action Lagrangian ti qi tf qf)
initial-qs)))
(make-path ti qi tf qf minimizing-qs))))
(define win2 (frame -0.2 1.2 -0.2 1.2))
(define ((parametric-path-action Lagrangian t0 q0 t1 q1) intermediate-qs)
(let ((path (make-path t0 q0 t1 q1 intermediate-qs)))
(graphics-clear win2)
(plot-function win2 path t0 t1 (/ (- t1 t0) 100))
(Lagrangian-action Lagrangian path t0 t1)))
(define ((L-free-particle m) local)
(let ((v (velocity local)))
(* 1/2 m (square v))))
(find-path (L-free-particle 1.0) 0.0 0.0 0.05 -0.5 0.95 1.5 1.0 1.0 2)
Tags:
Authors: