Irregularity in calculating CD with valued index

34 views
Skip to first unread message

Kolja Kuijpers

unread,
Nov 5, 2021, 7:05:57 PM11/5/21
to xAct Tensor Computer Algebra
Dear all,

I found an unexpected behavior of de Covariant Derivative during my research.
I am calculating covariant derivatives on the Ricci Scalar which solely depends on the radial coordinate, I will generalize this to a function f[r].
I need to calculate the following:
H[a_,b_] :=CD[a][CD[b][f[r]]]

In a simplified version I set the Metricg to that of polar coordinates diag(-1,1,r^2)
I defined CD with the command CD=LC[Metricg]

When I want to calculate the Hrr component I run the function like: H[{1,-polar},{1,-polar}]
The result I get is f''[r], which is the expected result. When I run H[{2,-polar},{2,-polar}], however, the function returns zero, while the connection piece of the second covariant derivative should return r*f'[r]. 

It seems that by giving an explicit value to an index of a tensor and then taking it's covariant derivative, it is no longer recognized as an index. 

Is this the intended way it should function? It definitely isn't the most intuitive, leading me and my colleagues to quite some annoyances and I do not think it is mentioned anywhere in the reference guide. Thinking about how the package interprets input, however, it does make some sense the way it handles this situation.

I did also find one way to circumvent the problem. Using a delta[] function outside the CD you can specify the value and contract it using a dummy index and the CD will still 'see' the dummy index and thus compute the connection term.

Is there perhaps a more elegant solution to this problem?

Thank you for your time,

Kolja

Jose

unread,
Nov 15, 2021, 12:39:58 AM11/15/21
to xAct Tensor Computer Algebra
Hi,

This is a consequence of how derivatives work in xAct. The formula

    H[a_,b_] :=CD[a][ CD[b][ f[r[]] ] ]

means that H[{1, -polar}, {1, -polar}] gets converted into

   CD[{1, -polar}][ CD[{1, -polar}][ f[r[]] ] ]

which is

   CD[{1, -polar}][ Basis[{1, -polar}, a] CD[-a][ f[r[]] ] ]

and you see how there is a Basis vector being differentiated, which you do not expect.

A possible way to address this is to use H[a, b] always with abstract indices and contract Basis vectors from outside. I guess this is effectively equivalent to your use of delta, because delta auto-converts into Basis for basis indices. An alternative is to use instead alternative definitions of H, based on TensorDerivative[f, CD, CD][-a, -b] and similar objects, in which you can safely replace abstract indices by basis indices. One can convert between to two approaches using ToTensorDerivative and FromTensorDerivative.

Cheers,
Jose.
Reply all
Reply to author
Forward
0 new messages