I am currently trying to use the code linked in the catalog of spacetimes pdf to calculate chirstoffel symbols for a metric which follows as
n := 4
coord := {t, r, θ, Φ}
metric := {{-(1 - rs/r) c^2, 0, 0, 0},
{0, 1/(1 - rs/r), 0, 0},
{0, 0, r^2, 0},
{0, 0, 0, r ^2 Sin[θ]^2}}
inversemetric := Simplify[Inverse[metric]]
affine := affine = Simplify[
Table[(1/2) Sum[inversemetric[[Mu, Rho]] (
D[metric[[Rho, Nu]], coord[[Lambda]]] +
D[metric[[Rho, Lambda]], coord[[Nu]]] -
D[metric[[Nu, Lambda]], coord[[Rho]]]),
{Rho, 1, n}], {Nu, 1, n}, {Lambda, 1, n}, {Mu, 1, n}]]
listaffine :=
Table[If[UnsameQ[affine[[Nu, Lambda, Mu]], 0],
{Style[ Subsuperscript[\[CapitalGamma],
Row[{coord[[Nu]], coord[[Lambda]]}], coord[[Mu]]], 18],
"=",
Style[affine[[Nu, Lambda, Mu]], 14]}],
{Lambda, 1, n}, {Nu, 1, Lambda}, {Mu, 1, n}]
TableForm[Partition[DeleteCases[Flatten[listaffine],
Null], 3],
TableSpacing -> {1, 2}]
But when I copy and paste the output from the code say $-\sin(\theta)\cos(\theta)$, the output options I get follow as . As shown in the image I no longer have the options to carry out mathematical operations on the expression. What part of the code is causing this problems and how can the code be fixed such that I can have all the options shown in the first image?
metric
,coord
andinversemetric
? My initial guess is that such behavior is caused by*Form
wrappers that leave expressions in non-computable formats. $\endgroup$r, \[Theta], \[CapitalPhi]
? The code run as such throws recursion errors. Also in your posta
andb
show up in blue color which signifies that these are yet undefined. Please present a minimal working example that can be copied to notebooks. Same comment goes forStyle
showing up in a statement unless it is for presentation. Thanks. $\endgroup$Style[...]
. Eliminate these. $\endgroup$