Run the following code to initialize $\LaTeX$ output and load some macros, either by clicking on "Evaluate" or by typing Shift+Enter.
Now enter a line element in the box below, adapting the given code as
needed. First declare any parameters or functions, then provide a list of
coordinates using the MakeC
command as shown below (note the
double parentheses). Finally, use the Makeg
command to enter
both the signature (number of $-$ signs) and the coefficients $h^i$ of an
orthonormal basis $\sigma^i=h^i\,dx^i$ (no sum) of 1-forms in orthogonal
coordinates. The result should be the line element in tensor notation.
Components are displayed below by default in an orthonormal frame ($e$).
To compare with the standard literature, you can instead display the results
in a coordinate basis ($f$) by uncommenting the MakeF
command
below.
Use the command MakeGam()
to compute and display the connection
1-forms $\omega^i{}_j=\Gamma^i{}_{jk}\sigma^k$ for an orthonormal basis.
(You can then list the nonzero connection coefficients $\Gamma^i{}_{jk}$
with the command nab.display()
.)
Use the command MakeOm()
to compute and display the curvature
2-forms $\Omega^i{}_j=\frac12R^i{}_{jkl}\sigma^k\wedge\sigma^l$ for an
orthonormal basis. (You can then print specific curvature components
$R^i{}_{jkl}$ with the command riem[i,j,k,l]
).
Use the command MakeRic()
to compute the components
of the Ricci tensor $R_{ij}=R^m{}_{imj}$, then use the command
ric.up(g,1)[:]
to raise an index and display the
result. (These are the components of the Ricci vector-valued 1-form
$\mathbf{\vec{R}}=R^i{}_j\sigma^j\mathbf{\hat{e}}_i$.)
Compute and display the components of the Ricci scalar $R=R^i{}_i$.
Use the command MakeEin()
to compute the components of
the Einstein tensor $G_{ij}=R_{ij}-\frac12g_{ij}R$, then use the
command ein.up(g,1)[:]
to raise an index and display the
result. (These are the components of the Einstein vector-valued 1-form
$\mathbf{\vec{G}}=G^i{}_j\sigma^j\mathbf{\hat{e}}_i$.)