Determinant of tensor in xAct

187 views
Skip to first unread message

Claire

unread,
Aug 6, 2024, 4:56:24 AM8/6/24
to xAct Tensor Computer Algebra
Hi all,

I have a Lagrangian that has a term that consists of the square root of the determinant of the metric tensor plus other tensorial objects, i.e. sqrt(Det(g+...)), see "fLagrangianDensity" shown in In[24] of attached notebook.

According to the documentation, to use the determinant you have to do so in terms of a given basis, but I don't want to do that yet as I am trying to find the equations of motion by varying the Lagrangian, as you can see in the steps below.

How can I write down such a term before defining a basis?

Kind regards,
Claire
old_paper.nb

Leo Stein

unread,
Aug 6, 2024, 12:52:01 PM8/6/24
to Claire, xAct Tensor Computer Algebra
Dear Claire,

By default the quantity Detmetricg[] is defined as weighted with respect to the "basis" AIndex, which is a special case for a fiducial abstract basis without doing component calculations. You're already using that correctly in your gLagrangianDensity. There is a separate issue here for your fLagrangianDensity.

Det[] is a plain old Mma function, and xTensor doesn't know what to do with it when doing a perturbation or variation. xTensor only knows about Determinant[metric,basis][], but the argument you have in your fLagrangianDensity is not a metric as far as xTensor is concerned.

We can however do the cofactor expansion of this effective metric, using the epsilon tensor of metricg. This is kind of the brute force way to do it... I'm sure there's a more clever way to do it, where we actually teach xPert and VarD about the determinant of a rank-2 tensor (or possibly even a more general tensor) with respect to a certain basis. That would likely both speed up the calculation and simplify the resulting expressions, by letting us have the abstract quantity Rank2Det[...][] (or whatever you want to call it). This is left as an exercise to an enterprising xTensor user :) For now, please see the attached notebook for the "brute force" way to do it.

Best
Leo

--
You received this message because you are subscribed to the Google Groups "xAct Tensor Computer Algebra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xact+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xact/b53a165a-78fe-46b4-9419-041ce9b06b06n%40googlegroups.com.
old_paper.nb
Reply all
Reply to author
Forward
0 new messages