Problem in obtaining field equations for Lagrangians with terms in the denominator.

101 views
Skip to first unread message

arest...@gmail.com

unread,
May 3, 2018, 8:59:12 PM5/3/18
to xAct Tensor Computer Algebra

Hi everyone

 

I recently started using this wonderful tool. I'm having problems whenI trying to get the equations of movement for,

 

L1 = Sqrt[-Detmetric[] ]*(eta/

   Sqrt[X[]]*(CD[-a]@CD[a]@PhiC[]*CD[-b]@CD[b]@Phi[] - 

     CD[a]@CD[b]@PhiC[]*CD[-a]@CD[-b]@Phi[]))

 

L3 = Sqrt[-Detmetric[] ]*(eta/

   X[]*(CD[-a]@CD[a]@PhiC[]*CD[-b]@CD[b]@Phi[] - 

     CD[a]@CD[b]@PhiC[]*CD[-a]@CD[-b]@Phi[]))

 

where X[]=CD[a][Phi[]] CD[-a][PhiC[]]

 

I have been using as a guide the examples 'Lagrangian-variation-xPert-VarD.nb' in this github repo .

 

But apparently due to the Lagrangian shape it is not possible to perform the same procedure as the examples. In the case of the first (L1) I put // NoScalar to remove the red parentheses, and it does not work. In the case of L2, I do not know why the error occurs.

 

I really need to solve this problem, but I have no idea how to do it and I'm also not a Mathematica expert. Could you please help me??

 

I atach the notebook

 

Cheers,

Question.nb

Leo Stein

unread,
May 3, 2018, 9:20:31 PM5/3/18
to arest...@gmail.com, xAct Tensor Computer Algebra
Dear Armando,

The problem is actually not enough red parentheses (which is the Scalar[] head). In particular, you need to use Scalar[] inside the square roots and for the denominator 1/X. All of these things will be accomplished if you just set X[] to be Scalar[CD[a][Phi[]] CD[-a][PhiC[]]].

The problem is that Mathematica doesn't understand what we mean when we have a contracted tensor in a denominator or inside a square root. Mma thinks that 1/(CD[a][Phi[]] * CD[-a][PhiC[]]) is the same as (1/CD[a][Phi[]]) * 1/(CD[-a][PhiC[]]), but this latter expression makes no sense! Thus many of the xTensor manipulations run intro trouble when Mathematica tries to rewrite them in illegal ways.

The Scalar[] head fixes a lot of these things, by forcing Mathematica to keep these tensor products together.

After making this change, your code will work (you will also need to use NoScalar before applying ToCanonical, because of an unrelated issue).

In the file below is just the L3 part of your example, and the L1 and L2 work the same way.

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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Question.nb

arest...@gmail.com

unread,
May 3, 2018, 10:05:20 PM5/3/18
to xAct Tensor Computer Algebra
Dear Leo,

Thank you very much for your quick answer and the solution to the problem posted. Now I understand how it works. 

Thank you! , 

Best,
Armando
Reply all
Reply to author
Forward
0 new messages