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⁢Dx⁢⋀⁢Dy⁢⋀⁢Dz
EulerLagrange⁡λ3
u1,1+u2,2+u3,3⁢Dx⁢⋀⁢Dy⁢⋀⁢Dz⁢⋀⁢Cu
Example 4.
Create a space of 3 independent variables and 3 dependent variables. Derive 3-dimensional Maxwell equations from the variational principle.
DGsetup⁡x,y,t,A_x,A_y,A_t,M,1:
Define the Lagrangian.
L≔−12⁢A_t22+A_t2⁢A_y3−12⁢A_y32−12⁢A_t12+A_t1⁢A_x3−12⁢A_x32+12⁢A_y12−A_y1⁢A_x2+12⁢A_x22
Compute the Euler-Lagrange equations.
Maxwell1≔EulerLagrange⁡L
Maxwell1≔−A_x2,2+A_y1,2−A_t1,3+A_x3,3,A_x1,2−A_y1,1−A_t2,3+A_y3,3,A_t1,1−A_x1,3+A_t2,2−A_y2,3
Change notation to improve readability.
PDEtoolsdeclare⁡quiet
Maxwell2≔map⁡convert,Maxwell1,DGdiff
Maxwell2≔−A_xy,y+A_yx,y−A_tt,x+A_xt,t,A_xx,y−A_yx,x−A_tt,y+A_yt,t,A_tx,x−A_xt,x+A_ty,y−A_yt,y
Maxwell2:=−A_xy,y+A_yx,y+A_xt,t−A_tt,x,A_xx,y−A_yx,x+A_yt,t−A_tt,y,−A_xt,x+A_tx,x−A_yt,y+A_ty,y
Example 5.
In this example we apply the Euler-Lagrange operator to some contact forms. We start with the case of 1 independent variable and 1 dependent variable.
DGsetup⁡x,u,E,3:
First we try a form ω1 of vertical degree 1.
ω1≔evalDG⁡a⁡x⁢Cu+b⁡x⁢Cu1+c⁡x⁢Cu1,1+d⁡x⁢Cu1,1,1
ω1≔a⁡x⁢Cu+b⁡x⁢Cu1+c⁡x⁢Cu1,1+d⁡x⁢Cu1,1,1
EulerLagrange⁡ω1
a⁡x−bx+cx,x−dx,x,x
Try a form ω2 of vertical degree 2.
ω2≔evalDG⁡a⁡x⁢Cu&wCu1+b⁡x⁢Cu&wCu1,1+c⁡x⁢Cu1&wCu1,1
ω2≔a⁡x⁢Cu⁢⋀⁢Cu1+b⁡x⁢Cu⁢⋀⁢Cu1,1+c⁡x⁢Cu1⁢⋀⁢Cu1,1
EulForm1≔EulerLagrange⁡ω2
EulForm1≔−bx,x+ax⁢Cu−cx,x+2⁢bx−2⁢a⁡x⁢Cu1−3⁢cx⁢Cu1,1−2⁢c⁡x⁢Cu1,1,1
Here is the explicit formula for computing EulerLagrange(omega2).
P0≔Hook⁡D_u,ω2;P1≔Hook⁡D_u1,ω2;P2≔Hook⁡D_u1,1,ω2
P0≔a⁡x⁢Cu1+b⁡x⁢Cu1,1
P1≔−a⁡x⁢Cu+c⁡x⁢Cu1,1
P2≔−b⁡x⁢Cu−c⁡x⁢Cu1
EulForm2≔evalDG⁡P0−TotalDiff⁡P1,1+TotalDiff⁡P2,1,1
EulForm2≔−bx,x+ax⁢Cu−cx,x+2⁢bx−2⁢a⁡x⁢Cu1−3⁢cx⁢Cu1,1−2⁢c⁡x⁢Cu1,1,1
EulForm2&minusEulForm11
0⁢Cu
Now we compute some simple examples in the case of 2 independent variables and 2 dependent variables.
DGsetup⁡x,y,u,v,E,3:
Try a form ω3 of vertical degree 1.
ω3≔evalDG⁡a⁡x,y⁢Cu+b⁡x,y⁢Cv+c⁡x,y⁢Cu1+d⁡x,y⁢Cu2+e⁡x,y⁢Cv1+f⁡x,y⁢Cv2
ω3≔a⁡x,y⁢Cu+b⁡x,y⁢Cv+c⁡x,y⁢Cu1+d⁡x,y⁢Cu2+e⁡x,y⁢Cv1+f⁡x,y⁢Cv2
EulerLagrange⁡ω3
a⁡x,y−cx−dy,b⁡x,y−ex−fy
Try a form ω4 of vertical degree 2.
ω4≔evalDG⁡a⁡x,y⁢Cu&wCv+b⁡x,y⁢Cu1&wCv2
ω4≔a⁡x,y⁢Cu⁢⋀⁢Cv+b⁡x,y⁢Cu1⁢⋀⁢Cv2
EulerLagrange⁡ω4
a⁡x,y⁢Cv−bx⁢Cv2−b⁡x,y⁢Cv1,2,−a⁡x,y⁢Cu+by⁢Cu1+b⁡x,y⁢Cu1,2
Try a form ω5 of vertical degree 3.
ω5≔evalDG⁡a⁡x,y⁢Cu&wCu1&wCv1
ω5≔a⁡x,y⁢Cu⁢⋀⁢Cu1⁢⋀⁢Cv1
EulerLagrange⁡ω5
ax⁢Cu⁢⋀⁢Cv1+a⁡x,y⁢Cu⁢⋀⁢Cv1,1+2⁢a⁡x,y⁢Cu1⁢⋀⁢Cv1,−ax⁢Cu⁢⋀⁢Cu1−a⁡x,y⁢Cu⁢⋀⁢Cu1,1
The Euler-Lagrange operator of the horizontal exterior derivative of any form vanishes, for example:
η≔HorizontalExteriorDerivative⁡u2,3⁢Cu1&wCv2
η≔u1,2,3⁢Dx⁢⋀⁢Cu1⁢⋀⁢Cv2+u2,3⁢Dx⁢⋀⁢Cu1⁢⋀⁢Cv1,2−u2,3⁢Dx⁢⋀⁢Cv2⁢⋀⁢Cu1,1+u2,2,3⁢Dy⁢⋀⁢Cu1⁢⋀⁢Cv2+u2,3⁢Dy⁢⋀⁢Cu1⁢⋀⁢Cv2,2−u2,3⁢Dy⁢⋀⁢Cv2⁢⋀⁢Cu1,2
EulerLagrange⁡η
0⁢Dx⁢⋀⁢Cu,0⁢Dx⁢⋀⁢Cu
See Also
DifferentialGeometry
JetCalculus
Prolong
Transformation
Pullback
DifferentialEquationData
Download Help Document