JetCalculus[EulerLagrange] - calculate the Euler-Lagrange equations for a Lagrangian
Calling Sequences
EulerLagrange(L)
EulerLagrange(λ )
EulerLagrange(ω)
Parameters
L - a function on a jet space defining the Lagrange function for a variational problem (single or multiple integral)
λ - a differential bi-form on a jet space defining the Lagrangian form for a variational problem (single or multiple integral)
ω - a differential bi-form of vertical degree > 0
Description
Examples
Let π:E→M be a fiber bundle, with base dimension n and fiber dimension m and let πk:JkE → M be the k-th jet bundle. Introduce local coordinates (xi, uα, uiα, uijα, ..., uij ⋅⋅⋅ℓα, ...) where, as usual, if s:M→E is a section and σ=jksx:M→E is the k-jet of s, then
uij ⋅⋅⋅ ℓασ = ∂k sα x∂xi ∂xi⋅⋅⋅∂xℓ and 1≤i≤j⋅⋅⋅≤ℓ≤ dimM.
A function L on JkE defines the action integral or fundamental integral,
Is = ∫M Ljks dx1 dx2 ⋅⋅⋅dxn ,
for a k-th order multiple integral problem in the calculus of variations. The Euler-Lagrange equations EαL =0 are the system of m, 2kth−order partial differential equations for the extremals s of the action integral Is. The general formula for the components of the Euler-Lagrange operator are
EαL = ∂L ∂uα−Di∂L ∂uiα+Dij∂L ∂uijα − ⋅⋅⋅+−1k Dij⋅⋅⋅ℓ∂L ∂uij⋅⋅⋅ℓα,
where Di is the total derivative with respect to xi. In the special case of a single integral variational problem, this formula can be written as
EαL = ∂L ∂uα−ddx∂L ∂u.α+d2dx2∂L ∂u..α − ⋅⋅⋅⋅
while for a double integral problem, we have
EαL = ∂L ∂uα−Dx∂L ∂uxα − Dy∂L ∂uyα+Dxx∂L ∂uxxα + Dxy∂L ∂uxyα + Dyy∂L ∂uyyα −⋅⋅⋅.
See Gelfand and Fomin for an excellent introduction to the calculus of variations.
For the first calling sequence, EulerLagrange(L) returns the list of functions E1L, E2L, ... , EmL on J2kE.
The differential forms on the jet spaces JkE can be bi-graded by their horizontal and vertical/contact degree. A differential form of horizontal degree n and vertical degree 0 is called a Lagrangian form or Lagrangian bi-form. In terms of local coordinates on JkE, a Lagrangian bi-form λ can be expressed as
λ = L ( xi, uα, uiα, uijα, ..., uij ⋅⋅⋅ ℓα) Dx1∧ Dx2 ∧⋅⋅⋅∧ Dxn .
The associated Euler-Lagrange form Eλ is a differential bi-form of horizontal degree n and vertical degree 1. It is defined in terms of the usual Euler-Lagrange expressions EαL by
Eλ = EαLΘα∧ Dx1∧Dx2 ∧ ⋅⋅⋅ ∧Dxn where Θα = duα − uiα dxi
For geometrical aspects of the calculus of variations, the representation of the Euler-Lagrange equations as the components of a differential bi-form is very useful.
The third calling sequence EulerLagrange(ω) returns a list of m differential bi-forms of vertical degree 1 less than the vertical degree of ω. Here the partial derivatives with respect to the jets of dependent variables uij ⋅⋅⋅ ℓα in the usual formula for the Euler-Lagrange operator acting on functions are replaced by interior products of the corresponding vector fields, that is,
Eαω = ι αω −Di ι αiω +Dij ιαijω − ⋅⋅⋅+−1k Dij⋅⋅⋅ℓ ιαij ⋅⋅⋅ℓ ω where ι αij⋅⋅⋅ℓ denotes the interior product with the vector field ∂ ∂uij⋅⋅⋅ℓα
The command EulerLagrange is part of the DifferentialGeometry:-JetCalculus package. It can be used in the form EulerLagrange(...) only after executing the commands with(DifferentialGeometry) and with(JetCalculus), but can always be used by executing DifferentialGeometry:-JetCalculus:-EulerLagrange(...).
with⁡DifferentialGeometry:with⁡JetCalculus:
Example 1.
Create a space of 1 independent variable and 3 dependent variables.
DGsetup⁡t,u,v,w,E,2:
Define the standard Lagrangian L from mechanics as the difference between the kinetic and potential energy.
L≔12⁢u12+v12+w12−V⁡u,v,w
L≔u122+v122+w122−V⁡u,v,w
Calculate the Euler-Lagrange equations for L.
EL≔EulerLagrange⁡L
EL≔−Vu−u1,1,−Vv−v1,1,−Vw−w1,1
The convert/DGdiff command will change this output from jet space notation to standard differential equations notation.
convert⁡EL,DGdiff
−D1⁡V⁡u⁡t,v⁡t,w⁡t−ut,t,−D2⁡V⁡u⁡t,v⁡t,w⁡t−vt,t,−D3⁡V⁡u⁡t,v⁡t,w⁡t−wt,t
Here are the same calculations done with differential forms.
λ≔L&multDt
λ≔u122+v122+w122−V⁡u,v,w⁢Dt
EulerLagrange⁡λ
Vu+u1,1⁢Dt⁢⋀⁢Cu+Vv+v1,1⁢Dt⁢⋀⁢Cv+Vw+w1,1⁢Dt⁢⋀⁢Cw
Example 2.
Create a space of 1 independent variable and 1 dependent variable.
DGsetup⁡x,u,E,2:
Calculate the Euler-Lagrange equations for an arbitrary second order Lagrangian.
L2≔F⁡x,u,u1,u1,1:
PDEtoolsdeclare⁡F⁡x,u,u1,u1,1,quiet
Eul1≔EulerLagrange⁡L2
Eul1≔Fu−Fx,u1−Fu,u1⁢u1−Fu1,u1⁢u1,1−Fu1,u1,1⁢u1,1,1+Fx,x,u1,1+Fx,u,u1,1⁢u1+Fx,u1,u1,1⁢u1,1+Fx,u1,1,u1,1⁢u1,1,1+Fu,u,u1,1⁢u1+Fu,u1,u1,1⁢u1,1+Fu,u1,1,u1,1⁢u1,1,1+Fx,u,u1,1⁢u1+Fu,u1,u1,1⁢u1+Fu1,u1,u1,1⁢u1,1+Fu1,u1,1,u1,1⁢u1,1,1+Fu,u1,1+Fx,u1,u1,1⁢u1,1+Fu,u1,1,u1,1⁢u1+Fu1,u1,1,u1,1⁢u1,1+Fu1,1,u1,1,u1,1⁢u1,1,1+Fu1,u1,1+Fx,u1,1,u1,1⁢u1,1,1+Fu1,1,u1,1⁢u1,1,1,1
Compare with the usual formula for the Euler-Lagrange expression in terms of the total derivatives (calculated using TotalDiff) of the partial derivative of L with respect to the jet coordinates u0, u1, u1,1.
P0,P1,P2≔diff⁡L2,u,diff⁡L2,u1,diff⁡L2,u1,1
P0,P1,P2≔Fu,Fu1,Fu1,1
Eul2≔P0−TotalDiff⁡P1,1+TotalDiff⁡P2,1,1
Eul2≔Fu−Fx,u1−Fu,u1⁢u1−Fu1,u1⁢u1,1−Fu1,u1,1⁢u1,1,1+Fx,x,u1,1+Fx,u,u1,1⁢u1+Fx,u1,u1,1⁢u1,1+Fx,u1,1,u1,1⁢u1,1,1+Fu,u,u1,1⁢u1+Fu,u1,u1,1⁢u1,1+Fu,u1,1,u1,1⁢u1,1,1+Fx,u,u1,1⁢u1+Fu,u1,u1,1⁢u1+Fu1,u1,u1,1⁢u1,1+Fu1,u1,1,u1,1⁢u1,1,1+Fu,u1,1+Fx,u1,u1,1⁢u1,1+Fu,u1,1,u1,1⁢u1+Fu1,u1,1,u1,1⁢u1,1+Fu1,1,u1,1,u1,1⁢u1,1,1+Fu1,u1,1+Fx,u1,1,u1,1⁢u1,1,1+Fu1,1,u1,1⁢u1,1,1,1
Eul2−Eul11
0
Here are the same calculations again using an alternative jet space notation. See Preferences for details.
Preferences⁡JetNotation,JetNotation2
JetNotation1
L2≔F⁡x,u0,u1,u2:
PDEtoolsdeclare⁡F⁡x,u,u1,u2,quiet
Eul1≔Fu0−Fx,u1−Fu0,u1⁢u1−Fu1,u1⁢u2−Fu1,u2⁢u3+Fx,x,u2+Fx,u0,u2⁢u1+Fx,u1,u2⁢u2+Fx,u2,u2⁢u3+Fu0,u0,u2⁢u1+Fu0,u1,u2⁢u2+Fu0,u2,u2⁢u3+Fx,u0,u2⁢u1+Fu0,u1,u2⁢u1+Fu1,u1,u2⁢u2+Fu1,u2,u2⁢u3+Fu0,u2+Fx,u1,u2⁢u2+Fu0,u2,u2⁢u1+Fu1,u2,u2⁢u2+Fu2,u2,u2⁢u3+Fu1,u2+Fx,u2,u2⁢u3+Fu2,u2⁢u4
Preferences⁡JetNotation,JetNotation1
JetNotation2
Example 3.
Create a space of 3 independent variables and 1 dependent variable. Derive the Laplace's equation from its variational principle.
DGsetup⁡x,y,z,u,E,1:
L3≔12⁢u12+u22+u32
L3≔u122+u222+u322
E3≔EulerLagrange⁡L3
E3≔−u1,1−u2,2−u3,3
convert⁡E31,DGdiff
−ux,x−uy,y−uz,z
Repeat this computation using differential forms.
λ3≔evalDG⁡L3⁢Dx&wDy&wDz
λ3≔u122+u222+u322<