Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (Lagrange-eq L q)
- (- (D (compose ((partial 2) L) (Gamma q)))
- (compose ((partial 1) L) (Gamma q))))
- (define (V x y)
- (+ (/ (+ (square x) (square y)) 2)
- (* (square x) y)
- (- (/ (cube y) 3))))
- (define ((L m) local)
- (let ((vx (ref (velocity local) 0))
- (vy (ref (velocity local) 1))
- ( x (ref (coordinate local) 0))
- ( y (ref (coordinate local) 1)))
- (- (/ (* m (+ (square vx) (square vy))) 2)
- (V x y))))
- (define (q t)
- (up
- ((literal-function 'x) t)
- ((literal-function 'y) t)))
- (print-expression
- ((Lagrange-eq (L 'm) q) 't))
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement