# Covariant Euler-Lagrange Computation

• diracs-cat
diracs-cat
Does anybody know of a software (or software package) that can solve the Euler-Lagrange field equations for a manifestly-covariant Lagrangian density in full tensor form? Mathematica has a "Variational Methods" package, but none of the examples given are in manifestly-covariant form. I am not very experienced with any of the analytical computation softwares or their packages. Any help would be greatly appreciated! Thanks!

diracs-cat said:
Does anybody know of a software (or software package) that can solve the Euler-Lagrange field equations for a manifestly-covariant Lagrangian density in full tensor form?
Can you post (in LaTeX) a simple covariant Lagrangian example from which you'd like to see the field equations obtained using computer algebra?

Thanks for the quick reply! For a simple covariant Lagrangian, I would say the Maxwell Lagrangian in curved spacetime. Just to be clear I'm not interested in solving this Lagrangian in particular, but interested in finding a computer algebra software/package that can do this in general. Also if solving the curved spacetime case is not practical, then the flat spacetime one would be a good start for me to see as well. Thank you for your help here!

$$\mathcal{L} = -\frac{1}{4 \mu_0} \, F_{\alpha\beta} \, F^{\alpha\beta} \, \frac{\sqrt{-g}}{c} + A_\alpha \, J^\alpha,$$

$$F^{\alpha\beta} = g^{\alpha\gamma} F_{\gamma\delta} g^{\delta\beta}$$

diracs-cat said:
Thanks for the quick reply! For a simple covariant Lagrangian, I would say the Maxwell Lagrangian in curved spacetime.
OK, here's a quick example using the xAct package for tensor algebra (http://www.xact.es/) running under Wolfram Mathematica:

DeBangis21 and diracs-cat
Thanks! Do you happen to know if there's some way I can configure xAct to get it to simplify the expressions the way it did for you? My Lagrangian and field equations aren't looking exactly like yours for some reason. Here's what I got. Thanks again for all your support here!

diracs-cat said:
Thanks! Do you happen to know if there's some way I can configure xAct to get it to simplify the expressions the way it did for you? My Lagrangian and field equations aren't looking exactly like yours for some reason. Here's what I got. Thanks again for all your support here!
You've probably already done this: SetOptions[ContractMetric, AllowUpperDerivatives -> True]. In addition, you can remove as many explicit metrics as possible in an expression with ContractMetric, and also expand an expression and automatically rename dummy indices to achieve maximum expression-compactness using ToCanonical. (See examples in my post above.)

diracs-cat
That worked great, thanks!

renormalize

Replies
5
Views
446
• Differential Geometry
Replies
2
Views
4K
• Classical Physics
Replies
5
Views
1K
• Classical Physics
Replies
4
Views
1K
• Mechanics
Replies
5
Views
1K
Replies
8
Views
2K
Replies
1
Views
1K
Replies
3
Views
2K
• MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
• Classical Physics
Replies
1
Views
2K