gradient of a scalar and EOM

40 views
Skip to first unread message

Debojyoti Mondal

unread,
Oct 9, 2025, 1:14:01 PM (3 days ago) Oct 9
to xAct Tensor Computer Algebra
I am trying to do very simple calculation here. First in the definition of Lq, there is gradient of the scalar field \[phi] (\nabla \phi), but it turns out that the output is given as covariant derivative. Secondly varying the action is not giving the Einstein equation. What am I doing wrong here? My ultimate goal is to use this equation in the background metric "gq" and equating tt and rr component to get differential equation for \phi and solve it for \phi as a function of 'r'. 
scalar.nb

Juan Margalef

unread,
Oct 9, 2025, 3:05:45 PM (3 days ago) Oct 9
to xAct Tensor Computer Algebra
1. Notice the error that you obtain:

Validate::repeated: Found indices with the same name -\[Mu].

It is telling you that you have used -mu twice. Indeed, in your definition of Lq you have  (CD[-\[Mu]][\[Phi][]]) (CD[-\[Mu]][\[Phi][]]) but it should be  (CD[-\[Mu]][\[Phi][]]) (CD[\[Mu]][\[Phi][]]) (one up, one down, so that they are contracted). This would solve your problem and give you the correct EOM.

2. I am not entirely sure what you mean by "but it turns out that the output is given as covariant derivative". The gradient is obtained by raising the index of the covariant derivative.

Juan Margalef

unread,
Oct 9, 2025, 3:20:31 PM (3 days ago) Oct 9
to Debojyoti Mondal, xAct Tensor Computer Algebra
I don't understand what you mean. As I mentioned, the gradient is the same as the covariant derivative once you have a metric (they are metrically equivalent). The gradient is a vector with an up-index so you have to write what I wrote in my reply.

On Thu, Oct 9, 2025, 15:12 Debojyoti Mondal <djym...@gmail.com> wrote:
Hi, Thanks for the reply. The problem is, in the definition of Lq, that part should be the square of the gradient of \phi (\nabla \phi). But as per my definition it is covariant derivative of \phi. How can I write gradiend? 

--
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 visit https://groups.google.com/d/msgid/xact/bde3a568-242e-4baf-9e77-6db87b2b62ddn%40googlegroups.com.

Debojyoti Mondal

unread,
Oct 9, 2025, 3:50:05 PM (3 days ago) Oct 9
to Juan Margalef, xAct Tensor Computer Algebra
Hi, Thanks for the reply. The problem is, in the definition of Lq, that part should be the square of the gradient of \phi (\nabla \phi). But as per my definition it is covariant derivative of \phi. How can I write gradiend? 

On Fri, 10 Oct, 2025, 12:35 am Juan Margalef, <juanma...@gmail.com> wrote:
--

Debojyoti Mondal

unread,
Oct 10, 2025, 10:53:11 AM (2 days ago) Oct 10
to xAct Tensor Computer Algebra
Here is the revised notebook. I did some corrections and got some equations. But I think there is still something off. There are two problems here. In the last set of equations for "sfecomp", \phi should be function of "r"(\phi[r]). So, I think, I have to define it separately somehow. Another question is These equation shows the covariant derivatives od \phi. They should be evaluated completely and we should get ordinary differential equation. Can you check this please?

Thank You.
  

scalar.nb
Reply all
Reply to author
Forward
0 new messages