EulerLagrange - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


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

Description

• 

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(...).

Examples

> 

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.

E > 

L≔12⁢u12+v12+w12−V⁡u,v,w

L≔u122+v122+w122−V⁡u,v,w

(2.1)

 

Calculate the Euler-Lagrange equations for L.

E > 

EL≔EulerLagrange⁡L

EL≔−Vu−u1,1,−Vv−v1,1,−Vw−w1,1

(2.2)

 

The convert/DGdiff command will change this output from jet space notation to standard differential equations notation.

E > 

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

(2.3)

 

Here are the same calculations done with differential forms.

E > 

λ≔L&multDt

λ≔u122+v122+w122−V⁡u,v,w⁢Dt

(2.4)
E > 

EulerLagrange⁡λ

Vu+u1,1⁢Dt⁢⋀⁢Cu+Vv+v1,1⁢Dt⁢⋀⁢Cv+Vw+w1,1⁢Dt⁢⋀⁢Cw

(2.5)

 

Example 2.

Create a space of 1 independent variable and 1 dependent variable.

E > 

DGsetup⁡x,u,E,2:

 

Calculate the Euler-Lagrange equations for an arbitrary second order Lagrangian.

E > 

L2≔F⁡x,u,u1,u1,1:

E > 

PDEtoolsdeclare⁡F⁡x,u,u1,u1,1,quiet

E > 

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

(2.6)

 

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.

E > 

P0,P1,P2≔diff⁡L2,u,diff⁡L2,u1,diff⁡L2,u1,1

P0,P1,P2≔Fu,Fu1,Fu1,1

(2.7)
E > 

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

(2.8)
E > 

Eul2−Eul11

0

(2.9)

 

Here are the same calculations again using an alternative jet space notation. See Preferences for details.

E > 

Preferences⁡JetNotation,JetNotation2

JetNotation1

(2.10)
E > 

DGsetup⁡x,u,E,2:

 

Calculate the Euler-Lagrange equations for an arbitrary second order Lagrangian.

E > 

L2≔F⁡x,u0,u1,u2:

E > 

PDEtoolsdeclare⁡F⁡x,u,u1,u2,quiet

E > 

Eul1≔EulerLagrange⁡L2

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

(2.11)
E > 

Preferences⁡JetNotation,JetNotation1

JetNotation2

(2.12)
E > 

Example 3.

Create a space of 3 independent variables and 1 dependent variable. Derive the Laplace's equation from its variational principle.

E > 

DGsetup⁡x,y,z,u,E,1:

E > 

L3≔12⁢u12+u22+u32

L3≔u122+u222+u322

(2.13)
E > 

E3≔EulerLagrange⁡L3

E3≔−u1,1−u2,2−u3,3

(2.14)
E > 

convert⁡E31,DGdiff

−ux,x−uy,y−uz,z

(2.15)

 

Repeat this computation using differential forms.

E > 

λ3≔evalDG⁡L3⁢Dx&wDy&wDz

λ3≔u122+u222+u322⁢Dx⁢⋀⁢Dy⁢⋀⁢Dz

(2.16)
E > 

EulerLagrange⁡λ3

u1,1+u2,2+u3,3⁢Dx⁢⋀⁢Dy⁢⋀⁢Dz⁢⋀⁢Cu

(2.17)

 

Example 4.

Create a space of 3 independent variables and 3 dependent variables. Derive 3-dimensional Maxwell equations from the variational principle.

E > 

DGsetup⁡x,y,t,A_x,A_y,A_t,M,1:

 

Define the Lagrangian.

M > 

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

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

(2.18)

 

Compute the Euler-Lagrange equations.

M > 

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

(2.19)

 

Change notation to improve readability.

M > 

PDEtoolsdeclare⁡quiet

M > 

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

(2.20)

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.

M > 

DGsetup⁡x,u,E,3:

 

First we try a form ω1 of vertical degree 1.

E > 

ω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

(2.21)
E > 

EulerLagrange⁡ω1

a⁡x−bx+cx,x−dx,x,x

(2.22)

 

Try a form ω2 of vertical degree 2.

E > 

ω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

(2.23)
E > 

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

(2.24)

 

Here is the explicit formula for computing EulerLagrange(omega2).

E > 

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

(2.25)
E > 

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

(2.26)
E > 

EulForm2&minusEulForm11

0⁢Cu

(2.27)

 

Now we compute some simple examples in the case of 2 independent variables and 2 dependent variables.

E > 

DGsetup⁡x,y,u,v,E,3:

 

Try a form ω3 of vertical degree 1.

E > 

ω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

(2.28)
E > 

EulerLagrange⁡ω3

a⁡x,y−cx−dy,b⁡x,y−ex−fy

(2.29)

 

Try a form ω4 of vertical degree 2.

E > 

ω4≔evalDG⁡a⁡x,y⁢Cu&wCv+b⁡x,y⁢Cu1&wCv2

ω4≔a⁡x,y⁢Cu⁢⋀⁢Cv+b⁡x,y⁢Cu1⁢⋀⁢Cv2

(2.30)
E > 

EulerLagrange⁡ω4

a⁡x,y⁢Cv−bx⁢Cv2−b⁡x,y⁢Cv1,2,−a⁡x,y⁢Cu+by⁢Cu1+b⁡x,y⁢Cu1,2

(2.31)

 

Try a form ω5 of vertical degree 3.

E > 

ω5≔evalDG⁡a⁡x,y⁢Cu&wCu1&wCv1

ω5≔a⁡x,y⁢Cu⁢⋀⁢Cu1⁢⋀⁢Cv1

(2.32)
E > 

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

(2.33)

 

The Euler-Lagrange operator of the horizontal exterior derivative of any form vanishes, for example:

E > 

η≔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

(2.34)
E > 

EulerLagrange⁡η

0⁢Dx⁢⋀⁢Cu,0⁢Dx⁢⋀⁢Cu

(2.35)

See Also

DifferentialGeometry

JetCalculus

Prolong

Transformation

Pullback

DifferentialEquationData