>
|

|
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 >
|
|
![EL := [-(diff(V(u[], v[], w[]), u[]))-u[1, 1], -(diff(V(u[], v[], w[]), v[]))-v[1, 1], -(diff(V(u[], v[], w[]), w[]))-w[1, 1]]](/support/helpjp/helpview.aspx?si=6550/file05754/math185.png)
| (2.2) |
The convert/DGdiff command will change this output from jet space notation to standard differential equations notation.
E >
|
|
)(u(t), v(t), w(t))-(diff(u(t), `$`(t, 2))), -(D[2](V))(u(t), v(t), w(t))-(diff(v(t), `$`(t, 2))), -(D[3](V))(u(t), v(t), w(t))-(diff(w(t), `$`(t, 2)))]](/support/helpjp/helpview.aspx?si=6550/file05754/math196.png)
| (2.3) |
Here are the same calculations done with differential forms.
E >
|
|
| (2.4) |
E >
|
|
![(diff(V(u[], v[], w[]), u[])+u[1, 1])*Dt*`^`*Cu[]+(diff(V(u[], v[], w[]), v[])+v[1, 1])*Dt*`^`*Cv[]+(diff(V(u[], v[], w[]), w[])+w[1, 1])*Dt*`^`*Cw[]](/support/helpjp/helpview.aspx?si=6550/file05754/math214.png)
| (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 >
|
|
![Maxwell1 := [-A_x[2, 2]+A_y[1, 2]+A_x[3, 3]-A_t[1, 3], A_x[1, 2]-A_y[1, 1]+A_y[3, 3]-A_t[2, 3], -A_x[1, 3]+A_t[1, 1]-A_y[2, 3]+A_t[2, 2]]](/support/helpjp/helpview.aspx?si=6550/file05754/math404.png)
| (2.19) |
Change notation to improve readability.
M >
|
|
M >
|
|
![Maxwell2 := [-A_x[y, y]+A_y[x, y]+A_x[t, t]-A_t[t, x], A_x[x, y]-A_y[x, x]+A_y[t, t]-A_t[t, y], -A_x[t, x]+A_t[x, x]-A_y[t, y]+A_t[y, y]]](/support/helpjp/helpview.aspx?si=6550/file05754/math419.png)
| (2.20) |
![Maxwell2 := [-A_x[y, y]+A_y[x, y]+A_x[t, t]-A_t[t, x], A_x[x, y]-A_y[x, x]+A_y[t, t]-A_t[t, y], -A_x[t, x]+A_t[x, x]-A_y[t, y]+A_t[y, y]]](/support/helpjp/helpview.aspx?si=6550/file05754/math421.png)
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 >
|
|
![eta := u[1, 2, 3]*Dx*`^`*Cu[1]*`^`*Cv[2]+u[2, 3]*Dx*`^`*Cu[1]*`^`*Cv[1, 2]-u[2, 3]*Dx*`^`*Cv[2]*`^`*Cu[1, 1]+u[2, 2, 3]*Dy*`^`*Cu[1]*`^`*Cv[2]+u[2, 3]*Dy*`^`*Cu[1]*`^`*Cv[2, 2]-u[2, 3]*Dy*`^`*Cv[2]*`^`*Cu[1, 2]](/support/helpjp/helpview.aspx?si=6550/file05754/math583.png)
| (2.34) |
E >
|
|
| (2.35) |