Physics[LagrangeEquations] - compute the Lagrange equations for a given Lagrangian
|
Calling Sequence
|
|
LagrangeEquations(L, F)
|
|
Parameters
|
|
L
|
-
|
any algebraic expressions representing a Lagrangian; there are no restrictions to the differentiation order of the derivatives of the coordinates or fields
|
F
|
-
|
a name indicating the coordinate, without the coordinate's dependency, or a set or list of them in the case of a system with many degrees of freedom
|
|
|
|
|
Description
|
|
•
|
LagrangeEquations receives an expression representing a Lagrangian and returns a sequence of Lagrange equations, of the form , with as many equations as coordinates are indicated in the list or set F. In the case of only one degree of freedom (one coordinate), F can also be the coordinate itself, and the output consists of a single Lagrange equation.
|
•
|
The formula in the traditional case where the Lagrangian depends on 1st order derivatives of the coordinates and there is only one parameter, , is
|
|
where formally represents the derivative with respect to the coordinates of the particle, equal to the Gradient when working in Cartesian coordinates; represents the equivalent operation, replacing each coordinate by the corresponding velocity, i.e. its derivative with respect to , and represents the total derivative with respect to , the parameter parametrizing the coordinates. Note that in more general cases the number of parameters can be many. For example, in electrodynamics, the "coordinate" is a tensor field , there are then four coordinates, one for each of the values of the index , and there are four parameters .
|
•
|
The second argument F indicates the coordinates without their dependency, passed as names. For example, in the case of one single parameter and a coordinate , pass . It is expected that these names appear in the Lagrangian consistently, always with the same functionality.
|
•
|
LagrangeEquations can handle tensors and vectors of the Physics package as well as derivatives using vectorial differential operators (see d_ and Nabla), works by performing functional differentiation (see Fundiff), and handles 1st, and higher order derivatives of the coordinates in the Lagrangian automatically. Unlike the similar command VariationalCalculus:-EulerLagrange, LagrangeEquations does not return first integrals.
|
|
|
Examples
|
|
>
|
|
| |
| |
| (1) |
The Lagrangian of a one-dimensional oscillator - small oscillations
>
|
|
The corresponding Lagrange equation gives Newton's second law, a 2nd order linear ODE for
>
|
|
The Lagrangian of a pendulum of mass and length where the suspension point moves uniformly over a vertical circumference centered at the origin, with a constant frequency
| (4) |
>
|
|
| (5) |
The Lagrange equations
>
|
|
| (6) |
The Maxwell equations can be derived as Lagrange equations as follows. For simplicity, consider Maxwell equations in vacuum. Define first a tensor representing the 4D electromagnetic field potential
| |
| (7) |
| (8) |
The electromagnetic field tensor
The Lagrangian
| (10) |
Maxwell equations in 4D tensorial notation
>
|
|
| (11) |
The Lagrangian of a quantum system of identical particles (bosons) can be expressed in terms of the a complex field , an external potential and a term representing the atom-atom interaction. Set first the realobjects of the problem
| (12) |
>
|
|
>
|
|
| (14) |
>
|
|
| |
| (15) |
The Lagrangian is
>
|
|
| (16) |
Taking as the coordinate, the Lagrange equation is the so-called the Gross-Pitaevskii equation (GPE),
>
|
|
| (17) |
Make the Laplacian explicit
>
|
|
>
|
|
| (19) |
The standard form of the Gross-Pitaevskii equation has the time derivative of isolated
>
|
|
| (20) |
The model in classical field theory and corresponding field equations
| (21) |
>
|
|
| (22) |
>
|
|
|
|
See Also
|
|
CompactDisplay, conjugate, d_, dAlembertian, Fundiff, isolate, Physics, Physics conventions, Physics examples, Physics Updates, Tensors - a complete guide, Mini-Course Computer Algebra for Physicists, Physics[*], Setup, simplify/siderels, VariationalCalculus:-EulerLagrange
|
|
Compatibility
|
|
•
|
The Physics[LagrangeEquations] command was introduced in Maple 2023.
|
|
|