>
|
|
Example 1.
Create a space of 1 independent variable and 3 dependent variables.
>
|
|
Define the standard Lagrangian from mechanics as the difference between the kinetic and potential energy.
E >
|
|
| (2.1) |
Calculate the Euler-Lagrange equations for L.
E >
|
|
| (2.2) |
The convert/DGdiff command will change this output from jet space notation to standard differential equations notation.
E >
|
|
| (2.3) |
Here are the same calculations done with differential forms.
E >
|
|
| (2.4) |
E >
|
|
| (2.5) |
Example 2.
Create a space of 1 independent variable and 1 dependent variable.
E >
|
|
Calculate the Euler-Lagrange equations for an arbitrary second order Lagrangian.
E >
|
|
E >
|
|
E >
|
|
| (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 u[0], u[1], u[1,1].
E >
|
|
| (2.7) |
E >
|
|
| (2.8) |
E >
|
|
| (2.9) |
Here are the same calculations again using an alternative jet space notation. See Preferences for details.
E >
|
|
| (2.10) |
E >
|
|
Calculate the Euler-Lagrange equations for an arbitrary second order Lagrangian.
E >
|
|
E >
|
|
E >
|
|
| (2.11) |
E >
|
|
| (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 >
|
|
E >
|
|
| (2.13) |
E >
|
|
| (2.14) |
E >
|
|
| (2.15) |
Repeat this computation using differential forms.
E >
|
|
| (2.16) |
E >
|
|
| (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 >
|
|
Define the Lagrangian.
M >
|
|
| (2.18) |
Compute the Euler-Lagrange equations.
M >
|
|
| (2.19) |
Change notation to improve readability.
M >
|
|
M >
|
|
| (2.20) |
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 >
|
|
First we try a form omega1 of vertical degree 1.
E >
|
|
| (2.21) |
E >
|
|
| (2.22) |
Try a form omega2 of vertical degree 2.
E >
|
|
| (2.23) |
E >
|
|
| (2.24) |
Here is the explicit formula for computing EulerLagrange(omega2).
E >
|
|
| (2.26) |
E >
|
|
| (2.27) |
Now we compute some simple examples in the case of 2 independent variables and 2 dependent variables.
E >
|
|
Try a form omega3 of vertical degree 1.
E >
|
|
| (2.28) |
E >
|
|
| (2.29) |
Try a form omega4 of vertical degree 2.
E >
|
|
| (2.30) |
E >
|
|
| (2.31) |
Try a form omega5 of vertical degree 3.
E >
|
|
| (2.32) |
E >
|
|
| (2.33) |
The Euler-Lagrange operator of the horizontal exterior derivative of any form vanishes, for example:
E >
|
|
| (2.34) |
E >
|
|
| (2.35) |