0

defining polar Minkowski metric (with indecies down in polar coordinates) as

   gdd = {{-1, 0, 0, 0},{0, 1, 0, 0},{0, 0, r^2, 0},{0, 0, 0, r^2 Sin[\[Theta]]^2}}

and using the code in Covariant derivative given Christoffel symbols we define Affine connection

Γudd[aa_, bb_, cc_] := (1/2)*Sum[guu[[aa,dd]]*(D[gdd[[dd,cc]], clist[[bb]]] + D[gdd[[dd,bb]], clist[[cc]]] - 
  D[gdd[[bb,cc]], clist[[dd]]]), {dd, 1, Length[gdd]}]

Then the covariant derivative

covDu[A_, a_, b_] := D[A[[a]], clist[[b]]] + Sum[Γudd[a, b, c]*A[[c]], {c, 1, Length[gdd]}];

Along with coordiantes and inverse metric

clist = {t, r, θ, ϕ};
gUU = Simplify[Inverse[gdd]];

Now if we consider the vector (with indices up)

EmU = {0,Er[r, θ, ϕ],Eθ[r, θ, ϕ],Eϕ[r, θ, ϕ]}

We can calculate the divergence, but this divergence isn't the same as Mathematica's divergence

Sum[covDu[Em, a, a], {a, Length[gdd]}] ==  Div[{Er[r, θ, ϕ],Eθ[r, θ, ϕ],Eϕ[r, θ, ϕ]}, "Spherical"]

We get non-zero output. How come? Shouldn't they be the same? Note that this happened when I defined my own Christoffel Symbols and covariant derivative.

Nitaa a
  • 738
  • 2
  • 8
  • Perhaps the error is given by Mathematica choosing different basis for its divergence, but I can't find which basis it would choose, JacobianDeterminant[] of "Spherical" is the same as the determinant of my metric. – Nitaa a Mar 21 '22 at 09:06
  • 2
    Just from the first glance, you defined the metrics in polar coordinates, but the divergence calculated in spherical??? – Alexei Boulbitch Mar 22 '22 at 17:04
  • 1
    I am not sure if the issue has been resolved or not, some added concern to what @AlexeiBoulbitch pointed out is the following: in the command Sum[covDu[Em, a, a], {a, Length[gdd]}] that you gave, Em is undefined. so either this is a mistake, or we are missing some code in the OP. – bmf Mar 23 '22 at 16:11
  • And another comment, if you run Div[{Er[r, θ, φ], Eθ[r, θ, φ], Eφ[r, θ, φ]}, "Polar"] as you have written, it returns unevaluated. You need to specify the coordinate system according to the documentation of Div. In simple terms you should have something like Div[{Er[r, θ, φ], Eθ[r, θ, φ], Eφ[r, θ, φ]}, {r, θ, φ} ,"Polar"]. This gives the output – bmf Mar 23 '22 at 16:14
  • Finally, in the way that the code is presented guu is ALSO unevaluated, so even with the proper definition of Em Mathematica would make her complaints. – bmf Mar 23 '22 at 16:16
  • There's a typo in the next to last of my comments. It should read "Cylindrical" rather than "Polar". – bmf Mar 23 '22 at 16:32

0 Answers0