Recognizing partial derivatives for a general scalar function

93 views
Skip to first unread message

Vincent Lee

unread,
Jul 1, 2021, 3:05:33 PM7/1/21
to xAct Tensor Computer Algebra
Hi,

I am trying to evaluate the covariant derivative of a tensor, where both the metric and the tensor depends on some general scalar function \beta[r]. I understand that I should use 

DefScalarFunction[\[Beta]]

to declare a general scalar function. I tried doing that and it gave me the correct Ricci scalar of the manifold by RicciScalar[cd][] (which depends on \beta[r] and \beta'[r]). However, when I tried to evaluate some contracted covariant derivatives for a tensor (labelled as h1) that also has \beta[r] in it

h1 = CTensor[{{-2 \[Beta][r] (1 - \[Epsilon] \[Beta][r]), 0}, {0, 0}}, {-flat, -flat}];
cd[-b][cd[-a][h1[a, b]]] // Simplify

the final answer has some terms that look like "D_1[r]" and "D_1D_1[r]", which I think stand for partial derivatives. Since index 1 is r, I would have thought that xAct will automatically output "1" and "0" for those quantities.

I have attached a minimal notebook as an example. The scalar function \beta[r] is defined in line 6 and the covariant derivatives are evaluated in line 12.

Thank you in advance for any help!
Vincent

example.nb

Jose

unread,
Jul 2, 2021, 1:41:48 AM7/2/21
to xAct Tensor Computer Algebra
Hi,

This is because in the entries of the tensor h1 there is \[Beta][ r ], but should be \[Beta][ r[] ]. Recall that r[] is the scalar field, while r is just the name of the scalar field. We need the pair of brackets in r[] like we need it in a vector field v[a]. The derivatives were finding r and didn't know what to do with, staying unevaluated.

Cheers,
Jose.

Vincent Lee

unread,
Jul 2, 2021, 8:25:58 AM7/2/21
to xAct Tensor Computer Algebra
Hi Jose,

Thank you for the clarification! It works now!

Best regards,
Vincent
Reply all
Reply to author
Forward
0 new messages