Contra- vs. Covariant Definition of Tensors?

47 views
Skip to first unread message

Ron Riegert

unread,
Jun 17, 2024, 10:39:47 PMJun 17
to xAct Tensor Computer Algebra
(This question pertains to xAct v1.4.1 running under Mathematica 12.2.)
As an exercise, I decided to derive the stress-energy tensor T for the electromagnetic field by using VarD to vary the metric tensor in the Lagrangian density for the EM field F. But at first I got the wrong answer because I defined F as an antisymmetric contravariant tensor:
DefTensor Problem 2.png
Defining F instead with covariant indices fixes the problem. But why should that make a difference? And how can I avoid being caught by this in the future? Are there rules for defining tensors that will always work as expected with VarD? Thanks!

Jose

unread,
Jun 30, 2024, 7:23:37 PMJun 30
to xAct Tensor Computer Algebra
Hi,

Please, always send complete code. I cannot reproduce your results if I don't know what are the objects you use, or which packages you have loaded.

Also, I don't know what you mean by version 1.4.1 of xAct. The most recent version is 1.2.0. Do you mean a version of xTras, perhaps?

I'm not immediately surprised that you get different results when metric-differentiating expressions with different metric factors inside. I'd say you always have to use tensors with the proper index-character (up or down) when computing variational derivatives. Otherwise you rely on more-or-less arbitrary decisions of whether internal functions use or not ContractMetric and SeparateMetric internally, that remove or add metric factors. Loading some packages (other than xTensor) can change some of the default settings in this regard, for example.

Cheers,
Jose.

Ron Riegert

unread,
Jul 1, 2024, 9:30:40 AMJul 1
to xAct Tensor Computer Algebra
Jose, thanks for your response and sorry for the version confusion: I am using xAct xTensor v.1.1.4. I've now attached a notebook with comments that explain my questions.
Regards,
Ron

EM Lagrangian Stress Tensors.nb
Reply all
Reply to author
Forward
0 new messages