Imports
/- Copyright (c) 2025 Tomas Skrivan. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Tomas Skrivan, Joseph Tooby-Smith -/ module public import Physlib.Mathematics.VariationalCalculus.HasVarGradient public import Physlib.SpaceAndTime.Time.Derivatives

Euler-Lagrange equations

In this module we define the Euler-Lagrange operator eulerLagrangeOp, and prove the that the variational derivative of the action functional ∫ L(t, q(t), dₜ q(t)) dt is equal to the Euler-Lagrange operator applied to the trajectory q.

@[expose] public sectionlemma eulerLagrangeOp_eq (L : Time X X ) (q : Time X) : eulerLagrangeOp L q = fun t => gradient (L t · (∂ₜ q t)) (q t) - ∂ₜ (fun t' => gradient (L t' (q t') ·) (∂ₜ q t')) t := X:Typeinst✝²:NormedAddCommGroup Xinst✝¹:InnerProductSpace Xinst✝:CompleteSpace XL:Time X X q:Time XeulerLagrangeOp L q = fun t => gradient (fun x => L t x (∂ₜ q t)) (q t) - ∂ₜ (fun t' => gradient (fun x => L t' (q t') x) (∂ₜ q t')) t All goals completed! 🐙lemma eulerLagrangeOp_zero (q : Time X) : eulerLagrangeOp (fun _ _ _ => 0) q = fun _ => 0 := X:Typeinst✝²:NormedAddCommGroup Xinst✝¹:InnerProductSpace Xinst✝:CompleteSpace Xq:Time XeulerLagrangeOp (fun x x_1 x_2 => 0) q = fun x => 0 All goals completed! 🐙X:Typeinst✝²:NormedAddCommGroup Xinst✝¹:InnerProductSpace Xinst✝:CompleteSpace XL:Time X X q:Time Xhq:ContDiff qhL:ContDiff Lt✝:Timet:TimeDifferentiableAt (L t) (q t, (fderiv q t) 1)X:Typeinst✝²:NormedAddCommGroup Xinst✝¹:InnerProductSpace Xinst✝:CompleteSpace XL:Time X X q:Time Xhq:ContDiff qhL:ContDiff Lt✝:Timet:TimeDifferentiableAt (fun x => L t (q t) x) ((fderiv q t) 1) X:Typeinst✝²:NormedAddCommGroup Xinst✝¹:InnerProductSpace Xinst✝:CompleteSpace XL:Time X X q:Time Xhq:ContDiff qhL:ContDiff Lt✝:Timet:TimeDifferentiableAt (L t) (q t, (fderiv q t) 1)X:Typeinst✝²:NormedAddCommGroup Xinst✝¹:InnerProductSpace Xinst✝:CompleteSpace XL:Time X X q:Time Xhq:ContDiff qhL:ContDiff Lt✝:Timet:TimeDifferentiableAt (fun x => L t (q t) x) ((fderiv q t) 1) apply ContDiff.differentiable (n := ) (X:Typeinst✝²:NormedAddCommGroup Xinst✝¹:InnerProductSpace Xinst✝:CompleteSpace XL:Time X X q:Time Xhq:ContDiff qhL:ContDiff Lt✝:Timet:TimeContDiff fun x => L t (q t) x All goals completed! 🐙) (X:Typeinst✝²:NormedAddCommGroup Xinst✝¹:InnerProductSpace Xinst✝:CompleteSpace XL:Time X X q:Time Xhq:ContDiff qhL:ContDiff Lt✝:Timet:Time 0 All goals completed! 🐙)