2

I want to compute the functional derivative with respect to a partial derivative of the metric with the mathematica package xAct.

This is what I have tried so far:

DefManifold[M, 4, IndexRange[a, z]]
DefMetric[-1, met[-a, -b], CD, PrintAs -> "g", CurvatureRelations -> True]

Ctil[a_, b_, c_, d_, e_, f_] := RiemannCD[-a, -b, -c, -d] epsilonmet[a, b, -e, -f] RiemannCD[e, f, c,d]

DefTensor[pdg[-x, -y, -z], M, Symmetric[{1, 2, 3}]]

L2b = Ctil[g, h, i, j, k, l] // RiemannToChristoffel//ChristoffelToGradMetric L2b = L2b /. PD[-a__][met[-b__, -c__]] :> pdg[-a, -b, -c] VarDL2b = VarL[pdg[-x, -y, -z], CD][L2b] // FullSimplification[] // CollectTensors

and the errors that I am getting are of the type: IndexForm: Attempting to apply IndexForm on <<2>> and ToCanonical: Unknown expression not canonicalized

  • Does the last line have a typo? VarL[g[-a,-b]][L] computes the functional derivative of L wrt the metric g. VarD[T,cd][expr,rest] seems a closer match to what you're doing. If i run your stuff with VarL minus simplify/collect, it remains unevaluated, whereas VarD runs for quite awhile. –  Nov 29 '23 at 04:05

0 Answers0